@font-face {
  font-family: "Newscrash";
  src: url("/fonts/Newscrash.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f172a;
  --bg-deep: #0b1120;
  --panel: #111c31;
  --card: #1e293b;
  --card-soft: rgba(30, 41, 59, 0.78);
  --blue: #3b82f6;
  --blue-bright: #60a5fa;
  --green: #22c55e;
  --yellow: #facc15;
  --red: #ef4444;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #788ca4;
  --border: rgba(148, 163, 184, 0.13);
  --border-strong: rgba(148, 163, 184, 0.22);
  --theme-accent: #3b82f6;
  --theme-accent-soft: rgba(59, 130, 246, 0.1);
  --theme-grid: rgba(96, 165, 250, 0.08);
  --theme-surface: rgba(30, 41, 59, 0.78);
  --theme-surface-deep: rgba(11, 17, 32, 0.82);
  --screen-backdrop: rgba(15, 23, 42, 0.78);
  --screen-window-bg: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.99) 70%);
  --screen-window-border: rgba(96, 165, 250, 0.28);
  --screen-window-shadow: 0 28px 74px rgba(2, 6, 23, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  --screen-header-bg: rgba(15, 23, 42, 0.88);
  --screen-panel-bg: rgba(15, 23, 42, 0.76);
  --screen-tool-bg: rgba(30, 41, 59, 0.94);
  --screen-tool-color: #bfdbfe;
  --screen-frame-bg: #0b1120;
  --screen-frame-border: #475569;
  --screen-frame-inset: #1e293b;
  --screen-device-bg: radial-gradient(circle at 50% 42%, rgba(59, 130, 246, 0.18), transparent 32%), linear-gradient(160deg, #172554, #020617 68%);
  --screen-device-grid: rgba(96, 165, 250, 0.045);
  --screen-device-text: #e2e8f0;
  --screen-device-muted: #94a3b8;
  --screen-control-bg: rgba(30, 41, 59, 0.96);
  --screen-control-border: rgba(148, 163, 184, 0.16);
  --header-height: 72px;
  --left-width: 244px;
  --left-compact: 82px;
  --right-width: 320px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --shadow: 0 20px 48px rgba(2, 6, 23, 0.38);
  --ease: 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

/* Build do cliente ------------------------------------------------------- */
.app-shell .build-view {
  background:
    radial-gradient(circle at 88% 4%, rgba(0, 208, 132, 0.08), transparent 26%),
    linear-gradient(145deg, #07130f, #081611 58%, #07110e);
}

.app-shell .build-view::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 208, 132, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 208, 132, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 52% 20%, #000, transparent 78%);
}

.build-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden auto;
  padding: 24px clamp(18px, 2.6vw, 38px) 52px;
}

.build-scroll::-webkit-scrollbar,
.build-history-table-wrap::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.build-scroll::-webkit-scrollbar-thumb,
.build-history-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 208, 132, 0.2);
}

.build-heading {
  display: flex;
  max-width: 1560px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 18px;
}

.build-title-group .subpage-back {
  margin-bottom: 15px;
}

.build-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.build-title-icon {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(0, 208, 132, 0.38);
  border-radius: 13px;
  background: rgba(0, 208, 132, 0.12);
  color: #25e59a;
  box-shadow: inset 0 0 20px rgba(0, 208, 132, 0.05);
}

.build-title-row small {
  display: block;
  margin-bottom: 3px;
  color: #25e59a;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.build-title-row h1 {
  margin: 0;
  color: #f0fdf8;
  font-size: clamp(22px, 2.25vw, 31px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.build-title-row p {
  margin: 6px 0 0;
  color: #6f9787;
  font-size: 11px;
}

.build-save-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(0, 208, 132, 0.19);
  border-radius: 999px;
  background: rgba(5, 23, 17, 0.76);
  color: #85aa9b;
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.build-save-status.is-saving i {
  animation: spin 800ms linear infinite;
}

.build-save-status.is-saved {
  color: #25e59a;
}

.build-save-status.is-error {
  border-color: rgba(239, 68, 68, 0.3);
  color: #fb7185;
}

.build-view-content {
  max-width: 1560px;
  margin: 0 auto;
}

.build-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 14px;
  align-items: start;
}

.build-panel {
  overflow: hidden;
  border: 1px solid rgba(0, 208, 132, 0.13);
  border-radius: 16px;
  background: rgba(5, 22, 16, 0.88);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(18px);
}

.build-panel-heading {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 208, 132, 0.09);
  background: rgba(8, 30, 22, 0.48);
}

.build-panel-heading > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(0, 208, 132, 0.1);
  color: #25e59a;
  font-size: 11px;
}

.build-panel-heading > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.build-panel-heading strong {
  color: #dff8ee;
  font-size: 11px;
}

.build-panel-heading small {
  color: #537568;
  font-size: 8px;
}

.build-ghost-btn {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(0, 208, 132, 0.18);
  border-radius: 8px;
  background: rgba(0, 208, 132, 0.055);
  color: #8ac6ae;
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
  transition: 180ms ease;
}

.build-ghost-btn:hover {
  border-color: rgba(0, 208, 132, 0.44);
  color: #25e59a;
  transform: translateY(-1px);
}

.build-config-form {
  display: grid;
  gap: 13px;
  padding: 15px;
}

.build-form-grid {
  display: grid;
  gap: 10px;
}

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

.build-form-grid.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.build-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.build-field-label {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7fa394;
  font-size: 9px;
  font-weight: 600;
}

.build-field-label small {
  color: #43675a;
  font-size: 8px;
  font-weight: 650;
}

.build-input-wrap,
.build-select-wrap,
.build-readonly-field {
  position: relative;
  display: flex;
  min-width: 0;
  height: 38px;
  align-items: center;
  border: 1px solid rgba(109, 151, 134, 0.13);
  border-radius: 9px;
  background: rgba(2, 16, 11, 0.76);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.build-input-wrap:focus-within,
.build-select-wrap:focus-within {
  border-color: rgba(0, 208, 132, 0.58);
  box-shadow:
    0 0 0 3px rgba(0, 208, 132, 0.07),
    0 0 18px rgba(0, 208, 132, 0.045);
}

.build-input-wrap input,
.build-select-wrap select {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d8eee6;
  font-size: 10px;
  font-weight: 570;
  color-scheme: dark;
}

.build-select-wrap select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
}

.build-input-wrap-with-btn input {
  padding-right: 36px;
}

.build-random-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #43675a;
  cursor: pointer;
  font-size: 11px;
  transition: color 150ms ease, background 150ms ease;
}

.build-random-btn:hover {
  color: #25e59a;
  background: rgba(0, 208, 132, 0.08);
}

.build-random-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.build-select-wrap i {
  position: absolute;
  right: 11px;
  color: #4e7867;
  font-size: 8px;
  pointer-events: none;
}

.build-icon-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.build-icon-option,
.build-icon-upload {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(109, 151, 134, 0.12);
  border-radius: 11px;
  background: rgba(2, 16, 11, 0.68);
  cursor: pointer;
  transition: 170ms ease;
}

.build-icon-option img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
}

.build-icon-option:hover,
.build-icon-option.is-selected {
  border-color: rgba(0, 208, 132, 0.78);
  box-shadow: 0 0 0 2px rgba(0, 208, 132, 0.1);
  transform: translateY(-2px);
}

.build-icon-option.is-selected::after {
  content: "✓";
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border: 2px solid #06150f;
  border-radius: 50%;
  background: #00d084;
  color: #021009;
  font-size: 8px;
  font-weight: 900;
}

.build-icon-upload {
  gap: 1px;
  color: #25e59a;
  font-size: 10px;
}

.build-icon-upload span {
  color: #5f907d;
  font-size: 7px;
  font-weight: 700;
}

.build-icon-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.build-icon-delete {
  position: absolute;
  z-index: 3;
  top: -6px;
  right: -6px;
  display: none;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 2px solid #06150f;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  font-size: 7px;
}

.build-icon-option:hover .build-icon-delete {
  display: grid;
}

.build-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.build-notif-card {
  background: rgba(10, 31, 26, 0.6);
  border: 1px solid rgba(63, 119, 100, 0.25);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0;
}

.build-notif-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.build-notif-hint {
  display: block;
  margin-top: 8px;
  color: #5a7a70;
  font-size: 9px;
}

.build-checkbox {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #7c9b8f;
  font-size: 9px;
  cursor: pointer;
}

.build-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.build-checkbox > span {
  display: grid;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(109, 151, 134, 0.28);
  border-radius: 4px;
  background: #06130f;
  color: transparent;
  font-size: 7px;
  transition: 160ms ease;
}

.build-checkbox input:checked + span {
  border-color: #00d084;
  background: #00d084;
  color: #03130c;
}

.build-checkbox strong {
  overflow: hidden;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-permission-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.build-permission {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(109, 151, 134, 0.1);
  border-radius: 7px;
  background: rgba(4, 18, 13, 0.72);
  color: #58796c;
  font-size: 7px;
  font-weight: 680;
  cursor: pointer;
  transition: 160ms ease;
}

.build-permission:hover {
  color: #97c6b3;
}

.build-permission.is-selected {
  border-color: rgba(0, 208, 132, 0.48);
  background: rgba(0, 208, 132, 0.11);
  color: #25e59a;
}

.build-readonly-field {
  padding-left: 11px;
  gap: 8px;
  color: #4c7665;
}

.build-readonly-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #a4c8ba;
  font-size: 9px;
}

.build-readonly-field button {
  align-self: stretch;
  padding: 0 11px;
  background: rgba(0, 208, 132, 0.07);
  color: #25e59a;
  font-size: 8px;
  cursor: pointer;
}

.build-server-route-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(109, 151, 134, 0.13);
  border-radius: 10px;
  background: rgba(2, 16, 11, 0.56);
}

.build-server-route-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.build-server-route-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  flex: 1;
}

.build-server-route-copy small {
  color: #6f9787;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.build-server-route-copy strong {
  color: #d7f7e9;
  font-size: 11px;
}

.build-server-route-copy > span {
  overflow: hidden;
  color: #7fa394;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-server-route-action {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(109, 151, 134, 0.16);
  border-radius: 7px;
  background: rgba(0, 208, 132, 0.07);
  color: #25e59a;
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
}

.build-server-route-card.is-proxy {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.08);
}

.build-server-route-card.is-proxy .build-server-route-icon {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
}

.build-server-route-card.is-direct {
  border-color: rgba(96, 165, 250, 0.26);
  background: rgba(59, 130, 246, 0.07);
}

.build-server-route-card.is-direct .build-server-route-icon {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.build-server-route-card.is-checking {
  opacity: 0.78;
}

.build-opening-card,
.build-preview-paths {
  overflow: hidden;
  border: 1px solid rgba(109, 151, 134, 0.11);
  border-radius: 10px;
  background: rgba(3, 16, 11, 0.44);
}

.build-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(109, 151, 134, 0.1);
}

.build-mode-tabs button {
  display: inline-flex;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #507266;
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
}

.build-mode-tabs button.is-active {
  border-bottom-color: #00d084;
  color: #25e59a;
  background: rgba(0, 208, 132, 0.035);
}

.build-opening-card > .build-field {
  padding: 0 12px 12px;
}

.build-preview-paths summary {
  padding: 11px 12px;
  color: #73998a;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.build-preview-paths .build-form-grid {
  padding: 0 12px 12px;
}

.build-generate-btn {
  position: relative;
  display: grid;
  min-height: 46px;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
  border: 1px solid #00e28d;
  border-radius: 10px;
  background: linear-gradient(92deg, #00ef95, #00c97f);
  color: #012d1c;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 208, 132, 0.14);
  transition: 180ms ease;
}

.build-generate-btn small {
  justify-self: end;
  padding-right: 12px;
  color: rgba(1, 45, 28, 0.65);
  font-size: 7px;
  font-weight: 700;
}

.build-generate-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.build-generate-btn.is-loading i {
  animation: spin 700ms linear infinite;
}

.build-preview-panel {
  position: sticky;
  top: 0;
}

.build-preview-stack {
  display: grid;
  gap: 17px;
  padding: 14px;
}

.build-phone-preview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #73998a;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.build-phone-preview > header button {
  background: transparent;
  color: #4c7565;
  font-size: 8px;
  cursor: pointer;
}

.build-phone-shell {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 9 / 17.4;
  margin: 0 auto;
  padding: 15px 6px 17px;
  overflow: hidden;
  border: 1px solid #31413a;
  border-radius: 24px;
  background: #090e0c;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.28),
    inset 0 0 0 3px #121b17;
}

.build-phone-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: white;
}

.build-phone-speaker {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: #27342f;
  transform: translateX(-50%);
}

.build-phone-home {
  position: absolute;
  bottom: 6px;
  left: 50%;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: #52675f;
  transform: translateX(-50%);
}

.build-preview-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(0, 208, 132, 0.09);
}

.build-preview-meta > img,
.build-preview-placeholder {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(0, 208, 132, 0.1);
  color: #25e59a;
  object-fit: cover;
}

.build-preview-meta > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.build-preview-meta strong {
  color: #c9e8dc;
  font-size: 10px;
}

.build-preview-meta small {
  overflow: hidden;
  color: #507467;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-history-panel {
  margin-top: 14px;
}

.build-history-heading {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 208, 132, 0.09);
}

.build-history-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.build-history-heading > div:first-child > span {
  color: #25e59a;
}

.build-history-heading strong {
  color: #d7eee5;
  font-size: 10px;
}

.build-history-heading small {
  color: #4f7466;
  font-size: 8px;
}

.build-history-actions {
  display: flex;
  gap: 7px;
}

.build-history-actions button,
.build-load-error button {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(0, 208, 132, 0.14);
  border-radius: 7px;
  background: rgba(0, 208, 132, 0.045);
  color: #6fa18e;
  font-size: 8px;
  font-weight: 700;
  cursor: pointer;
}

.build-history-actions button:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.build-history-table-wrap {
  overflow: auto;
}

.build-history-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  color: #84a597;
  font-size: 8px;
}

.build-history-table th {
  height: 36px;
  padding: 0 10px;
  color: #476b5e;
  font-size: 7px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.build-history-table td {
  height: 51px;
  padding: 7px 10px;
  border-top: 1px solid rgba(109, 151, 134, 0.075);
  white-space: nowrap;
}

.build-history-table tbody tr:hover {
  background: rgba(0, 208, 132, 0.027);
}

.build-history-table input {
  accent-color: #00d084;
}

.build-history-table strong {
  color: #b8d5ca;
  font-size: 9px;
}

.build-history-table code {
  color: #7fa394;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.history-app-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 7px;
  background: rgba(0, 208, 132, 0.08);
  color: #25e59a;
  object-fit: cover;
}

.history-type {
  padding: 4px 6px;
  border: 1px solid rgba(0, 208, 132, 0.14);
  border-radius: 5px;
  color: #80b7a2;
}

.history-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(0, 208, 132, 0.22);
  border-radius: 5px;
  background: rgba(0, 208, 132, 0.08);
  color: #25e59a;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.history-status-pending {
  border-color: rgba(245, 158, 11, 0.22);
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}

.history-status-building {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}

.history-status-building i {
  animation: build-pulse 1s ease-in-out infinite;
}

.history-status-failed {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

@keyframes build-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.history-row-actions {
  display: flex;
  gap: 5px;
}

.history-row-actions button {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(0, 208, 132, 0.16);
  border-radius: 6px;
  background: rgba(0, 208, 132, 0.045);
  color: #25e59a;
  cursor: pointer;
}

.history-row-actions button.danger {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.045);
  color: #fb7185;
}

.history-row-actions button .fav-active {
  color: #fbbf24;
}

.build-history-empty,
.build-load-error {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #517669;
  text-align: center;
}

.build-history-empty > i,
.build-load-error > i {
  color: #25e59a;
  font-size: 25px;
}

.build-history-empty strong,
.build-load-error strong {
  color: #b7d6ca;
  font-size: 11px;
}

.build-history-empty span,
.build-load-error span {
  max-width: 420px;
  font-size: 9px;
}

.build-loading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 14px;
}

.build-loading-grid span {
  min-height: 480px;
  border: 1px solid rgba(0, 208, 132, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(0, 208, 132, 0.045) 38%, transparent 58%),
    rgba(5, 22, 16, 0.72);
  background-size: 200% 100%;
  animation: build-skeleton 1.3s linear infinite;
}

.build-loading-grid span:nth-child(n + 3) {
  min-height: 130px;
  grid-column: 1 / -1;
}

@keyframes build-skeleton {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1180px) {
  .build-workspace,
  .build-loading-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

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

@media (max-width: 920px) {
  .build-workspace,
  .build-loading-grid {
    grid-template-columns: 1fr;
  }

  .build-preview-panel {
    position: static;
  }

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

@media (max-width: 760px) {
  .build-scroll {
    padding: 16px 12px 42px;
  }

  .build-heading,
  .build-history-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .build-save-status {
    align-self: flex-start;
  }

  .build-form-grid.two-columns,
  .build-form-grid.three-columns,
  .build-check-grid,
  .build-preview-stack {
    grid-template-columns: 1fr;
  }

  .build-ghost-btn {
    width: 30px;
    padding: 0;
    justify-content: center;
  }

  .build-ghost-btn span {
    display: none;
  }

  .build-generate-btn {
    grid-template-columns: auto auto;
  }

  .build-generate-btn small {
    display: none;
  }

  .build-history-actions {
    flex-wrap: wrap;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Inter", "Roboto", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

::selection {
  background: rgba(59, 130, 246, 0.34);
  color: #fff;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.boot-screen {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(59, 130, 246, 0.15), transparent 29%),
    #0b1120;
  transition:
    opacity 500ms ease,
    visibility 500ms ease;
}

.boot-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 70%);
}

.boot-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.front-version-badge {
  position: fixed;
  bottom: 8px;
  right: 12px;
  z-index: 9000;
  font-family: "Newscrash", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  padding: 3px 8px;
  pointer-events: none;
  user-select: none;
  backdrop-filter: blur(4px);
  transition: color 200ms ease, border-color 200ms ease;
}

.front-version-badge.is-current {
  color: rgba(74, 222, 128, 0.8);
  border-color: rgba(74, 222, 128, 0.2);
}

.front-version-badge.is-outdated {
  color: rgba(251, 191, 36, 0.9);
  border-color: rgba(251, 191, 36, 0.3);
}

.boot-brand {
  position: relative;
  z-index: 1;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 21px;
  background: linear-gradient(145deg, #2563eb, #3b82f6);
  box-shadow:
    0 22px 44px rgba(37, 99, 235, 0.3),
    inset 0 1px rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 28px;
  animation: boot-float 2.4s ease-in-out infinite;
}

.boot-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 6px;
}

.boot-copy strong {
  font-size: 19px;
  letter-spacing: -0.02em;
}

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

.boot-spinner {
  position: relative;
  z-index: 1;
  width: 150px;
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.12);
}

.boot-spinner::after {
  content: "";
  position: absolute;
  width: 55%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  animation: boot-load 1.15s ease-in-out infinite;
}

.app-shell {
  position: relative;
  display: grid;
  width: 100%;
  height: 100dvh;
  min-height: 560px;
  grid-template-rows: var(--header-height) minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg-deep);
}

.topbar {
  position: relative;
  z-index: 1200;
  display: grid;
  min-width: 0;
  grid-template-columns: var(--left-width) minmax(150px, 1fr) minmax(260px, 470px) auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px 0 0;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.91);
  box-shadow: 0 8px 28px rgba(2, 6, 23, 0.2);
  backdrop-filter: blur(18px) saturate(1.18);
  transition: grid-template-columns var(--ease);
}

.app-shell.left-collapsed .topbar {
  grid-template-columns: var(--left-compact) minmax(150px, 1fr) minmax(260px, 470px) auto;
}

.brand-block {
  display: flex;
  height: 100%;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-right: 1px solid var(--border);
}

.brand-logo {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 13px;
  background: linear-gradient(145deg, #2563eb, #3b82f6);
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.24);
  color: white;
  font-size: 18px;
}

.brand-copy {
  min-width: 0;
  transition:
    opacity var(--ease),
    width var(--ease);
}

.brand-copy strong,
.title-block strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy strong {
  font-size: 15px;
}

.brand-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-shell.left-collapsed .brand-copy {
  width: 0;
  opacity: 0;
}

.menu-toggle {
  display: none;
}

.title-block {
  min-width: 0;
  padding-left: 2px;
}

.title-block strong {
  font-size: 15px;
}

.title-block span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-wrap {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  position: relative;
  display: flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.68);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
  transition:
    border-color var(--ease),
    background var(--ease),
    box-shadow var(--ease),
    transform var(--ease);
}

.search-box:focus-within {
  border-color: rgba(59, 130, 246, 0.65);
  background: rgba(30, 41, 59, 0.94);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  transform: translateY(-1px);
}

.search-box > i {
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.search-shortcut {
  display: inline-flex;
  height: 23px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.search-results {
  position: absolute;
  z-index: 1500;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  max-height: min(370px, calc(100vh - 110px));
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition: all var(--ease);
}

.search-results.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.search-result-item {
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background var(--ease);
}

.search-result-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.result-pin {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue-bright);
}

.result-copy {
  min-width: 0;
}

.result-copy strong,
.result-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy strong {
  font-size: 11px;
}

.result-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.result-count {
  color: var(--muted);
  font-size: 9px;
}

.search-empty {
  padding: 25px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.top-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn,
.action-btn,
.panel-toggle,
.map-control-btn,
.nav-item,
.client-row,
.popup-action {
  position: relative;
  overflow: hidden;
}

.icon-btn,
.action-btn,
.panel-toggle,
.map-control-btn {
  display: inline-flex;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(30, 41, 59, 0.68);
  color: var(--muted);
  cursor: pointer;
  transition:
    color var(--ease),
    border-color var(--ease),
    background var(--ease),
    transform var(--ease);
}

.icon-btn {
  width: 40px;
}

.action-btn {
  gap: 8px;
  padding: 0 13px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
}

.icon-btn:hover,
.action-btn:hover,
.panel-toggle:hover,
.map-control-btn:hover {
  border-color: rgba(59, 130, 246, 0.36);
  background: rgba(59, 130, 246, 0.12);
  color: var(--text);
  transform: translateY(-1px);
}

.action-btn.has-filter {
  border-color: rgba(59, 130, 246, 0.45);
  color: var(--blue-bright);
}

.status-pulse {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border: 2px solid #172136;
  border-radius: 50%;
  background: var(--green);
  box-sizing: content-box;
}

.user-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  margin-left: 2px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 12px;
  background: linear-gradient(145deg, #1d4ed8, #2563eb);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  transition:
    transform var(--ease),
    box-shadow var(--ease);
}

.user-avatar:hover {
  box-shadow: 0 11px 23px rgba(37, 99, 235, 0.28);
  transform: translateY(-1px);
}

.filter-popover {
  position: absolute;
  z-index: 1600;
  top: calc(100% + 12px);
  right: 0;
  width: 274px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: all var(--ease);
}

.filter-popover.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

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

.popover-heading strong {
  font-size: 12px;
}

.popover-heading button {
  background: transparent;
  color: var(--blue-bright);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 10px;
}

.filter-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--blue);
}

.filter-dot,
.legend-dot,
.client-status {
  flex: 0 0 auto;
  border-radius: 50%;
}

.filter-dot {
  width: 7px;
  height: 7px;
}

.app-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: var(--left-width) minmax(0, 1fr) var(--right-width);
  transition: grid-template-columns var(--ease);
}

.app-shell.left-collapsed .app-body {
  grid-template-columns: var(--left-compact) minmax(0, 1fr) var(--right-width);
}

.app-shell.right-collapsed .app-body {
  grid-template-columns: var(--left-width) minmax(0, 1fr) 0;
}

.app-shell.left-collapsed.right-collapsed .app-body {
  grid-template-columns: var(--left-compact) minmax(0, 1fr) 0;
}

.left-sidebar,
.right-panel {
  position: relative;
  z-index: 900;
  min-width: 0;
  min-height: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
  transition:
    width var(--ease),
    transform var(--ease),
    opacity var(--ease);
}

.left-sidebar {
  display: flex;
  flex-direction: column;
  padding: 19px 13px 14px;
  border-right: 1px solid var(--border);
}

.sidebar-section-label {
  margin: 2px 9px 11px;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  transition:
    opacity var(--ease),
    height var(--ease);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  width: 100%;
  height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: all var(--ease);
}

.nav-item > i {
  width: 20px;
  flex: 0 0 auto;
  color: #7e90ab;
  font-size: 14px;
  text-align: center;
  transition: color var(--ease);
}

.nav-item span {
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    opacity var(--ease),
    width var(--ease);
}

.nav-item .nav-badge {
  display: inline-grid;
  width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 8px;
}

.nav-item:hover {
  border-color: rgba(148, 163, 184, 0.1);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text);
}

.nav-item.active {
  border-color: rgba(59, 130, 246, 0.18);
  background: linear-gradient(
    90deg,
    rgba(59, 130, 246, 0.18),
    rgba(59, 130, 246, 0.05)
  );
  color: var(--text);
  box-shadow: inset 3px 0 var(--blue);
}

.nav-item.active > i {
  color: var(--blue-bright);
}

.sidebar-foot {
  margin-top: auto;
}

.sync-card {
  margin: 18px 1px 13px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.45);
  transition:
    opacity var(--ease),
    padding var(--ease);
}

.sync-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.09);
}

.sync-card strong {
  font-size: 9px;
}

.sync-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.collapse-left {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.45);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  transition: all var(--ease);
}

.collapse-left:hover {
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--text);
}

.collapse-left i {
  transition: transform var(--ease);
}

.app-shell.left-collapsed .sidebar-section-label,
.app-shell.left-collapsed .nav-item span,
.app-shell.left-collapsed .nav-badge,
.app-shell.left-collapsed .sync-card,
.app-shell.left-collapsed .collapse-left span {
  width: 0;
  opacity: 0;
  pointer-events: none;
}

.app-shell.left-collapsed .sidebar-section-label {
  height: 0;
  margin: 0;
}

.app-shell.left-collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.app-shell.left-collapsed .nav-item > i {
  width: auto;
}

.app-shell.left-collapsed .sync-card {
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.app-shell.left-collapsed .collapse-left i {
  transform: rotate(180deg);
}

.map-stage {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0c1629;
}

#world-map {
  width: 100%;
  height: 100%;
  background: #0c1629;
}

.map-skeleton {
  position: absolute;
  z-index: 850;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0e182a;
  transition:
    opacity 400ms ease,
    visibility 400ms ease;
}

.map-skeleton::before,
.map-skeleton::after {
  content: "";
  position: absolute;
  inset: -30%;
}

.map-skeleton::before {
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.09) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(600px) rotateX(55deg);
}

.map-skeleton::after {
  width: 36%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(96, 165, 250, 0.06),
    transparent
  );
  animation: skeleton-sweep 1.6s linear infinite;
}

.map-skeleton.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.map-loading-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.68);
  color: var(--muted);
  font-size: 10px;
  backdrop-filter: blur(10px);
}

.mini-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(96, 165, 250, 0.2);
  border-top-color: var(--blue-bright);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.map-toolbar {
  position: absolute;
  z-index: 700;
  top: 18px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.map-control-group {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
}

.map-control-group .map-control-btn {
  width: 40px;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
}

.map-control-group .map-control-btn + .map-control-btn {
  border-top: 1px solid var(--border);
}

.map-control-btn.solo {
  width: 40px;
  border-color: var(--border-strong);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(12px);
}

.live-chip {
  position: absolute;
  z-index: 700;
  top: 18px;
  left: 74px;
  display: flex;
  height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.28);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

.live-chip .sync-dot {
  width: 6px;
  height: 6px;
  animation: pulse 2s ease-out infinite;
}

.legend {
  position: absolute;
  z-index: 700;
  bottom: 24px;
  left: 18px;
  width: 178px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.91);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.legend-head {
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  border-bottom: 1px solid var(--border);
}

.legend-head strong {
  font-size: 10px;
}

.legend-head i {
  color: var(--muted-2);
  font-size: 9px;
}

.legend-body {
  display: grid;
  gap: 9px;
  padding: 11px 13px 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px currentColor;
}

.legend-dot.active {
  color: rgba(34, 197, 94, 0.11);
  background: var(--green);
}

.legend-dot.pending {
  color: rgba(250, 204, 21, 0.11);
  background: var(--yellow);
}

.legend-dot.offline {
  color: rgba(239, 68, 68, 0.11);
  background: var(--red);
}

.legend-dot.premium {
  color: rgba(59, 130, 246, 0.13);
  background: var(--blue);
}

.map-meta {
  position: absolute;
  z-index: 700;
  right: 16px;
  bottom: 39px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.84);
  color: var(--muted-2);
  font-size: 8px;
  backdrop-filter: blur(10px);
}

.map-meta strong {
  color: var(--muted);
  font-weight: 600;
}

.right-panel {
  display: flex;
  flex-direction: column;
  width: var(--right-width);
  border-left: 1px solid var(--border);
  opacity: 1;
}

.app-shell.right-collapsed .right-panel {
  width: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.panel-toggle {
  position: absolute;
  z-index: 1050;
  top: 16px;
  left: -18px;
  width: 36px;
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.3);
}

.app-shell.right-collapsed .panel-toggle {
  left: -42px;
  opacity: 1;
  pointer-events: auto;
}

.panel-toggle i {
  transition: transform var(--ease);
}

.app-shell.right-collapsed .panel-toggle i {
  transform: rotate(180deg);
}

.panel-scroll {
  min-width: var(--right-width);
  height: 100%;
  overflow: hidden auto;
  padding: 19px 17px 22px;
}

.panel-scroll::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
  width: 5px;
}

.panel-scroll::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.18);
}

.panel-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.panel-title span {
  display: block;
  margin-bottom: 5px;
  color: var(--blue-bright);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-title h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.data-live {
  display: inline-flex;
  height: 25px;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.07);
  color: #86efac;
  font-size: 8px;
  font-weight: 700;
}

.data-live::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.stat-card {
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.86), rgba(20, 31, 51, 0.76));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition:
    transform var(--ease),
    border-color var(--ease);
}

.stat-card:hover {
  border-color: rgba(96, 165, 250, 0.2);
  transform: translateY(-2px);
}

.stat-icon {
  display: grid;
  width: 27px;
  height: 27px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 8px;
  font-size: 10px;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-bright);
}

.stat-icon.violet {
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
}

.stat-icon.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #22d3ee;
}

.stat-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 19px;
  letter-spacing: -0.035em;
}

.stat-card span {
  color: var(--muted);
  font-size: 8px;
}

.status-card {
  margin-top: 9px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(30, 41, 59, 0.54);
}

.status-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 9px;
}

.status-card-head strong {
  color: var(--text);
  font-size: 10px;
}

.progress-track {
  display: flex;
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
}

.progress-track span {
  height: 100%;
  transition: width 600ms ease;
}

.progress-active {
  background: var(--green);
}

.progress-premium {
  background: var(--blue);
}

.progress-pending {
  background: var(--yellow);
}

.progress-offline {
  background: var(--red);
}

.status-breakdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px 12px;
  margin-top: 12px;
}

.status-breakdown span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 8px;
}

.status-breakdown b {
  margin-left: auto;
  color: #cbd5e1;
  font-size: 8px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 21px 2px 10px;
}

.section-heading strong {
  font-size: 10px;
}

.section-heading button {
  background: transparent;
  color: var(--blue-bright);
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 6px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: left;
  transition: all var(--ease);
}

.client-row:hover {
  border-color: var(--border);
  background: rgba(30, 41, 59, 0.6);
}

.client-row-main {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 9px;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  text-align: left;
  padding: 0;
}

.client-row-fav,
.client-row-del {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.15s;
}

.client-row-fav:hover {
  color: #eab308;
  background: rgba(234, 179, 8, 0.1);
}

.client-row-fav.active {
  color: #eab308;
}

.client-row-del:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.client-monogram {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.09);
  color: #bfdbfe;
  font-size: 9px;
  font-weight: 800;
}

.client-copy {
  min-width: 0;
}

.client-copy strong,
.client-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-copy strong {
  font-size: 9px;
}

.client-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.client-status {
  width: 7px;
  height: 7px;
}

.status-ativo,
.active-color {
  background: var(--green);
}

.status-pendente,
.pending-color {
  background: var(--yellow);
}

.status-offline,
.offline-color {
  background: var(--red);
}

.status-premium,
.premium-color {
  background: var(--blue);
}

.toast-region {
  position: fixed;
  z-index: 5000;
  right: 19px;
  bottom: 19px;
  display: flex;
  width: min(350px, calc(100vw - 38px));
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  transition: all 260ms ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.toast-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-bright);
  font-size: 11px;
}

.toast-copy strong,
.toast-copy span {
  display: block;
}

.toast-copy strong {
  font-size: 9px;
}

.toast-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.toast-close {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}

.mobile-backdrop {
  position: fixed;
  z-index: 880;
  inset: var(--header-height) 0 0;
  background: rgba(2, 6, 23, 0.64);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(3px);
  transition: all var(--ease);
}

.mobile-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transform: scale(0);
  animation: ripple 520ms ease-out;
}

/* Server settings */
.settings-view,
.build-view,
.profile-view,
.client-detail-view,
.device-logs-view {
  position: relative;
  display: none;
  min-width: 0;
  min-height: 0;
  grid-column: 2 / -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 12%, rgba(59, 130, 246, 0.09), transparent 30%),
    linear-gradient(145deg, #0c1526, #0f172a 58%, #0b1322);
}

.app-shell.settings-open .map-stage,
.app-shell.settings-open .right-panel,
.app-shell.build-open .map-stage,
.app-shell.build-open .right-panel,
.app-shell.profile-open .map-stage,
.app-shell.profile-open .right-panel,
.app-shell.client-detail-open .map-stage,
.app-shell.client-detail-open .right-panel,
.app-shell.devicelogs-open .map-stage,
.app-shell.devicelogs-open .right-panel {
  display: none;
}

.app-shell.settings-open .settings-view,
.app-shell.build-open .build-view,
.app-shell.profile-open .profile-view,
.app-shell.client-detail-open .client-detail-view,
.app-shell.devicelogs-open .device-logs-view {
  display: block;
  animation: settings-enter 320ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.settings-scroll {
  width: 100%;
  height: 100%;
  overflow: hidden auto;
  padding: 28px clamp(22px, 3.5vw, 48px) 42px;
}

.settings-scroll::-webkit-scrollbar {
  width: 6px;
}

.settings-scroll::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.17);
}

.settings-heading {
  display: flex;
  max-width: 1120px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.settings-heading-copy {
  min-width: 0;
}

.settings-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  overflow: visible;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: color var(--ease);
}

.settings-back:hover {
  color: var(--blue-bright);
}

.settings-back i {
  font-size: 9px;
}

.settings-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-bright);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.settings-heading h1 {
  margin: 0;
  font-size: clamp(23px, 2.5vw, 32px);
  letter-spacing: -0.045em;
}

.settings-heading p {
  max-width: 580px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.server-status-badge {
  display: inline-flex;
  height: 32px;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.07);
  color: #fca5a5;
  font-size: 9px;
  font-weight: 700;
  transition: all var(--ease);
}

.server-status-badge > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.08);
}

.server-status-badge.server-is-connecting {
  border-color: rgba(250, 204, 21, 0.2);
  background: rgba(250, 204, 21, 0.07);
  color: #fde047;
}

.server-status-badge.server-is-connecting > i {
  box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.08);
  animation: pulse 1.1s ease-out infinite;
}

.server-status-badge.server-is-connected {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.07);
  color: #86efac;
}

.server-status-badge.server-is-connected > i {
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.08);
  animation: pulse 2s ease-out infinite;
}

.settings-layout {
  display: grid;
  max-width: 1120px;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 18px;
  margin: 0 auto;
}

.settings-main-column,
.connection-sidebar {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.settings-card,
.connection-card,
.delete-confirm {
  border: 1px solid var(--border);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(17, 28, 49, 0.75));
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(14px);
}

.settings-card {
  padding: 20px;
}

/* A conexão do usuário é feita exclusivamente pelo WebSocket. */
.server-form-card {
  display: none !important;
}

.settings-card-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.settings-card-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(59, 130, 246, 0.17);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue-bright);
  font-size: 12px;
}

.settings-card-icon.neutral {
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(148, 163, 184, 0.07);
  color: #cbd5e1;
}

.settings-card-heading strong,
.settings-card-heading small {
  display: block;
}

.settings-card-heading strong {
  margin-bottom: 4px;
  font-size: 11px;
}

.settings-card-heading small {
  color: var(--muted);
  font-size: 8px;
}

.server-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.server-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.server-field {
  display: block;
  min-width: 0;
}

.server-field > span:first-child {
  display: block;
  margin: 0 0 7px 2px;
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 600;
}

.server-input-wrap {
  display: flex;
  height: 44px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(11, 17, 32, 0.48);
  transition:
    border-color var(--ease),
    box-shadow var(--ease),
    background var(--ease);
}

.server-input-wrap:focus-within {
  border-color: rgba(59, 130, 246, 0.58);
  background: rgba(11, 17, 32, 0.72);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.server-field.has-error .server-input-wrap {
  border-color: rgba(239, 68, 68, 0.56);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.07);
}

.server-input-wrap > i {
  width: 14px;
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

.server-input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 10px;
}

.server-input-wrap input::placeholder {
  color: #4b5d77;
}

.server-input-wrap input:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.server-field > small {
  display: block;
  min-height: 13px;
  margin: 5px 0 -9px 2px;
  color: #fca5a5;
  font-size: 8px;
}

.password-toggle {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color var(--ease),
    background var(--ease);
}

.password-toggle:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

.credential-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid rgba(59, 130, 246, 0.12);
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.05);
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.credential-note i {
  margin-top: 1px;
  color: var(--blue-bright);
}

.server-action-bar {
  display: grid;
  grid-template-columns: 1.18fr repeat(3, 1fr);
  gap: 8px;
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.server-btn,
.ping-test-btn {
  position: relative;
  display: inline-flex;
  height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  transition: all var(--ease);
}

.server-btn:hover:not(:disabled),
.ping-test-btn:hover:not(:disabled) {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.1);
  color: var(--text);
  transform: translateY(-1px);
}

.server-btn:disabled,
.ping-test-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.server-btn-primary {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.18);
  color: white;
}

.server-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.server-btn-danger-soft {
  color: #fca5a5;
}

.server-btn-danger-soft:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
}

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

.security-grid > span {
  display: grid;
  min-width: 0;
  min-height: 82px;
  align-content: center;
  gap: 5px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(11, 17, 32, 0.26);
}

.security-grid i {
  margin-bottom: 3px;
  color: var(--blue-bright);
  font-size: 11px;
}

.security-grid b {
  color: #e2e8f0;
  font-size: 8px;
}

.security-grid small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-card {
  position: relative;
  padding: 25px 20px 20px;
  overflow: hidden;
  text-align: center;
}

.connection-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  transition: background var(--ease);
}

.connection-card.server-is-connecting::before {
  background: var(--yellow);
}

.connection-card.server-is-connected::before {
  background: var(--green);
}

.connection-visual {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  margin: 2px auto 18px;
  place-items: center;
}

.connection-orb {
  position: relative;
  z-index: 2;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.13), rgba(127, 29, 29, 0.08));
  box-shadow: 0 15px 34px rgba(2, 6, 23, 0.28);
  color: #f87171;
  font-size: 20px;
  transition: all 340ms ease;
}

.connection-radar {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(239, 68, 68, 0.14);
  border-radius: 50%;
  transition: border-color var(--ease);
}

.connection-radar::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(239, 68, 68, 0.12);
  border-radius: 50%;
}

.server-is-connecting .connection-orb {
  border-color: rgba(250, 204, 21, 0.25);
  background: linear-gradient(145deg, rgba(250, 204, 21, 0.13), rgba(113, 63, 18, 0.08));
  color: #fde047;
  animation: server-breathe 1.2s ease-in-out infinite;
}

.server-is-connected .connection-orb {
  border-color: rgba(34, 197, 94, 0.25);
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.16), rgba(20, 83, 45, 0.08));
  box-shadow: 0 16px 36px rgba(34, 197, 94, 0.09);
  color: #4ade80;
}

.server-is-connected .connection-radar,
.server-is-connected .connection-radar::before {
  border-color: rgba(34, 197, 94, 0.18);
  animation: server-radar 2.4s ease-out infinite;
}

.connection-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.connection-card h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.035em;
}

.connection-card > p {
  min-height: 30px;
  margin: 7px auto 17px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.ping-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(11, 17, 32, 0.38);
  text-align: left;
}

.ping-panel small,
.ping-panel strong {
  display: block;
}

.ping-panel small {
  margin-bottom: 3px;
  color: var(--muted-2);
  font-size: 7px;
}

.ping-panel strong {
  font-size: 12px;
}

.ping-panel strong b {
  font-size: 20px;
  letter-spacing: -0.04em;
}

.ping-quality {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.server-is-connected .ping-quality {
  border-color: rgba(34, 197, 94, 0.16);
  background: rgba(34, 197, 94, 0.06);
  color: #86efac;
}

.connection-data {
  display: grid;
  gap: 0;
  margin: 0 0 15px;
  text-align: left;
}

.connection-data > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border);
}

.connection-data dt {
  color: var(--muted-2);
  font-size: 7px;
}

.connection-data dd {
  margin: 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 8px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ping-test-btn {
  width: 100%;
}

.delete-confirm {
  display: none;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(69, 10, 10, 0.16);
}

.delete-confirm.is-visible {
  display: grid;
  animation: settings-enter 220ms ease;
}

.delete-confirm-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-size: 11px;
}

.delete-confirm strong {
  font-size: 9px;
}

.delete-confirm p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.delete-confirm-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 4px;
}

.delete-confirm-actions button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 7px;
  font-weight: 700;
}

.delete-confirm-actions button:last-child {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Custom command builder */
.command-builder-card {
  overflow: hidden;
}

.command-builder-heading {
  align-items: center;
}

.settings-card-icon.command {
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
}

.command-builder-count {
  margin-left: auto;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.52);
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
  white-space: nowrap;
}

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

.command-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.command-field {
  min-width: 0;
}

.command-field > span,
.extra-command-field-row label > span {
  display: block;
  margin: 0 0 6px 2px;
  color: #cbd5e1;
  font-size: 8px;
  font-weight: 650;
}

.command-field input,
.extra-command-field-row input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: rgba(11, 17, 32, 0.48);
  color: var(--text);
  font-family: inherit;
  font-size: 9px;
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}

.command-field input:focus,
.extra-command-field-row input:focus {
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
}

.command-field input::placeholder,
.extra-command-field-row input::placeholder {
  color: #4b5d77;
}

.command-field > small {
  display: block;
  min-height: 12px;
  margin: 4px 0 -7px 2px;
  color: #fca5a5;
  font-size: 7px;
}

.command-field.has-error input,
.extra-command-field-row.has-error input:first-of-type {
  border-color: rgba(239, 68, 68, 0.5);
}

.command-icon-section,
.command-payload-section {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(11, 17, 32, 0.24);
}

.command-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.command-section-title strong,
.command-section-title small {
  display: block;
}

.command-section-title strong {
  color: #dbe5f1;
  font-size: 9px;
}

.command-section-title small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 7px;
}

.command-icon-preview {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
  font-size: 13px;
}

.command-icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.command-icon-palette {
  display: grid;
  grid-template-columns: repeat(7, 34px) minmax(72px, 1fr);
  gap: 6px;
  margin-top: 11px;
}

.command-icon-palette > button,
.command-icon-upload {
  position: relative;
  display: grid;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.54);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  transition: all var(--ease);
}

.command-icon-palette > button:hover,
.command-icon-palette > button.is-selected {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.09);
  color: #6ee7b7;
}

.command-icon-upload {
  grid-auto-flow: column;
  gap: 6px;
  padding: 0 9px;
  font-size: 7px;
  font-weight: 700;
}

.command-icon-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.command-upload-note {
  display: block;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 6px;
}

.add-command-field {
  display: inline-flex;
  height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  color: #93c5fd;
  cursor: pointer;
  font-size: 7px;
  font-weight: 700;
}

.fixed-command-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.fixed-command-fields > span {
  display: grid;
  min-width: 0;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 2px 6px;
  padding: 9px;
  border: 1px solid rgba(52, 211, 153, 0.1);
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.04);
}

.fixed-command-fields i {
  grid-row: 1 / 3;
  color: #4ade80;
  font-size: 8px;
}

.fixed-command-fields b {
  color: #b9dfd1;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
}

.fixed-command-fields small {
  overflow: hidden;
  color: #56756c;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extra-command-fields {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.extra-command-fields > p {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  border: 1px dashed rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  color: var(--muted-2);
  font-size: 7px;
}

.extra-command-field-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) 31px;
  align-items: end;
  gap: 7px;
}

.extra-command-field-row label {
  min-width: 0;
}

.extra-command-field-row input {
  height: 36px;
  font-size: 8px;
}

.extra-command-field-row > button {
  display: grid;
  width: 31px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(239, 68, 68, 0.13);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.05);
  color: #f87171;
  cursor: pointer;
  font-size: 8px;
}

.extra-command-field-row > small {
  grid-column: 1 / -1;
  min-height: 0;
  margin-top: -4px;
  color: #fca5a5;
  font-size: 6px;
}

.command-json-preview {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 10px;
  background: #07111b;
}

.command-json-preview header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.09);
  color: #6ee7b7;
  font-size: 7px;
}

.command-json-preview header span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.command-json-preview header small {
  color: #49665e;
  font-size: 6px;
}

.command-json-preview pre,
.command-payload-preview pre {
  margin: 0;
  overflow: auto;
  color: #b7d9ce;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.command-json-preview pre {
  min-height: 82px;
  padding: 11px;
  font-size: 8px;
  line-height: 1.55;
}

.command-builder-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.command-builder-actions button {
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.68);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.command-builder-actions button:last-child {
  border-color: rgba(37, 99, 235, 0.38);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
}

.custom-command-list-wrap {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--border);
}

.custom-command-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.custom-command-empty {
  display: grid;
  min-height: 66px;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px dashed rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  color: var(--muted-2);
}

.custom-command-empty > i {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.07);
  color: #60a5fa;
  font-size: 10px;
}

.custom-command-empty strong,
.custom-command-empty small {
  display: block;
}

.custom-command-empty strong {
  color: #a8b5c7;
  font-size: 8px;
}

.custom-command-empty small {
  margin-top: 4px;
  font-size: 7px;
}

.custom-command-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(11, 17, 32, 0.3);
}

.custom-command-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.07);
  color: #6ee7b7;
  font-size: 11px;
}

.custom-command-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.custom-command-copy {
  min-width: 0;
}

.custom-command-copy strong,
.custom-command-copy code,
.custom-command-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-command-copy strong {
  color: #d8e4ef;
  font-size: 8px;
}

.custom-command-copy code {
  margin-top: 3px;
  color: #6ee7b7;
  font-size: 7px;
}

.custom-command-copy small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 6px;
}

.custom-command-item > button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 8px;
}

.custom-command-item > button:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}

/* Profile and authenticated client workspace */
.profile-scroll,
.client-detail-scroll {
  width: 100%;
  height: 100%;
  overflow: hidden auto;
  padding: 28px clamp(22px, 3.5vw, 48px) 42px;
}

.profile-scroll::-webkit-scrollbar,
.client-detail-scroll::-webkit-scrollbar {
  width: 6px;
}

.profile-scroll::-webkit-scrollbar-thumb,
.client-detail-scroll::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.17);
}

.subpage-heading {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.subpage-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  overflow: visible;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  transition: color var(--ease);
}

.subpage-back:hover {
  color: var(--blue-bright);
}

.subpage-back i {
  font-size: 9px;
}

.subpage-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-bright);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subpage-heading h1 {
  margin: 0;
  font-size: clamp(23px, 2.5vw, 32px);
  letter-spacing: -0.045em;
}

.subpage-heading p {
  max-width: 620px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.profile-layout {
  display: grid;
  max-width: 1120px;
  gap: 16px;
  margin: 0 auto;
}

.profile-hero-card,
.profile-info-card,
.session-security-card,
.client-control-hero,
.remote-actions-panel,
.client-activity-panel {
  border: 1px solid var(--border);
  border-radius: 17px;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(17, 28, 49, 0.76));
  box-shadow:
    0 18px 42px rgba(2, 6, 23, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.025);
}

.profile-hero-card {
  position: relative;
  display: flex;
  min-height: 205px;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  padding: 27px;
}

.profile-hero-card::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(96, 165, 250, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 48px rgba(59, 130, 246, 0.025),
    0 0 0 96px rgba(59, 130, 246, 0.018);
}

.profile-avatar-large {
  position: relative;
  z-index: 1;
  display: grid;
  width: 92px;
  height: 92px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.33);
  border-radius: 28px;
  background: linear-gradient(145deg, #1d4ed8, #3b82f6);
  box-shadow:
    0 19px 38px rgba(37, 99, 235, 0.25),
    inset 0 1px rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.profile-identity {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.profile-auth-chip {
  display: inline-flex;
  height: 24px;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 0 8px;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 7px;
  background: rgba(34, 197, 94, 0.06);
  color: #86efac;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-identity h2 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -0.04em;
}

.profile-identity p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 10px;
}

.profile-role {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.05);
  color: #cbd5e1;
  font-size: 8px;
  font-weight: 600;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-info-card {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 17px;
}

.profile-card-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  font-size: 12px;
}

.profile-card-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue-bright);
}

.profile-card-icon.green {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.profile-card-icon.violet {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
}

.profile-card-icon.cyan {
  background: rgba(6, 182, 212, 0.1);
  color: #22d3ee;
}

.profile-info-card small,
.profile-info-card strong,
.profile-info-card p {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info-card small {
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-info-card strong {
  color: #e2e8f0;
  font-size: 10px;
  white-space: nowrap;
}

.profile-info-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.session-security-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 19px;
}

.session-shield {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.07);
  color: #4ade80;
  font-size: 16px;
}

.session-security-card > div:nth-child(2) > span {
  display: block;
  margin-bottom: 4px;
  color: #4ade80;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.session-security-card h3 {
  margin: 0;
  font-size: 11px;
}

.session-security-card p {
  max-width: 660px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.session-security-card > a,
.session-security-card > button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 9px;
  background: rgba(239, 68, 68, 0.06);
  color: #fca5a5;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
}

.client-detail-heading,
.client-detail-content {
  max-width: 1280px;
}

.client-detail-content {
  display: grid;
  gap: 14px;
  margin: 0 auto;
}

.device-geo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--surface, #1a1a2e);
  border: 1px solid var(--border, #2a2a4a);
  border-bottom: none;
  border-radius: 17px 17px 0 0;
  font-size: 12px;
}

.device-geo-flag {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.device-geo-flag-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  font-size: 12px;
  color: var(--text-dim, #666);
  flex-shrink: 0;
}

.device-geo-country {
  font-weight: 600;
  color: var(--text, #e0e0e0);
}

.device-geo-sep {
  color: var(--text-dim, #666);
}

.device-geo-city {
  color: var(--text-dim, #888);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-geo-ip {
  color: var(--text-dim, #888);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}

.device-geo-bar + .client-control-hero {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.client-control-hero {
  position: relative;
  display: grid;
  min-width: 0;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  overflow: hidden;
  padding: 19px;
}

.client-record-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.client-record-actions .server-btn {
  min-width: 112px;
  padding: 0 12px;
  font-size: 10px;
}

.client-record-actions .server-btn.danger {
  border-color: rgba(239, 68, 68, 0.32);
  color: #fca5a5;
}

.client-record-actions .server-btn.danger:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.62);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

.client-record-actions .server-btn.success {
  border-color: rgba(34, 197, 94, 0.32);
  color: #86efac;
}

.client-record-actions .server-btn.success:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.62);
  background: rgba(34, 197, 94, 0.1);
  color: #bbf7d0;
}

.enrollment-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--card) 76%, transparent);
}

.enrollment-panel > div {
  display: grid;
  gap: 3px;
}

.enrollment-panel strong { font-size: 10px; }
.enrollment-panel small { color: var(--muted); font-size: 8px; }
.enrollment-panel input {
  grid-column: 1 / -1;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
}

.client-control-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--client-status, var(--blue));
}

.client-control-hero-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 12px;
}

.client-hero-avatar {
  flex-shrink: 0;
  width: 46px;
  height: 76px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #0a0f1a;
  border: 1px solid var(--border);
}

.client-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-hero-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #22c55e;
  font-size: 18px;
}

.client-hero-lock.locked {
  background: rgba(0, 0, 0, 0.45);
  color: #ef4444;
}

.client-hero-back {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
}

.client-hero-back:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.client-hero-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  background: rgba(11, 17, 32, 0.4);
  color: var(--text-primary, #e2e8f0);
  font-size: 9px;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-hero-chip small {
  color: #94a3b8;
  font-size: 7px;
  text-transform: uppercase;
}

.client-hero-chip i {
  color: var(--client-status, var(--blue));
  font-size: 8px;
}

.client-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}

.client-hero-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.5);
  color: rgba(148, 163, 184, 0.8);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s;
  line-height: 1;
}

.client-hero-btn span {
  font-size: 10px;
  white-space: nowrap;
}

.client-hero-btn:hover {
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.client-hero-btn.warning {
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.client-hero-btn.success {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.3);
}

.client-hero-btn.danger {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.client-hero-btn.danger:hover {
  color: #fecaca;
}

.client-control-avatar {
  position: relative;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--client-status) 35%, transparent);
  border-radius: 20px;
  background: color-mix(in srgb, var(--client-status) 12%, transparent);
  color: color-mix(in srgb, var(--client-status) 70%, white);
  font-size: 19px;
  font-weight: 800;
  overflow: hidden;
}

.client-control-avatar.has-wallpaper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-lock-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  pointer-events: none;
}

.client-lock-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-control-identity {
  min-width: 0;
}

.client-control-status {
  display: inline-flex;
  height: 22px;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--client-status) 24%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--client-status) 8%, transparent);
  color: color-mix(in srgb, var(--client-status) 68%, white);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-control-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--client-status);
}

.client-control-identity h2 {
  margin: 0;
  overflow: hidden;
  font-size: 17px;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-control-identity p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.client-control-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 9px;
}

.client-control-meta > span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(11, 17, 32, 0.3);
}

.client-control-meta small,
.client-control-meta strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-control-meta small {
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 6px;
  font-weight: 700;
  text-transform: uppercase;
}

.client-control-meta strong {
  color: #dbeafe;
  font-size: 8px;
}

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

.client-metric-grid article {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(30, 41, 59, 0.54);
}

.client-metric-grid article > i {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: rgba(59, 130, 246, 0.09);
  color: var(--blue-bright);
  font-size: 10px;
}

.client-metric-grid strong,
.client-metric-grid small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-metric-grid strong {
  margin-bottom: 4px;
  color: #e2e8f0;
  font-size: 10px;
}

.client-metric-grid small {
  color: var(--muted);
  font-size: 7px;
}

.client-control-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 14px;
}

.remote-actions-panel,
.client-activity-panel {
  padding: 18px;
}

.remote-actions-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.remote-actions-panel header span:first-child,
.client-activity-panel header span {
  display: block;
  margin-bottom: 5px;
  color: #4ade80;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.remote-actions-panel h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.remote-actions-panel header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.simulation-badge {
  display: inline-flex !important;
  height: 25px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  padding: 0 8px;
  border: 1px solid rgba(250, 204, 21, 0.14);
  border-radius: 7px;
  background: rgba(250, 204, 21, 0.05);
  color: #fde047 !important;
  font-size: 6px !important;
  letter-spacing: 0.05em !important;
}

.remote-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.remote-action-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 66px;
  place-items: center;
  align-content: center;
  gap: 5px;
  overflow: hidden;
  padding: 8px 6px;
  border: 1px solid rgba(96, 165, 250, 0.08);
  border-radius: 10px;
  background: rgba(18, 34, 57, 0.86);
  color: #b6e6d3;
  cursor: pointer;
  transition:
    transform var(--ease),
    border-color var(--ease),
    background var(--ease),
    box-shadow var(--ease);
}

.remote-action-card:hover {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(24, 52, 67, 0.9);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
  transform: translateY(-2px);
}

.remote-action-card > i {
  font-size: 14px;
}

.remote-action-card > img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.remote-action-card strong {
  overflow: hidden;
  width: 100%;
  font-size: 7px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remote-action-card span {
  color: #668a82;
  font-size: 5px;
  font-weight: 700;
  text-transform: uppercase;
}

.remote-action-card.is-danger {
  border-color: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.remote-action-card.is-danger:hover {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(69, 10, 10, 0.24);
}

.remote-action-card.opens-screen-window::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #475569;
  box-shadow: 0 0 0 3px rgba(71, 85, 105, 0.08);
}

.remote-action-card.opens-screen-window.is-window-open {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.1);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.06);
}

.remote-action-card.opens-screen-window.is-window-open::after {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.remote-action-card.opens-screen-window.is-window-open span {
  color: #6ee7b7;
}

.client-activity-panel > header {
  margin-bottom: 15px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.client-activity-panel header strong {
  font-size: 13px;
}

.activity-timeline {
  display: grid;
  gap: 2px;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 0;
}

.activity-item + .activity-item::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 14px;
  width: 1px;
  height: 8px;
  background: var(--border-strong);
}

.activity-item > i {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--blue-bright);
  font-size: 8px;
}

.activity-item > img {
  width: 29px;
  height: 29px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.08);
  object-fit: cover;
}

.activity-item.is-new > i {
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
}

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

.activity-item strong {
  overflow: hidden;
  color: #dbe4f0;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 6px;
}

.client-safety-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin-top: 16px;
  padding: 11px;
  border: 1px solid rgba(34, 197, 94, 0.11);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.04);
}

.client-safety-card > i {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  font-size: 10px;
}

.client-safety-card strong,
.client-safety-card small {
  display: block;
}

.client-safety-card strong {
  margin-bottom: 4px;
  font-size: 8px;
}

.client-safety-card small {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
}

.command-dialog-backdrop {
  position: absolute;
  z-index: 1800;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--ease);
}

.command-dialog-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.command-dialog {
  width: min(390px, 100%);
  padding: 23px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.56);
  text-align: center;
  transform: translateY(10px) scale(0.97);
  transition: transform var(--ease);
}

.command-dialog-backdrop.is-visible .command-dialog {
  transform: none;
}

.command-dialog-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 13px;
  place-items: center;
  border: 1px solid rgba(74, 222, 128, 0.18);
  border-radius: 15px;
  background: rgba(34, 197, 94, 0.07);
  color: #4ade80;
  font-size: 17px;
}

.command-dialog-kicker {
  display: block;
  margin-bottom: 5px;
  color: #4ade80;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.command-dialog h2 {
  margin: 0;
  font-size: 17px;
}

.command-dialog > p {
  margin: 8px auto 14px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.command-safety-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.48);
  color: var(--muted);
  font-size: 7px;
  text-align: left;
}

.command-safety-note i {
  color: var(--blue-bright);
}

.command-payload-preview {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 9px;
  background: #07111b;
  text-align: left;
}

.command-payload-preview > span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.08);
  color: #6ee7b7;
  font-size: 6px;
  font-weight: 700;
}

.command-payload-preview pre {
  max-height: 150px;
  padding: 9px;
  font-size: 7px;
  line-height: 1.55;
}

.command-dialog-icon img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
}

.command-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 8px;
  margin-top: 16px;
}

.command-dialog-actions button {
  position: relative;
  height: 37px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.7);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.command-dialog-actions button:last-child {
  border-color: rgba(59, 130, 246, 0.32);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
}

.command-dialog-actions button.is-danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

/* Assisted screen workspace (safe visual simulation) */
.screen-console-backdrop {
  position: absolute;
  z-index: 1760;
  inset: 0;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  padding: 14px;
  background:
    radial-gradient(circle at 50% 15%, rgba(16, 185, 129, 0.08), transparent 34%),
    rgba(3, 10, 18, 0.9);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(9px);
  transition:
    opacity var(--ease),
    visibility var(--ease);
}

.screen-console-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.screen-console {
  position: relative;
  display: grid;
  width: min(1120px, 100%);
  height: min(860px, 100%);
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 19px;
  background:
    linear-gradient(180deg, rgba(4, 22, 18, 0.96), rgba(4, 12, 21, 0.99) 13%),
    #07111c;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.54),
    inset 0 1px rgba(255, 255, 255, 0.02);
  transform: translateY(12px) scale(0.985);
  transition: transform 280ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.screen-console-backdrop.is-visible .screen-console {
  transform: none;
}

.screen-console-header {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 15px 12px 20px;
  border-bottom: 1px solid rgba(52, 211, 153, 0.11);
  background: rgba(2, 25, 20, 0.78);
}

.screen-console-heading > span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #34d399;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.screen-console-heading h2 {
  margin: 0;
  color: #d7f7e8;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.screen-console-heading p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 3px 0 0;
  color: #60857b;
  font-size: 11px;
}

.screen-console-heading p strong {
  color: #84a99d;
  font-weight: 600;
}

.screen-console-heading p i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #3d665b;
}

.screen-console-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.screen-simulation-pill {
  display: inline-flex;
  height: 27px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(250, 204, 21, 0.15);
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.055);
  color: #fde047;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.screen-session-toggle,
.screen-console-close {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background var(--ease),
    color var(--ease),
    transform var(--ease);
}

.screen-session-toggle {
  background: #10db92;
  box-shadow: 0 7px 22px rgba(16, 219, 146, 0.2);
  color: #032d20;
}

.screen-session-toggle:hover {
  background: #34e7aa;
  transform: translateY(-1px);
}

.screen-session-toggle.is-running {
  border-color: rgba(250, 204, 21, 0.22);
  background: rgba(250, 204, 21, 0.1);
  box-shadow: none;
  color: #fde047;
}

.screen-console-close {
  border-color: rgba(148, 163, 184, 0.09);
  background: #122034;
  color: #74879d;
}

.screen-console-close:hover {
  background: #1a2b42;
  color: #e2e8f0;
}

.screen-console-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 54px minmax(320px, 1fr) 224px;
  gap: 16px;
  padding: 13px;
  overflow: hidden;
}

.screen-tools {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 6px;
  padding: 7px;
  overflow: hidden auto;
  border: 1px solid rgba(148, 163, 184, 0.07);
  border-radius: 13px;
  background: rgba(8, 19, 31, 0.82);
}

.screen-tools::-webkit-scrollbar {
  width: 0;
}

.screen-tools button {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(134, 239, 172, 0.09);
  border-radius: 9px;
  background: rgba(12, 25, 38, 0.96);
  color: #89baa9;
  cursor: pointer;
  transition:
    border-color var(--ease),
    background var(--ease),
    color var(--ease),
    transform var(--ease);
}

.screen-tools button span {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.screen-tools button:hover,
.screen-tools button.is-active {
  border-color: rgba(52, 211, 153, 0.33);
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  transform: translateX(1px);
}

.screen-tools-divider {
  height: 1px;
  margin: 4px 6px;
  background: rgba(148, 163, 184, 0.15);
  flex-shrink: 0;
}

.screen-tools-lock-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.screen-tools-lock-group button:hover {
  border-color: rgba(250, 204, 21, 0.33);
  background: rgba(250, 204, 21, 0.1);
  color: #facc15;
}

.blackscreen-preset-panel {
  display: none;
  flex-direction: column;
  min-width: 200px;
  max-width: 240px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.12);
  gap: 8px;
  overflow-y: auto;
}

.blackscreen-preset-panel.open {
  display: flex;
}

.screen-console-body:has(.blackscreen-preset-panel.open) {
  grid-template-columns: 54px minmax(320px, 1fr) 224px 220px;
}

.blackscreen-preset-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.blackscreen-preset-header button {
  background: none;
  border: none;
  color: var(--text-muted, rgba(148, 163, 184, 0.6));
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
}

.blackscreen-preset-header button:hover {
  color: var(--text-primary, #e2e8f0);
  background: rgba(148, 163, 184, 0.1);
}

.blackscreen-preset-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blackscreen-preset-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
  cursor: pointer;
}

.blackscreen-preset-mode-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.blackscreen-preset-mode-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 10px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-muted, rgba(148, 163, 184, 0.6));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s;
  white-space: nowrap;
}

.blackscreen-preset-mode-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary, #e2e8f0);
}

.blackscreen-preset-mode-btn.active {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.3);
  color: #facc15;
}

.blackscreen-oval-link-btn {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  color: var(--text-secondary, #94a3b8);
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.blackscreen-oval-link-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary, #e2e8f0);
}

.blackscreen-oval-link-btn.active {
  background: rgba(52, 217, 253, 0.12);
  border-color: rgba(52, 217, 253, 0.3);
  color: #34d9fd;
}

.blackscreen-preset-custom-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blackscreen-preset-toggle input {
  width: 14px;
  height: 14px;
  accent-color: #facc15;
}

.blackscreen-preset-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.blackscreen-preset-field label {
  font-size: 10px;
  color: var(--text-muted, rgba(148, 163, 184, 0.6));
  font-weight: 500;
}

.blackscreen-preset-field label small {
  opacity: 0.6;
  font-weight: 400;
}

.blackscreen-preset-field input[type="text"],
.blackscreen-preset-field textarea {
  width: 100%;
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary, #e2e8f0);
  resize: none;
}

.blackscreen-preset-field input[type="text"]:focus,
.blackscreen-preset-field textarea:focus {
  outline: none;
  border-color: rgba(250, 204, 21, 0.4);
}

.blackscreen-preset-image-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blackscreen-preset-facial-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.blackscreen-preset-facial-fields .blackscreen-preset-field {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blackscreen-preset-facial-fields .blackscreen-preset-field label {
  flex: 0 0 auto;
  min-width: 120px;
}

.blackscreen-preset-facial-fields input[type="range"] {
  flex: 1 1 auto;
  min-width: 80px;
  accent-color: #facc15;
}

.blackscreen-preset-facial-fields span[data-oval-width-value],
.blackscreen-preset-facial-fields span[data-oval-height-value] {
  flex: 0 0 auto;
  font-size: 11px;
  color: #facc15;
  min-width: 36px;
  text-align: right;
}

.blackscreen-contrast-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0;
}

.blackscreen-contrast-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blackscreen-contrast-row input[type="range"] {
  flex: 1 1 auto;
  accent-color: #facc15;
}

.blackscreen-contrast-row span[data-contrast-value] {
  flex: 0 0 auto;
  font-size: 11px;
  color: #facc15;
  min-width: 36px;
  text-align: right;
}

.blackscreen-bg-remove-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.blackscreen-bg-remove-field > label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  cursor: pointer;
}

.blackscreen-bg-remove-field > label input[type="checkbox"] {
  accent-color: #facc15;
  width: 14px;
  height: 14px;
}

.blackscreen-bg-remove-tolerance {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 20px;
}

.blackscreen-bg-remove-tolerance label {
  font-size: 10px;
  color: var(--text-muted, rgba(148, 163, 184, 0.6));
}

.blackscreen-bg-remove-tolerance .blackscreen-contrast-row span[data-bg-tolerance-value] {
  color: #facc15;
}

.blackscreen-preset-image-row input[type="file"] {
  font-size: 10px;
  flex: 1;
  min-width: 0;
}

.blackscreen-preset-thumb {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #0f172a;
  flex-shrink: 0;
  filter: brightness(0.9) contrast(1.1);
}

.blackscreen-preset-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.blackscreen-preset-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s;
}

.blackscreen-preset-btn:hover {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-primary, #e2e8f0);
}

.blackscreen-preset-btn.primary {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.25);
  color: #facc15;
}

.blackscreen-preset-btn.primary:hover {
  background: rgba(250, 204, 21, 0.2);
}

.blackscreen-preset-btn.saved {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.blackscreen-preset-btn.dirty {
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250, 204, 21, 0.3);
  color: #facc15;
  animation: pulse-dirty 1.5s ease-in-out infinite;
}

@keyframes pulse-dirty {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.blackscreen-preset-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.blackscreen-quick-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  text-align: left;
}

.blackscreen-quick-btn i {
  font-size: 14px;
  color: #38bdf8;
}

.blackscreen-quick-btn:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.3);
  color: var(--text-primary, #e2e8f0);
}

.blackscreen-quick-btn:hover i {
  animation: fingerprint-pulse 0.8s ease-in-out infinite;
}

.blackscreen-quick-item {
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
}

.blackscreen-quick-item .blackscreen-quick-btn {
  flex: 1;
}

.blackscreen-quick-item.selected .blackscreen-quick-btn {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--text-primary, #e2e8f0);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.blackscreen-quick-edit,
.blackscreen-quick-delete {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(148, 163, 184, 0.5);
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s;
}

.blackscreen-quick-edit:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.blackscreen-quick-delete:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.blackscreen-preset-icon-select {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
  cursor: pointer;
}

.blackscreen-preset-icon-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blackscreen-preset-icon-preview {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.05);
  color: #38bdf8;
  font-size: 14px;
}

.blackscreen-quick-activate {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(148, 163, 184, 0.5);
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s;
}

.blackscreen-quick-activate:hover {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

@keyframes fingerprint-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

.fingerprint-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.fingerprint-preview-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 48px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.1);
}

.fingerprint-preview-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 6px;
}

.fingerprint-preview-close:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.1);
}

.fingerprint-preview-icon {
  margin-bottom: 8px;
}

.fingerprint-preview-icon .fp-arc {
  animation: fp-arc-draw 1.2s ease-in-out infinite;
}

.fingerprint-preview-icon .fp-arc-1 { animation-delay: 0s; }
.fingerprint-preview-icon .fp-arc-2 { animation-delay: 0.1s; }
.fingerprint-preview-icon .fp-arc-3 { animation-delay: 0.2s; }
.fingerprint-preview-icon .fp-arc-4 { animation-delay: 0.3s; }
.fingerprint-preview-icon .fp-arc-5 { animation-delay: 0.05s; }
.fingerprint-preview-icon .fp-arc-6 { animation-delay: 0.15s; }
.fingerprint-preview-icon .fp-arc-7 { animation-delay: 0.25s; }
.fingerprint-preview-icon .fp-arc-8 { animation-delay: 0.35s; }

@keyframes fp-arc-draw {
  0% { opacity: 0.3; stroke-width: 1.5; }
  50% { opacity: 1; stroke-width: 3; }
  100% { opacity: 0.3; stroke-width: 1.5; }
}

.fingerprint-preview-title {
  font-size: 18px;
  font-weight: 600;
  color: #f1f5f9;
  text-align: center;
}

.fingerprint-preview-text {
  font-size: 14px;
  color: rgba(148, 163, 184, 0.8);
  text-align: center;
}

.fingerprint-preview-dots {
  font-size: 24px;
  color: #38bdf8;
  letter-spacing: 4px;
  margin-top: 4px;
}

.fingerprint-preview-dots span {
  opacity: 0.2;
  transition: opacity 0.2s;
}

.device-workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 24px minmax(0, 1fr) 42px;
  gap: 8px;
  overflow: hidden;
}

.device-range-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 7px;
  width: min(430px, 100%);
  margin: 0 auto;
  color: #4d6f68;
  font-size: 6px;
}

.device-range-row input {
  width: 100%;
  height: 3px;
  border-radius: 5px;
  outline: none;
  accent-color: #25d99a;
  cursor: pointer;
}

.device-range-row output {
  color: #66847d;
  font-size: 6px;
  text-align: right;
}

.device-frame {
  --device-scale: 1;
  --device-aspect: 9 / 19.5;
  position: relative;
  display: grid;
  width: min(430px, 100%);
  height: auto;
  aspect-ratio: var(--device-aspect);
  max-height: 100%;
  grid-template-rows: minmax(0, 1fr) 29px;
  justify-self: center;
  overflow: hidden;
  border: none;
  border-radius: 12px;
  background: #020407;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  transform: scale(var(--device-scale));
  transform-origin: top center;
  transition: transform var(--ease);
}

.device-camera {
  display: none;
}

.device-screen {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: none;
  border-radius: 0;
  background: #020407;
}

.device-screen::before {
  display: none;
}

.device-status-bar {
  position: relative;
  z-index: 2;
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: #769a91;
  font-size: 6px;
}

.device-status-bar span:last-child {
  display: flex;
  align-items: center;
  gap: 5px;
}

.device-screen-content {
  position: relative;
  z-index: 2;
  display: grid;
  height: calc(100% - 28px);
  place-items: center;
  align-content: center;
  padding: 22px;
  text-align: center;
}

.device-secure-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 17px;
  background: rgba(16, 185, 129, 0.06);
  box-shadow: 0 15px 44px rgba(16, 185, 129, 0.06);
  color: #4c756b;
  font-size: 17px;
}

.device-screen-content > small {
  color: #3e6a5f;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.device-screen-content h3 {
  margin: 7px 0 0;
  color: #aecbc2;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.device-screen-content p {
  max-width: 260px;
  margin: 8px 0 0;
  color: #526c67;
  font-size: 7px;
  line-height: 1.55;
}

.device-demo-cards {
  display: grid;
  width: min(240px, 90%);
  grid-template-columns: 1.25fr 0.75fr;
  gap: 6px;
  margin-top: 20px;
  opacity: 0.25;
  transform: translateY(8px);
  transition:
    opacity 400ms ease,
    transform 400ms ease;
}

.device-demo-cards span {
  display: block;
  height: 30px;
  border: 1px solid rgba(52, 211, 153, 0.11);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(59, 130, 246, 0.04));
}

.device-demo-cards span:first-child {
  grid-row: span 2;
  height: auto;
}

.screen-console.is-running .device-secure-icon {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.11);
  color: #6ee7b7;
  animation: screen-secure-pulse 2.4s ease-in-out infinite;
}

.screen-console.is-running .device-demo-cards {
  opacity: 0.75;
  transform: none;
}

.device-privacy-layer {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  background:
    repeating-linear-gradient(135deg, rgba(16, 185, 129, 0.02) 0 8px, transparent 8px 16px),
    rgba(1, 5, 9, 0.96);
  color: #47685f;
  opacity: 0;
  visibility: hidden;
  transition: all var(--ease);
}

.device-privacy-layer i {
  margin-bottom: 5px;
  color: #6ee7b7;
  font-size: 22px;
}

.device-privacy-layer strong {
  color: #c6e2d9;
  font-size: 11px;
}

.device-privacy-layer span {
  font-size: 7px;
}

.screen-console.is-private .device-privacy-layer {
  opacity: 1;
  visibility: visible;
}

.device-navigation {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 54px;
  color: #6a9286;
  font-size: 9px;
}

.device-navigation button {
  background: none;
  border: none;
  color: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.device-navigation button:hover {
  background: color-mix(in srgb, var(--theme-accent, #2bb673) 12%, transparent);
  color: var(--theme-accent, #2bb673);
}

.device-navigation button.is-active {
  color: var(--theme-accent, #2bb673);
}

.device-navigation button:nth-child(2) {
  font-size: 12px;
}

.screen-text-form {
  display: grid;
  width: min(430px, 100%);
  grid-template-columns: minmax(0, 1fr) 39px;
  align-items: center;
  gap: 7px;
  justify-self: center;
}

.screen-text-form input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 20px;
  outline: none;
  background: rgba(10, 18, 29, 0.98);
  color: #d8e9e3;
  font-family: inherit;
  font-size: 8px;
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}

.screen-text-form input:focus {
  border-color: rgba(52, 211, 153, 0.36);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.07);
}

.screen-text-form input::placeholder {
  color: #45556a;
}

.screen-text-form button {
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: #0ee39a;
  box-shadow: 0 7px 22px rgba(14, 227, 154, 0.24);
  color: #042c20;
  cursor: pointer;
  transition:
    transform var(--ease),
    background var(--ease);
}

.screen-text-form button:hover {
  background: #3aebb1;
  transform: translateY(-1px);
}

.screen-session-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 11px;
  overflow: hidden auto;
  padding: 13px;
  border: 1px solid rgba(148, 163, 184, 0.07);
  border-radius: 14px;
  background: rgba(8, 19, 31, 0.76);
}

.screen-session-panel::-webkit-scrollbar {
  width: 3px;
}

.screen-session-panel::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.14);
}

.screen-session-client {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.screen-client-monogram {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.07);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 800;
}

.screen-session-client small,
.screen-session-client strong,
.screen-session-client div > span {
  display: block;
}

.screen-session-client small {
  margin-bottom: 3px;
  color: #53697b;
  font-size: 6px;
}

.screen-session-client strong {
  overflow: hidden;
  color: #d4e7e0;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-session-client div > span {
  margin-top: 5px;
  color: #66877f;
  font-size: 6px;
}

.screen-session-client div > span i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: #64748b;
}

.screen-console.is-running .screen-session-client div > span {
  color: #6ee7b7;
}

.screen-console.is-running .screen-session-client div > span i {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.screen-session-summary {
  display: grid;
  gap: 6px;
}

.screen-session-summary > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(148, 163, 184, 0.06);
  border-radius: 8px;
  background: rgba(13, 27, 41, 0.65);
}

.screen-session-summary small {
  color: #53697b;
  font-size: 6px;
}

.screen-session-summary strong {
  color: #a8c9be;
  font-size: 6px;
  font-weight: 700;
}

.screen-consent-card {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(250, 204, 21, 0.1);
  border-radius: 10px;
  background: rgba(250, 204, 21, 0.035);
}

.screen-consent-card > i {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.07);
  color: #fde047;
  font-size: 10px;
}

.screen-consent-card strong {
  display: block;
  color: #e8dca0;
  font-size: 7px;
}

.screen-consent-card p {
  margin: 4px 0 0;
  color: #766e4c;
  font-size: 6px;
  line-height: 1.5;
}

.screen-session-log {
  margin-top: auto;
  padding-top: 4px;
}

.screen-session-log > span {
  display: block;
  margin-bottom: 8px;
  color: #4b625f;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.screen-session-log p {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.05);
  color: #718981;
  font-size: 6px;
}

.screen-session-log p i {
  width: 12px;
  color: #4e8878;
  text-align: center;
}

.screen-console.is-running [data-screen-live-log],
.screen-console.is-running [data-screen-live-log] i {
  color: #6ee7b7;
}

.screen-console-footer {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 18px;
  border-top: 1px solid rgba(52, 211, 153, 0.07);
  background: rgba(2, 14, 18, 0.76);
  color: #4f6f68;
  font-size: 6px;
}

.screen-console-footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.screen-console-footer strong {
  color: #5c7c75;
  font-size: 6px;
  letter-spacing: 0.08em;
}

@keyframes screen-secure-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.05);
  }
  50% {
    box-shadow: 0 0 0 9px rgba(52, 211, 153, 0);
  }
}

/* Leaflet visual system */
.leaflet-container {
  background: #0c1629;
  font-family: "Newscrash", sans-serif;
}

.leaflet-tile-pane {
  filter: invert(100%) hue-rotate(180deg) brightness(72%) contrast(112%)
    saturate(65%);
}

.leaflet-control-container .leaflet-control-zoom {
  display: none;
}

.leaflet-control-attribution {
  margin: 0 10px 9px 0 !important;
  padding: 3px 7px !important;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.68) !important;
  color: #64748b !important;
  font-size: 7px !important;
  backdrop-filter: blur(8px);
}

.leaflet-control-attribution a {
  color: #8292aa !important;
}

.client-div-icon {
  border: 0 !important;
  background: transparent !important;
}

.marker-pin {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px 12px 12px 3px;
  box-shadow:
    0 10px 22px rgba(2, 6, 23, 0.5),
    inset 0 1px rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 12px;
  transform: rotate(-45deg) scale(0);
  transform-origin: 50% 100%;
  animation: marker-pop 520ms cubic-bezier(0.2, 0.85, 0.25, 1.35) forwards;
  animation-delay: var(--delay, 0ms);
  transition:
    filter var(--ease),
    box-shadow var(--ease);
}

.marker-pin i {
  transform: rotate(45deg);
}

.marker-pin::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: marker-wave 2.4s ease-out infinite;
  animation-delay: calc(var(--delay, 0ms) + 700ms);
}

.marker-pin.ativo {
  background: var(--green);
  color: rgba(34, 197, 94, 0.45);
}

.marker-pin.pendente {
  background: #eab308;
  color: rgba(250, 204, 21, 0.45);
}

.marker-pin.offline {
  background: var(--red);
  color: rgba(239, 68, 68, 0.42);
}

.marker-pin.premium {
  background: var(--blue);
  color: rgba(59, 130, 246, 0.48);
}

.marker-pin i {
  color: #fff;
}

.leaflet-marker-icon:hover .marker-pin {
  filter: brightness(1.15);
  box-shadow:
    0 13px 28px rgba(2, 6, 23, 0.56),
    0 0 0 5px rgba(255, 255, 255, 0.08);
}

.client-tooltip {
  padding: 7px 9px !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 9px !important;
  background: rgba(15, 23, 42, 0.94) !important;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.38) !important;
  color: var(--text) !important;
  font-family: "Newscrash", sans-serif !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  backdrop-filter: blur(12px);
}

.client-tooltip::before {
  border-top-color: rgba(15, 23, 42, 0.94) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border: 1px solid var(--border-strong);
  background: rgba(15, 23, 42, 0.97);
  color: var(--text);
  box-shadow: 0 22px 56px rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(18px);
}

.leaflet-popup-content-wrapper {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}

.leaflet-popup-content {
  width: 250px !important;
  margin: 0 !important;
  font-family: "Newscrash", sans-serif;
}

.leaflet-popup-close-button {
  top: 9px !important;
  right: 9px !important;
  display: grid !important;
  width: 25px !important;
  height: 25px !important;
  place-items: center;
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.5) !important;
  color: #94a3b8 !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

.popup-card {
  overflow: hidden;
}

.popup-hero {
  position: relative;
  padding: 16px 16px 13px;
  background:
    radial-gradient(circle at 100% 0%, rgba(59, 130, 246, 0.22), transparent 55%),
    rgba(30, 41, 59, 0.68);
  border-bottom: 1px solid var(--border);
}

.popup-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--popup-color, var(--blue));
}

.popup-status {
  display: inline-flex;
  height: 21px;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--popup-color) 28%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--popup-color) 10%, transparent);
  color: color-mix(in srgb, var(--popup-color) 75%, white);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popup-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--popup-color);
}

.popup-hero h3 {
  margin: 0;
  color: white;
  font-size: 15px;
  letter-spacing: -0.03em;
}

.popup-hero p {
  margin: 5px 0 0;
  color: #94a3b8;
  font-size: 8px;
}

.popup-body {
  padding: 12px 16px 15px;
}

.popup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.popup-detail span,
.popup-detail strong {
  display: block;
}

.popup-detail span {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.popup-detail strong {
  overflow: hidden;
  color: #e2e8f0;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popup-updated {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: #64748b;
  font-size: 7px;
}

.popup-updated i {
  color: #94a3b8;
}

.popup-action {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  color: white;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

@keyframes boot-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes boot-load {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(280%);
  }
}

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

@keyframes skeleton-sweep {
  from {
    transform: translateX(-170%);
  }
  to {
    transform: translateX(430%);
  }
}

@keyframes marker-pop {
  0% {
    opacity: 0;
    transform: rotate(-45deg) translateY(-14px) scale(0);
  }
  65% {
    opacity: 1;
    transform: rotate(-45deg) translateY(2px) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: rotate(-45deg) translateY(0) scale(1);
  }
}

@keyframes marker-wave {
  0% {
    opacity: 0.45;
    transform: scale(0.65);
  }
  65%,
  100% {
    opacity: 0;
    transform: scale(1.55);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: scale(3.2);
  }
}

@keyframes settings-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes server-breathe {
  0%,
  100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes server-radar {
  0% {
    opacity: 0.65;
    transform: scale(0.76);
  }
  70%,
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

@media (max-width: 1180px) {
  :root {
    --left-width: 220px;
    --right-width: 288px;
  }

  .topbar {
    grid-template-columns: var(--left-width) minmax(135px, 0.85fr) minmax(
        230px,
        400px
      ) auto;
  }

  .action-btn span {
    display: none;
  }

  .action-btn {
    width: 40px;
    padding: 0;
  }

  .panel-scroll {
    min-width: var(--right-width);
    padding-right: 14px;
    padding-left: 14px;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }

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

  .client-control-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .screen-console-body {
    grid-template-columns: 54px minmax(300px, 1fr) 205px;
    gap: 11px;
  }
}

@media (max-width: 940px) {
  :root {
    --left-width: 82px;
  }

  .topbar {
    grid-template-columns: var(--left-width) minmax(0, 1fr) minmax(210px, 370px) auto;
  }

  .brand-copy,
  .sidebar-section-label,
  .nav-item span,
  .nav-badge,
  .sync-card,
  .collapse-left span {
    display: none;
  }

  .brand-block {
    justify-content: center;
    padding: 0;
  }

  .left-sidebar {
    padding-right: 13px;
    padding-left: 13px;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item > i {
    width: auto;
  }

  .right-panel {
    width: 278px;
  }

  .app-body {
    grid-template-columns: var(--left-width) minmax(0, 1fr) 278px;
  }

  .panel-scroll {
    min-width: 278px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .connection-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
    align-items: start;
  }

  .delete-confirm:not(.is-visible) {
    display: none;
  }

  .client-control-layout {
    grid-template-columns: 1fr;
  }

  .client-activity-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.6fr);
    gap: 15px;
  }

  .client-activity-panel > header {
    grid-column: 1 / -1;
  }

  .client-safety-card {
    margin-top: 0;
  }

  .screen-console-body {
    grid-template-columns: 54px minmax(300px, 1fr);
  }

  .screen-session-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 66px;
    --left-width: 244px;
  }

  .app-shell {
    min-height: 480px;
  }

  .topbar,
  .app-shell.left-collapsed .topbar {
    grid-template-columns: auto auto minmax(140px, 1fr) auto;
    gap: 9px;
    padding: 0 10px;
  }

  .menu-toggle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: rgba(30, 41, 59, 0.68);
    color: var(--muted);
    cursor: pointer;
  }

  .brand-block {
    width: auto;
    border-right: 0;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .title-block {
    display: none;
  }

  .top-actions {
    gap: 6px;
  }

  .top-actions .icon-btn:not(.notification-btn),
  .user-avatar {
    display: none;
  }

  .search-shortcut {
    display: none;
  }

  .search-box {
    height: 40px;
  }

  .app-body,
  .app-shell.left-collapsed .app-body,
  .app-shell.right-collapsed .app-body,
  .app-shell.left-collapsed.right-collapsed .app-body {
    display: block;
  }

  .settings-view,
  .device-logs-view {
    width: 100%;
    height: 100%;
  }

  .settings-scroll {
    padding: 21px 15px 34px;
  }

  .settings-heading {
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 17px;
  }

  .settings-back {
    margin-bottom: 17px;
  }

  .settings-heading p {
    max-width: 420px;
  }

  .server-status-badge {
    margin-top: 37px;
  }

  .settings-card {
    padding: 16px;
  }

  .connection-sidebar {
    display: flex;
  }

  .server-field-grid,
  .security-grid {
    grid-template-columns: 1fr;
  }

  .security-grid > span {
    min-height: 65px;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
  }

  .security-grid i {
    grid-row: 1 / 3;
    margin: 0;
  }

  .security-grid small {
    white-space: normal;
  }

  .profile-view,
  .client-detail-view {
    width: 100%;
    height: 100%;
  }

  .profile-scroll,
  .client-detail-scroll {
    padding: 21px 15px 34px;
  }

  .subpage-heading {
    margin-bottom: 16px;
    padding-bottom: 17px;
  }

  .subpage-back {
    margin-bottom: 17px;
  }

  .client-control-hero {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .client-control-avatar {
    width: 58px;
    height: 58px;
    border-radius: 17px;
  }

  .client-control-meta {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .client-activity-panel {
    display: block;
  }

  .client-safety-card {
    margin-top: 16px;
  }

  .remote-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-field-grid {
    grid-template-columns: 1fr;
  }

  .command-icon-palette {
    grid-template-columns: repeat(6, 34px);
  }

  .command-icon-upload {
    grid-column: span 2;
  }

  .screen-console-backdrop {
    padding: 0;
  }

  .screen-console {
    width: 100%;
    height: 100%;
    border-width: 0;
    border-radius: 0;
  }

  .screen-console-body {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    padding: 9px;
  }

  .screen-tools {
    padding: 5px;
  }

  .screen-tools button {
    width: 36px;
    height: 36px;
  }

  .device-frame {
    width: min(380px, 100%);
  }

  .screen-text-form,
  .device-range-row {
    width: min(380px, 100%);
  }

  .left-sidebar {
    position: fixed;
    z-index: 1000;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: min(280px, 84vw);
    padding-top: 17px;
    border-right-color: var(--border-strong);
    box-shadow: 24px 0 58px rgba(2, 6, 23, 0.5);
    transform: translateX(-105%);
  }

  .app-shell.mobile-menu-open .left-sidebar {
    transform: none;
  }

  .sidebar-section-label,
  .nav-item span,
  .nav-badge,
  .sync-card,
  .collapse-left span {
    display: initial;
  }

  .sidebar-section-label {
    display: block;
  }

  .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .nav-item > i {
    width: 20px;
  }

  .collapse-left {
    display: none;
  }

  .right-panel {
    display: none;
  }

  .map-stage {
    width: 100%;
    height: 100%;
  }

  .map-meta {
    display: none;
  }

  .legend {
    bottom: 15px;
    left: 13px;
    width: 160px;
  }

  .map-toolbar {
    top: 13px;
    left: 13px;
  }

  .live-chip {
    top: 13px;
    left: 67px;
  }

  .leaflet-control-attribution {
    margin-bottom: 7px !important;
  }

  .toast-region {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .local-login-submit.is-loading i,
  .remote-actions-panel.is-editing .remote-action-card {
    animation: none;
  }
}

/* Painel administrativo Master ------------------------------------------ */
.master-admin-view {
  position: relative;
  display: none;
  min-width: 0;
  min-height: 0;
  grid-column: 2 / -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 8%, rgba(34, 197, 94, 0.08), transparent 27%),
    radial-gradient(circle at 8% 82%, rgba(16, 185, 129, 0.05), transparent 30%),
    #07100d;
}

.master-admin-view::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 25%, black, transparent 76%);
}

.app-shell.master-admin-open .map-stage,
.app-shell.master-admin-open .right-panel {
  display: none;
}

.app-shell.master-admin-open .master-admin-view {
  display: block;
  animation: settings-enter 320ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.master-admin-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden auto;
  padding: 24px clamp(18px, 3vw, 42px) 48px;
}

.master-admin-scroll::-webkit-scrollbar,
.notification-list::-webkit-scrollbar,
.admin-notification-history > div::-webkit-scrollbar {
  width: 6px;
}

.master-admin-scroll::-webkit-scrollbar-thumb,
.notification-list::-webkit-scrollbar-thumb,
.admin-notification-history > div::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(74, 222, 128, 0.18);
}

.master-admin-heading {
  display: flex;
  max-width: 1400px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.11);
}

.master-admin-heading .subpage-back {
  margin-bottom: 19px;
}

.master-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: #4ade80;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.master-admin-heading h1 {
  margin: 0;
  font-size: clamp(23px, 2.5vw, 33px);
  letter-spacing: -0.045em;
}

.master-admin-heading p {
  margin: 8px 0 0;
  color: #789087;
  font-size: 10px;
}

.master-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-theme-switch {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(74, 222, 128, 0.11);
  border-radius: 9px;
  background: rgba(3, 14, 10, 0.7);
}

.master-theme-switch button {
  display: inline-flex;
  height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 6px;
  background: transparent;
  color: #60796e;
  cursor: pointer;
  font-size: 6px;
  font-weight: 800;
}

.master-theme-switch button.is-active {
  background: rgba(34, 197, 94, 0.11);
  color: #86efac;
}

.master-live-status,
.master-heading-actions > button {
  display: inline-flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid rgba(74, 222, 128, 0.13);
  border-radius: 9px;
  background: rgba(9, 27, 21, 0.72);
  color: #86efac;
  font-size: 7px;
  font-weight: 800;
}

.master-live-status > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.09), 0 0 12px #22c55e;
}

.master-heading-actions > button {
  color: #9fb7ad;
  cursor: pointer;
}

.master-heading-actions > button:hover {
  border-color: rgba(74, 222, 128, 0.3);
  color: #d1fae5;
}

.master-tabs {
  display: flex;
  max-width: 1400px;
  gap: 5px;
  margin: 0 auto 18px;
  padding: 5px;
  border: 1px solid rgba(74, 222, 128, 0.09);
  border-radius: 12px;
  background: rgba(4, 16, 12, 0.68);
}

.master-tabs button {
  display: flex;
  height: 36px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  background: transparent;
  color: #607c70;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}

.master-tabs button.is-active {
  background: rgba(34, 197, 94, 0.1);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.12);
  color: #86efac;
}

.master-admin-content {
  max-width: 1400px;
  margin: 0 auto;
}

.admin-loading-state,
.admin-error-state {
  display: grid;
  min-height: 390px;
  place-items: center;
  align-content: center;
  gap: 9px;
  border: 1px solid rgba(74, 222, 128, 0.08);
  border-radius: 17px;
  background: rgba(5, 17, 13, 0.68);
  color: #789087;
  text-align: center;
}

.admin-loading-state strong,
.admin-error-state strong {
  color: #d1fae5;
  font-size: 11px;
}

.admin-loading-state small,
.admin-error-state span {
  font-size: 8px;
}

.admin-loader {
  display: flex;
  gap: 5px;
  margin-bottom: 5px;
}

.admin-loader i {
  width: 6px;
  height: 19px;
  border-radius: 4px;
  background: #22c55e;
  animation: master-bars 0.8s ease-in-out infinite alternate;
}

.admin-loader i:nth-child(2) {
  animation-delay: 0.16s;
}

.admin-loader i:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes master-bars {
  to {
    opacity: 0.25;
    transform: scaleY(0.45);
  }
}

.admin-error-state > i {
  color: #f87171;
  font-size: 24px;
}

.admin-error-state button {
  height: 34px;
  margin-top: 8px;
  padding: 0 13px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

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

.master-metric {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 15px;
  border: 1px solid rgba(74, 222, 128, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(11, 29, 23, 0.9), rgba(5, 17, 13, 0.91));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.17);
}

.master-metric > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.master-metric.cyan > span {
  background: rgba(34, 211, 238, 0.09);
  color: #67e8f9;
}

.master-metric.violet > span {
  background: rgba(167, 139, 250, 0.09);
  color: #c4b5fd;
}

.master-metric.red > span {
  background: rgba(239, 68, 68, 0.09);
  color: #f87171;
}

.master-metric > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2px 8px;
}

.master-metric small {
  grid-column: 1 / -1;
  color: #70857d;
  font-size: 7px;
  font-weight: 700;
}

.master-metric strong {
  color: #ecfdf5;
  font-size: 20px;
  letter-spacing: -0.04em;
}

.master-metric em {
  padding-bottom: 2px;
  overflow: hidden;
  color: #5e776c;
  font-size: 6px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.65fr);
  gap: 10px;
  margin-top: 10px;
}

.master-card {
  min-width: 0;
  border: 1px solid rgba(74, 222, 128, 0.08);
  border-radius: 15px;
  background: linear-gradient(
    145deg,
    rgba(10, 27, 21, 0.9),
    rgba(5, 17, 13, 0.92)
  );
  box-shadow: 0 17px 38px rgba(0, 0, 0, 0.16);
}

.master-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.08);
}

.master-card > header > span {
  display: grid;
  gap: 4px;
}

.master-card header small,
.admin-section-heading small {
  color: #4ade80;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.master-card header strong {
  color: #d1fae5;
  font-size: 11px;
}

.master-card > header > i {
  color: #4ade80;
}

.master-network-card header button {
  background: transparent;
  color: #4ade80;
  cursor: pointer;
  font-size: 7px;
  font-weight: 800;
}

.master-user-bars {
  display: grid;
  gap: 2px;
  padding: 7px;
}

.master-user-bars > button {
  display: grid;
  min-width: 0;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border-radius: 10px;
  background: transparent;
  color: #d1fae5;
  cursor: pointer;
  text-align: left;
  transition: background var(--ease);
}

.master-user-bars > button:hover {
  background: rgba(34, 197, 94, 0.055);
}

.master-user-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(74, 222, 128, 0.14);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.07);
  color: #86efac;
  font-size: 7px;
  font-weight: 800;
}

.master-user-bar-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.master-user-bar-copy > span {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 10px;
}

.master-user-bar-copy strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-user-bar-copy small {
  flex: 0 0 auto;
  color: #678076;
  font-size: 6px;
}

.master-user-bar-copy > i,
.admin-client-cell > i {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 5px;
  background: rgba(74, 222, 128, 0.08);
}

.master-user-bar-copy > i b,
.admin-client-cell > i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #16a34a, #4ade80);
}

.master-user-bars em {
  color: #4ade80;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  font-style: normal;
  text-align: right;
}

.master-health-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.master-health-ring {
  --health: 0;
  position: relative;
  display: grid;
  width: 128px;
  height: 128px;
  margin: 20px auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(
    #22c55e calc(var(--health) * 1%),
    rgba(74, 222, 128, 0.08) 0
  );
  box-shadow: 0 0 36px rgba(34, 197, 94, 0.08);
}

.master-health-ring::before {
  content: "";
  position: absolute;
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: #07140f;
}

.master-health-ring > span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1px;
  text-align: center;
}

.master-health-ring strong {
  color: #d1fae5;
  font-size: 23px;
}

.master-health-ring small {
  color: #638074;
  font-size: 7px;
  text-transform: uppercase;
}

.master-health-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 16px 15px;
}

.master-health-card dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #789087;
  font-size: 7px;
}

.master-health-card dt {
  display: flex;
  align-items: center;
  gap: 7px;
}

.master-health-card dt i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.master-health-card dt .is-online {
  background: #22c55e;
}

.master-health-card dt .is-offline {
  background: #ef4444;
}

.master-health-card dt .is-notice {
  background: #3b82f6;
}

.master-health-card dd {
  margin: 0;
  color: #d1fae5;
  font-weight: 800;
}

.master-activity-card {
  margin-top: 10px;
}

.master-activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(74, 222, 128, 0.05);
}

.master-activity-list > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 27px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: #07130f;
}

.activity-terminal-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
}

.master-activity-list div > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.master-activity-list strong {
  overflow: hidden;
  color: #ccebdd;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.master-activity-list small {
  color: #60796f;
  font-size: 6px;
}

.master-activity-list code {
  color: #3d6856;
  font-size: 6px;
}

.admin-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.admin-section-heading h2 {
  margin: 5px 0 5px;
  font-size: 18px;
}

.admin-section-heading p {
  margin: 0;
  color: #6f887e;
  font-size: 8px;
}

.admin-primary-btn {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 9px;
  background: linear-gradient(135deg, #15803d, #22c55e);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 8px;
  font-weight: 800;
}

.admin-primary-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

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

.admin-users-toolbar label {
  display: grid;
  width: min(390px, 100%);
  height: 38px;
  grid-template-columns: 35px 1fr;
  align-items: center;
  border: 1px solid rgba(74, 222, 128, 0.1);
  border-radius: 9px;
  background: rgba(5, 17, 13, 0.78);
  color: #567064;
}

.admin-users-toolbar label i {
  text-align: center;
}

.admin-users-toolbar input {
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d1fae5;
  font-size: 8px;
}

.admin-users-toolbar > span {
  color: #62796f;
  font-size: 7px;
}

.admin-user-table {
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.08);
  border-radius: 14px;
  background: rgba(5, 17, 13, 0.83);
}

.admin-user-table-head,
.admin-user-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.25fr) minmax(145px, 0.85fr)
    minmax(145px, 0.8fr) minmax(125px, 0.65fr) 150px;
  align-items: center;
  gap: 12px;
}

.admin-user-table-head {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.08);
  background: rgba(34, 197, 94, 0.025);
  color: #547064;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-row {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.065);
  transition: background var(--ease);
}

.admin-user-row:last-child {
  border-bottom: 0;
}

.admin-user-row:hover {
  background: rgba(34, 197, 94, 0.025);
}

.admin-user-row[hidden] {
  display: none;
}

.admin-user-identity {
  display: grid;
  min-width: 0;
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.admin-user-identity > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(74, 222, 128, 0.13);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.07);
  color: #86efac;
  font-size: 7px;
  font-weight: 800;
}

.admin-user-identity > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-user-identity strong,
.admin-user-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-identity strong {
  color: #d7eee4;
  font-size: 8px;
}

.admin-user-identity small {
  color: #657d73;
  font-size: 6px;
}

.admin-user-identity em {
  width: max-content;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.08);
  color: #93c5fd;
  font-size: 5px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-client-cell,
.admin-server-cell,
.admin-access-cell {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.admin-client-cell > span {
  color: #a7c2b7;
  font-size: 7px;
}

.admin-client-cell > span strong {
  color: #4ade80;
}

.admin-client-cell small,
.admin-server-cell small,
.admin-access-cell small {
  color: #587067;
  font-size: 6px;
}

.admin-server-cell > strong {
  overflow: hidden;
  color: #9cb4aa;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-status-pill {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 5px;
  color: #789087;
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.admin-status-pill > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}

.admin-status-pill.server-online,
.admin-status-pill.is-active {
  color: #4ade80;
}

.admin-status-pill.server-online > i,
.admin-status-pill.is-active > i {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
}

.admin-status-pill.server-degraded {
  color: #fde047;
}

.admin-status-pill.server-degraded > i {
  background: #facc15;
}

.admin-status-pill.server-offline,
.admin-status-pill.is-disabled {
  color: #f87171;
}

.admin-status-pill.server-offline > i,
.admin-status-pill.is-disabled > i {
  background: #ef4444;
}

.admin-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.admin-row-actions button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(74, 222, 128, 0.09);
  border-radius: 8px;
  background: rgba(10, 28, 22, 0.7);
  color: #6d887c;
  cursor: pointer;
  font-size: 7px;
}

.admin-row-actions button:hover {
  border-color: rgba(74, 222, 128, 0.24);
  color: #86efac;
}

.admin-row-actions button.will-disable:hover {
  border-color: rgba(239, 68, 68, 0.23);
  background: rgba(239, 68, 68, 0.07);
  color: #f87171;
}

.admin-row-actions button:disabled {
  opacity: 0.22;
  pointer-events: none;
}

.master-notification-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(360px, 1.18fr);
  align-items: start;
  gap: 11px;
}

.admin-notification-composer form,
.admin-modal form {
  display: grid;
  gap: 13px;
  padding: 16px;
}

.admin-notification-composer form > label,
.admin-modal form > label,
.admin-form-grid > label {
  display: grid;
  gap: 6px;
}

.admin-notification-composer label > span,
.admin-modal label > span {
  color: #9bb1a8;
  font-size: 7px;
  font-weight: 700;
}

.admin-notification-composer input,
.admin-notification-composer select,
.admin-notification-composer textarea,
.admin-modal input,
.admin-modal select {
  width: 100%;
  min-width: 0;
  height: 39px;
  padding: 0 11px;
  border: 1px solid rgba(74, 222, 128, 0.11);
  outline: 0;
  border-radius: 9px;
  background: rgba(3, 13, 10, 0.78);
  color: #d1fae5;
  font: inherit;
  font-size: 8px;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.admin-notification-composer textarea {
  height: auto;
  min-height: 112px;
  padding: 10px 11px;
  resize: vertical;
}

.admin-notification-composer input:focus,
.admin-notification-composer select:focus,
.admin-notification-composer textarea:focus,
.admin-modal input:focus,
.admin-modal select:focus {
  border-color: rgba(74, 222, 128, 0.42);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.06);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-notification-composer form > button {
  justify-self: end;
}

.admin-notification-history > header em {
  color: #60786e;
  font-size: 6px;
  font-style: normal;
}

.admin-notification-history > div {
  display: grid;
  max-height: 480px;
  overflow: hidden auto;
}

.admin-notification-record {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.065);
}

.admin-notification-record > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  color: #60a5fa;
}

.admin-notification-record.level-success > span {
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
}

.admin-notification-record.level-warning > span {
  background: rgba(250, 204, 21, 0.08);
  color: #fde047;
}

.admin-notification-record.level-critical > span {
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}

.admin-notification-record > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.admin-notification-record strong {
  color: #d2e9df;
  font-size: 8px;
}

.admin-notification-record p {
  margin: 0;
  color: #748b82;
  font-size: 7px;
  line-height: 1.5;
}

.admin-notification-record small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #4f695e;
  font-size: 6px;
}

.admin-empty-state {
  display: grid !important;
  grid-column: 1 / -1;
  min-height: 150px;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 20px;
  color: #5f776d;
  text-align: center;
}

.admin-empty-state.compact {
  min-height: 70px;
}

.admin-empty-state > i {
  font-size: 18px;
}

.admin-empty-state strong {
  color: #a7beb4;
  font-size: 8px;
}

.admin-empty-state span {
  font-size: 7px;
}

.admin-modal-layer {
  position: absolute;
  z-index: 1850;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 20px;
  background: rgba(0, 7, 4, 0.76);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), visibility var(--ease);
  backdrop-filter: blur(8px);
}

.admin-modal-layer.is-visible {
  opacity: 1;
  visibility: visible;
}

.admin-modal {
  width: min(100%, 670px);
  overflow: hidden;
  border: 1px solid rgba(74, 222, 128, 0.16);
  border-radius: 17px;
  background:
    radial-gradient(circle at 90% 0, rgba(34, 197, 94, 0.08), transparent 30%),
    #081710;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.55);
  transform: translateY(10px) scale(0.98);
  transition: transform var(--ease);
}

.admin-modal-layer.is-visible .admin-modal {
  transform: none;
}

.admin-modal > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(74, 222, 128, 0.09);
}

.admin-modal > header > span {
  display: grid;
  gap: 4px;
}

.admin-modal > header small {
  color: #4ade80;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-modal > header strong {
  color: #d1fae5;
  font-size: 12px;
}

.admin-modal > header button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.06);
  color: #789087;
  cursor: pointer;
}

.admin-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.admin-modal footer > button:not(.admin-primary-btn) {
  height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 9px;
  background: rgba(148, 163, 184, 0.04);
  color: #789087;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.admin-check-field {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 7px !important;
}

.admin-check-field input {
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: #22c55e;
}

.admin-check-field.danger span {
  color: #fca5a5 !important;
}

.admin-server-summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid rgba(74, 222, 128, 0.08);
  border-radius: 11px;
  background: rgba(34, 197, 94, 0.035);
}

.admin-server-summary > i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
}

.admin-server-summary > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.admin-server-summary strong {
  overflow: hidden;
  color: #c9e2d7;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-server-summary small {
  color: #5e766c;
  font-size: 6px;
}

/* Tema Hacker: o tema clássico permanece como a aparência original. */
html[data-theme="hacker"] {
  --bg: #020806;
  --bg-deep: #010403;
  --panel: #07130f;
  --card: #0b1d16;
  --card-soft: rgba(7, 24, 17, 0.84);
  --blue: #22c55e;
  --blue-bright: #4ade80;
  --green: #00f58a;
  --text: #e7fff2;
  --muted: #789087;
  --muted-2: #50675e;
  --border: rgba(74, 222, 128, 0.11);
  --border-strong: rgba(74, 222, 128, 0.2);
  --theme-accent: #00f58a;
  --theme-accent-soft: rgba(0, 245, 138, 0.1);
  --theme-grid: rgba(74, 222, 128, 0.08);
  --theme-surface: rgba(7, 24, 17, 0.84);
  --theme-surface-deep: rgba(1, 4, 3, 0.86);
  --screen-backdrop: rgba(1, 4, 3, 0.84);
  --screen-window-bg: linear-gradient(180deg, rgba(7, 24, 17, 0.98), rgba(1, 8, 5, 0.99) 70%);
  --screen-window-border: rgba(0, 245, 138, 0.32);
  --screen-window-shadow: 0 28px 74px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 245, 138, 0.06) inset;
  --screen-header-bg: rgba(2, 25, 20, 0.9);
  --screen-panel-bg: rgba(3, 18, 12, 0.8);
  --screen-tool-bg: rgba(9, 29, 20, 0.96);
  --screen-tool-color: #86efac;
  --screen-frame-bg: #020806;
  --screen-frame-border: #315442;
  --screen-frame-inset: #0b1d16;
  --screen-device-bg: radial-gradient(circle at 50% 42%, rgba(0, 245, 138, 0.16), transparent 32%), linear-gradient(160deg, #071f16, #010403 68%);
  --screen-device-grid: rgba(52, 211, 153, 0.035);
  --screen-device-text: #d7f7e8;
  --screen-device-muted: #789087;
  --screen-control-bg: rgba(9, 29, 20, 0.96);
  --screen-control-border: rgba(74, 222, 128, 0.16);
}

html[data-theme="hacker"] body {
  background: #010403;
}

html[data-theme="hacker"] .topbar,
html[data-theme="hacker"] .left-sidebar,
html[data-theme="hacker"] .right-panel {
  background: rgba(3, 12, 8, 0.96);
}

html[data-theme="hacker"] .settings-view,
html[data-theme="hacker"] .profile-view,
html[data-theme="hacker"] .client-detail-view,
html[data-theme="hacker"] .device-logs-view {
  background:
    radial-gradient(circle at 78% 12%, rgba(34, 197, 94, 0.08), transparent 30%),
    linear-gradient(145deg, #06110c, #07140f 58%, #030a07);
}

html[data-theme="hacker"] .icon-btn,
html[data-theme="hacker"] .action-btn,
html[data-theme="hacker"] .map-control-btn,
html[data-theme="hacker"] .nav-item {
  background: rgba(9, 29, 20, 0.72);
}

html[data-theme="hacker"] .nav-item.active {
  background: rgba(34, 197, 94, 0.11);
  color: #86efac;
}

html[data-theme="hacker"] .nav-item.active::before {
  background: #22c55e;
}

html[data-theme="hacker"] .profile-hero-card,
html[data-theme="hacker"] .profile-info-card,
html[data-theme="hacker"] .session-security-card,
html[data-theme="hacker"] .client-control-hero,
html[data-theme="hacker"] .remote-actions-panel,
html[data-theme="hacker"] .client-activity-panel,
html[data-theme="hacker"] .settings-card {
  background: linear-gradient(
    145deg,
    rgba(9, 29, 20, 0.86),
    rgba(5, 18, 12, 0.9)
  );
}

html[data-theme="hacker"] #world-map .leaflet-tile-pane {
  filter: grayscale(0.84) brightness(0.62) sepia(0.35) hue-rotate(85deg)
    saturate(1.35);
}

html[data-theme="hacker"] .brand-logo,
html[data-theme="hacker"] .user-avatar {
  background: linear-gradient(145deg, #15803d, #22c55e);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.2);
}

html[data-theme="hacker"] .theme-toggle-btn {
  color: #4ade80;
}

@media (max-width: 1100px) {
  .master-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-table {
    overflow-x: auto;
  }

  .admin-user-table-head,
  .admin-user-row {
    min-width: 900px;
  }
}

@media (max-width: 760px) {
  .master-admin-view {
    position: absolute;
    z-index: 1200;
    inset: var(--header-height) 0 0;
    grid-column: auto;
  }

  .master-admin-scroll {
    padding: 16px 11px 34px;
  }

  .master-admin-heading {
    display: block;
  }

  .master-heading-actions {
    margin-top: 14px;
  }

  .master-tabs button {
    font-size: 7px;
  }

  .master-metric-grid,
  .master-dashboard-grid,
  .master-notification-layout {
    grid-template-columns: 1fr;
  }

  .master-activity-list {
    grid-template-columns: 1fr;
  }

  .admin-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-users-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-users-toolbar label {
    width: 100%;
  }

  .admin-form-grid,
  .admin-form-grid.three {
    grid-template-columns: 1fr;
  }

  .admin-modal-layer {
    position: fixed;
    padding: 10px;
  }

  .admin-modal {
    max-height: calc(100dvh - 20px);
    overflow: auto;
  }
}

@media (max-width: 460px) {
  .master-metric-grid {
    grid-template-columns: 1fr;
  }

  .master-live-status {
    display: none;
  }

  .master-tabs {
    overflow-x: auto;
  }

  .master-tabs button {
    min-width: 105px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-loader i {
    animation: none;
  }
}

@media (max-width: 520px) {
  .topbar,
  .app-shell.left-collapsed .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .brand-block {
    display: none;
  }

  .notification-btn {
    display: none !important;
  }

  .action-btn {
    display: inline-flex;
  }

  .search-results {
    right: -50px;
    left: -47px;
  }

  .filter-popover {
    right: 0;
    width: min(274px, calc(100vw - 20px));
  }

  .live-chip {
    max-width: calc(100vw - 126px);
  }

  .live-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .settings-heading {
    display: block;
  }

  .server-status-badge {
    margin-top: 15px;
  }

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

  .profile-hero-card {
    min-height: 0;
    align-items: flex-start;
    padding: 19px;
  }

  .profile-avatar-large {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    font-size: 19px;
  }

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

  .session-security-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .session-shield {
    width: 40px;
    height: 40px;
  }

  .session-security-card > a,
  .session-security-card > button {
    grid-column: 1 / -1;
  }

  .client-control-meta {
    grid-template-columns: 1fr;
  }

  .client-metric-grid {
    grid-template-columns: 1fr;
  }

  .remote-actions-panel,
  .client-activity-panel {
    padding: 14px;
  }

  .remote-actions-panel > header {
    display: block;
  }

  .simulation-badge {
    margin-top: 10px !important;
  }

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

  .command-builder-count {
    display: none;
  }

  .command-icon-palette {
    grid-template-columns: repeat(4, minmax(34px, 1fr));
  }

  .command-icon-upload {
    grid-column: span 2;
  }

  .fixed-command-fields {
    grid-template-columns: 1fr;
  }

  .extra-command-field-row {
    grid-template-columns: 1fr 31px;
  }

  .extra-command-field-row label {
    grid-column: 1 / -1;
  }

  .extra-command-field-row > button {
    grid-column: 2;
    grid-row: 2;
  }

  .command-builder-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
  }

  .command-dialog-actions {
    grid-template-columns: 1fr;
  }

  .screen-console-header {
    min-height: 60px;
    padding: 10px 9px 10px 14px;
  }

  .screen-simulation-pill {
    display: none;
  }

  .screen-console-body {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 5px;
    padding: 7px;
  }

  .screen-tools {
    gap: 5px;
    padding: 3px;
    border-radius: 10px;
  }

  .screen-tools button {
    width: 34px;
    height: 34px;
  }

  .device-workspace {
    grid-template-rows: 20px minmax(0, 1fr) 39px;
    gap: 5px;
  }

  .device-frame {
    min-height: 260px;
    border-radius: 27px;
  }

  .device-screen {
    margin: 17px 7px 0;
    border-radius: 18px 18px 4px 4px;
  }

  .device-screen-content {
    padding: 13px;
  }

  .device-screen-content p {
    max-width: 190px;
  }

  .device-demo-cards {
    margin-top: 12px;
  }

  .screen-console-footer {
    padding-right: 10px;
    padding-left: 10px;
  }

  .screen-console-footer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Compact draggable screen windows */
.screen-window-layer {
  position: fixed;
  z-index: 1750;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.screen-floating-window {
  position: absolute;
  display: none;
  width: 661px;
  height: 1042px;
  min-width: 320px;
  min-height: 520px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.23);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(4, 24, 19, 0.98), rgba(5, 13, 23, 0.99) 12%),
    #07111c;
  box-shadow:
    0 28px 74px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(9px) scale(0.985);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1),
    box-shadow var(--ease);
}

.screen-floating-window.is-visible {
  display: grid;
  opacity: 1;
  transform: none;
  animation: floating-screen-enter 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.screen-floating-window.is-dragging {
  box-shadow:
    0 38px 92px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(52, 211, 153, 0.18);
  cursor: grabbing;
  transition: none;
  user-select: none;
}

.screen-floating-window .screen-console-header {
  min-height: 62px;
  padding: 10px 11px 10px 15px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.screen-floating-window.is-dragging .screen-console-header {
  cursor: grabbing;
}

.screen-floating-window .screen-console-heading {
  min-width: 0;
}

.screen-floating-window .screen-console-heading h2 {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-floating-window .screen-console-heading p {
  overflow: hidden;
  white-space: nowrap;
}

.screen-floating-window .screen-console-heading p em {
  overflow: hidden;
  max-width: 105px;
  color: #789b92;
  font-style: normal;
  text-overflow: ellipsis;
}

.screen-floating-window .screen-console-actions {
  cursor: default;
}

.screen-floating-window .screen-session-toggle,
.screen-floating-window .screen-console-close {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.screen-floating-window .screen-console-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 7px;
  padding: 8px;
  overflow: hidden;
}

.screen-floating-window .screen-console-body:has(.blackscreen-preset-panel.open) {
  grid-template-columns: 43px minmax(0, 1fr) 210px;
}

.screen-floating-window .screen-tools {
  gap: 5px;
  padding: 3px;
  border-radius: 11px;
}

.screen-floating-window .screen-tools button {
  width: 35px;
  height: 35px;
  border-radius: 8px;
}

.screen-floating-window .device-workspace {
  grid-template-rows: 21px minmax(0, 1fr) 38px;
  gap: 6px;
}

.screen-floating-window .device-range-row {
  width: 100%;
}

.screen-floating-window .device-frame {
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 100%;
  border-radius: 12px;
}

.screen-floating-window .device-screen {
  margin: 0;
  border-radius: 0;
}

.screen-floating-window .device-screen-content {
  padding: 15px;
}

.screen-floating-window .device-secure-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 11px;
  border-radius: 15px;
  font-size: 15px;
}

.screen-floating-window .device-screen-content h3 {
  font-size: 13px;
}

.screen-floating-window .device-screen-content p {
  max-width: 205px;
}

.screen-floating-window .device-demo-cards {
  width: min(205px, 90%);
  margin-top: 13px;
}

.screen-floating-window .device-navigation {
  padding: 0 38px;
}

.screen-floating-window .screen-text-form {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) 36px;
}

.screen-floating-window .screen-text-form input {
  height: 35px;
}

.screen-floating-window .screen-text-form button {
  width: 36px;
  height: 36px;
}

.screen-floating-window .screen-console-footer {
  min-height: 31px;
  padding: 6px 12px;
}

.screen-floating-window.is-running .device-secure-icon {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(16, 185, 129, 0.11);
  color: #6ee7b7;
  animation: screen-secure-pulse 2.4s ease-in-out infinite;
}

.screen-floating-window.is-running .device-demo-cards {
  opacity: 0.75;
  transform: none;
}

.screen-floating-window.is-private .device-privacy-layer {
  opacity: 1;
  visibility: visible;
}

.keylogger-window {
  width: 360px;
  height: min(500px, calc(100% - 16px));
  min-width: 360px;
  min-height: 360px;
}

.keylogger-window.is-visible {
  display: flex;
  flex-direction: column;
}

.sms-window {
  width: 520px;
  height: min(600px, calc(100% - 16px));
  min-width: 400px;
  min-height: 400px;
}

.sms-window.is-visible {
  display: flex;
  flex-direction: column;
}

.sms-console-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.sms-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sms-sidebar {
  width: 200px;
  min-width: 200px;
  border-right: 1px solid var(--border-color, rgba(255,255,255,0.08));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sms-sidebar-header {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
  display: flex;
  justify-content: flex-end;
}

.sms-refresh-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.sms-refresh-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary, #e2e8f0);
}

.sms-conversation-list {
  flex: 1;
  overflow-y: auto;
}

.sms-conversation-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  transition: background 0.15s;
}

.sms-conversation-item:hover {
  background: rgba(255,255,255,0.05);
}

.sms-conv-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sms-conv-info strong {
  font-size: 12px;
  color: var(--text-primary, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sms-conv-preview {
  font-size: 11px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sms-conv-date {
  font-size: 10px;
  color: var(--text-tertiary, #64748b);
}

.sms-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
  margin-top: 4px;
}

.sms-message-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sms-message-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sms-message {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  word-wrap: break-word;
}

.sms-received {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  color: var(--text-primary, #e2e8f0);
  border-bottom-left-radius: 2px;
}

.sms-sent {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 2px;
}

.sms-message-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.sms-message-date {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 4px;
}

.sms-empty,
.sms-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text-tertiary, #64748b);
  text-align: center;
  gap: 8px;
}

.sms-empty i,
.sms-loading i {
  font-size: 28px;
  opacity: 0.5;
}

.sms-empty p,
.sms-loading p {
  font-size: 12px;
  margin: 0;
}

.screen-floating-window .screen-window-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 10;
  background: linear-gradient(135deg, transparent 50%, rgba(52, 211, 153, 0.3) 50%);
  border-bottom-right-radius: 20px;
}

.screen-floating-window .screen-window-resize-handle:hover {
  background: linear-gradient(135deg, transparent 50%, rgba(52, 211, 153, 0.5) 50%);
}

.apps-window {
  width: min(480px, calc(100% - 16px));
  height: min(560px, calc(100% - 16px));
  min-width: 280px;
  min-height: 300px;
}

.apps-window.is-visible {
  display: flex;
  flex-direction: column;
}

.apps-window .screen-window-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 10;
  background: linear-gradient(135deg, transparent 50%, rgba(52, 211, 153, 0.3) 50%);
  border-bottom-right-radius: 20px;
}

.apps-window .screen-window-resize-handle:hover {
  background: linear-gradient(135deg, transparent 50%, rgba(52, 211, 153, 0.5) 50%);
}

.file-manager-window {
  width: min(520px, calc(100% - 16px));
  height: min(600px, calc(100% - 16px));
  min-width: 320px;
  min-height: 360px;
}

.file-manager-window.is-visible {
  display: flex;
  flex-direction: column;
}

.file-manager-window .file-manager-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--screen-window-border, rgba(255, 255, 255, 0.06));
}

.file-manager-window .file-manager-back-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #c4d3d0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.file-manager-window .file-manager-back-btn:hover {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}

.file-manager-window .file-manager-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #8ba89e;
  font-family: monospace;
}

.file-manager-window .file-manager-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
  min-height: 0;
}

.file-manager-window .file-manager-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: #5e7a73;
}

.file-manager-window .file-manager-empty i {
  font-size: 32px;
  opacity: 0.5;
}

.file-manager-window .file-manager-empty span {
  font-size: 12px;
}

.file-manager-window .file-manager-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}

.file-manager-window .file-manager-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.file-manager-window .file-manager-icon {
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.file-manager-window .file-manager-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #c4d3d0;
}

.file-manager-window .file-manager-size {
  flex-shrink: 0;
  font-size: 11px;
  color: #5e7a73;
  font-family: monospace;
}

.file-manager-window .file-manager-download-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: background 0.12s;
}

.file-manager-window .file-manager-download-btn:hover {
  background: rgba(52, 211, 153, 0.25);
}

.file-manager-window .file-manager-thumb {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-manager-window .file-manager-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.file-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: floating-screen-enter 200ms ease;
}

.file-preview-container {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #0f1419;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
}

.file-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.file-preview-title {
  font-size: 13px;
  color: #c4d3d0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-preview-actions {
  display: flex;
  gap: 6px;
}

.file-preview-download,
.file-preview-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #c4d3d0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.15s;
}

.file-preview-download:hover {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
}

.file-preview-close:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #f87171;
}

.file-preview-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: calc(90vh - 52px);
  overflow: hidden;
  padding: 8px;
}

.file-preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #5e7a73;
  padding: 40px;
}

.file-preview-loading i {
  font-size: 28px;
}

.file-preview-loading span {
  font-size: 12px;
}

.file-preview-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #f87171;
  padding: 40px;
}

.file-preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.file-preview-video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #000;
}

.file-preview-audio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px;
}

.file-preview-audio-wrap i {
  font-size: 48px;
  color: #f472b6;
}

.file-preview-audio {
  width: 320px;
  max-width: 90vw;
}

.apps-window .apps-console-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
}

.apps-window .apps-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.keylogger-window .screen-console-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
}

.keylogger-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.keylogger-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.keylogger-filters label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: rgba(148, 163, 184, 0.6);
}

.keylogger-filters input[type="date"] {
  width: 120px;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(10, 10, 15, 0.6);
  color: #e2e8f0;
}

.keylogger-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.keylogger-tabs {
  display: flex;
  gap: 2px;
  padding: 2px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.06);
}

.keylogger-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.5);
  border-radius: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.keylogger-tab:hover {
  color: rgba(148, 163, 184, 0.8);
}

.keylogger-tab.active {
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.1);
}

.keylogger-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.7);
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(148, 163, 184, 0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}

.keylogger-btn:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(148, 163, 184, 0.08);
}

.keylogger-feed-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  background: rgba(10, 10, 15, 0.4);
}

.keylogger-feed {
  height: 100%;
  overflow-y: auto;
  padding: 8px 10px;
}

.keylogger-feed::-webkit-scrollbar {
  width: 5px;
}

.keylogger-feed::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.15);
  border-radius: 3px;
}

.camera-window {
  width: min(440px, calc(100% - 16px));
  height: min(720px, calc(100% - 16px));
  min-width: 300px;
  min-height: 420px;
}

.screen-floating-window.camera-window .screen-console-body {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 0;
  padding: 8px;
  overflow: hidden;
}

.camera-window .camera-workspace {
  display: grid;
  grid-template-rows: 36px minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

.camera-window .camera-resolution-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.camera-window .camera-resolution-row select {
  flex: 1;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 8px;
  background: rgba(2, 6, 12, 0.6);
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
}

.camera-window .camera-resolution-row select:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.5);
}

.camera-window .camera-frame {
  --device-aspect: 16 / 9;
  width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 16px;
}

.camera-window .camera-frame .device-screen {
  margin: 12px 4px 0;
  border-radius: 10px;
}

.camera-window .camera-frame .device-navigation {
  display: none;
}

.camera-window .camera-frame .device-camera {
  display: none;
}

@media (max-width: 760px) {
  .camera-window {
    width: min(380px, calc(100% - 12px));
    height: min(620px, calc(100% - 12px));
  }
}

@media (max-width: 390px) {
  .camera-window {
    width: calc(100% - 10px);
    min-width: 0;
  }
}

.device-screen-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
  z-index: 1;
  touch-action: none;
  cursor: pointer;
  filter: brightness(0.95) contrast(1.05);
}

.device-screen-canvas:active {
  cursor: grabbing;
}

.device-screen-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(148, 163, 184, 0.6);
  z-index: 2;
  pointer-events: none;
  animation: placeholderPulse 2s ease-in-out infinite;
}

@keyframes placeholderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.device-screen-placeholder i {
  font-size: 28px;
  margin-bottom: 4px;
  animation: placeholderIconSpin 3s ease-in-out infinite;
}

@keyframes placeholderIconSpin {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.device-screen-placeholder small {
  font-size: 12px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
}

.device-screen-placeholder span {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.5);
}

.device-screen-wallpaper {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 24px;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.device-screen-wallpaper-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.device-screen-wallpaper-lock {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.device-screen-wallpaper-lock i {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.device-screen-wallpaper-lock small {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.device-tree-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  padding: 0;
  z-index: 1;
  background: rgba(2, 6, 12, 0.9);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tree-view-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 6px;
  color: rgba(148, 163, 184, 0.6);
}

.tree-view-placeholder i {
  font-size: 28px;
  margin-bottom: 4px;
}

.tree-view-placeholder small {
  font-size: 12px;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.8);
}

.tree-view-placeholder span {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.5);
}

.tree-node {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}

.tree-node-label {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: default;
  transition: background 0.15s;
}

.tree-node-label i {
  font-size: 9px;
  color: rgba(148, 163, 184, 0.5);
  flex-shrink: 0;
}

.tree-node-label span {
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.tree-node-label small {
  color: rgba(100, 116, 139, 0.8);
  font-size: 9px;
  margin-left: auto;
}

.tree-node-label.is-clickable {
  cursor: pointer;
}

.tree-node-label.is-clickable:hover {
  background: rgba(52, 211, 153, 0.12);
}

.tree-node-label.is-clickable i {
  color: rgba(52, 211, 153, 0.7);
}

.skeleton-phone {
  position: relative;
  background: #0a0a0f;
  overflow: hidden;
  touch-action: none;
}

.skeleton-phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.skeleton-box {
  position: absolute;
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-radius: 3px;
  pointer-events: auto;
  touch-action: none;
  transition: background 0.12s, border-color 0.12s;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skeleton-box.is-clickable {
  border: 1px solid rgba(52, 211, 153, 0.4);
  cursor: pointer;
}

.skeleton-box.is-clickable:hover {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.8);
}

.skeleton-box.is-editable {
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.05);
}

.skeleton-label {
  font-size: 9px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 3px;
  max-width: 100%;
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.skeleton-text-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
  z-index: 5;
  font-size: 10px;
  color: #f1f5f9;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  padding: 2px 4px;
  line-height: 1.2;
  min-height: 14px;
}

.skeleton-box.is-clickable .skeleton-label {
  color: #6ee7b7;
}

.skeleton-navbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(100, 116, 139, 0.2);
  z-index: 9999;
  pointer-events: none;
}

[data-gesture-indicator] {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  font-size: 10px;
  font-weight: 600;
  z-index: 10;
  pointer-events: none;
  transition: opacity 0.3s;
}

[data-gesture-indicator].is-error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.keylog-item {
  display: grid;
  grid-template-columns: 60px 80px 1fr;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 11px;
  align-items: center;
}

.keylog-item.is-new {
  animation: keylog-flash 0.6s ease;
}

@keyframes keylog-flash {
  from { background: rgba(52, 211, 153, 0.15); }
  to { background: transparent; }
}

.keylog-item small {
  color: rgba(148, 163, 184, 0.6);
}

.keylog-item strong {
  color: #93c5fd;
  font-size: 10px;
  font-weight: 600;
}

.keylog-item span {
  color: #e2e8f0;
  word-break: break-all;
}

.keylog-item.keylog-balance-item {
  grid-template-columns: 60px 80px 1fr;
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid rgba(34, 197, 94, 0.15);
}

.keylog-item.keylog-balance-item strong {
  color: #4ade80;
}

.keylog-item .keylog-balance {
  color: #22c55e;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.keylog-item.keylog-balance-item.is-new {
  animation: keylog-balance-flash 0.8s ease;
}

@keyframes keylog-balance-flash {
  from { background: rgba(34, 197, 94, 0.25); }
  to { background: rgba(34, 197, 94, 0.08); }
}

.credential-item {
  display: grid;
  grid-template-columns: 60px 1fr 60px 1fr auto;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  align-items: center;
}

.credential-item.is-new {
  animation: cred-flash 0.8s ease;
}

@keyframes cred-flash {
  from { background: rgba(34, 197, 94, 0.15); }
  to { background: transparent; }
}

.credential-item small {
  color: rgba(148, 163, 184, 0.6);
}

.credential-item .cred-app {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.credential-item .cred-context {
  color: rgba(148, 163, 184, 0.45);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credential-item strong {
  color: #fbbf24;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.credential-item code {
  color: #6ee7b7;
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
}

.credential-delete-btn {
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.5);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.15s;
}

.credential-delete-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.installed-app-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  transition: background 0.15s;
}

.installed-app-item:hover {
  background: rgba(148, 163, 184, 0.05);
}

.installed-app-item img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.installed-app-item i {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.6);
  font-size: 14px;
  flex-shrink: 0;
}

.installed-app-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.installed-app-info strong {
  font-size: 12px;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.installed-app-info small {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.installed-app-info span {
  font-size: 9px;
  color: rgba(148, 163, 184, 0.4);
}

@keyframes floating-screen-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  .screen-floating-window {
    width: min(440px, calc(100% - 12px));
    height: min(820px, calc(100% - 12px));
    min-width: 280px;
    min-height: 430px;
  }
}

@media (max-width: 390px) {
  .screen-floating-window {
    width: calc(100% - 10px);
    min-width: 0;
    border-radius: 16px;
  }

  .screen-floating-window .screen-console-heading p em {
    max-width: 72px;
  }

  .screen-floating-window .screen-console-body {
    grid-template-columns: 39px minmax(0, 1fr);
    gap: 5px;
    padding: 6px;
  }

  .screen-floating-window .screen-tools button {
    width: 31px;
    height: 31px;
  }
}

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

/* Autenticação local ------------------------------------------------------ */
.local-login-screen {
  position: fixed;
  z-index: 90000;
  inset: 0;
  display: grid;
  overflow: auto;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.2), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(34, 197, 94, 0.1), transparent 25%),
    #07101f;
  transition: opacity 280ms ease, visibility 280ms ease;
}

.local-login-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.local-login-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, #000 20%, transparent 78%);
}

.login-ambient {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.login-ambient-one {
  top: -180px;
  left: -100px;
  background: rgba(59, 130, 246, 0.24);
}

.login-ambient-two {
  right: -130px;
  bottom: -190px;
  background: rgba(34, 197, 94, 0.14);
}

.local-login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: linear-gradient(
    145deg,
    rgba(18, 29, 50, 0.97),
    rgba(10, 20, 37, 0.96)
  );
  box-shadow:
    0 36px 80px rgba(2, 6, 23, 0.55),
    inset 0 1px rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #2563eb, #3b82f6);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
  font-size: 18px;
}

.login-brand div {
  display: grid;
  gap: 2px;
}

.login-brand strong {
  font-size: 13px;
}

.login-brand small {
  color: #60a5fa;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-heading {
  margin: 30px 0 24px;
}

.login-heading > span {
  color: #4ade80;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-heading h1 {
  margin: 8px 0 8px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.login-heading p {
  margin: 0;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.65;
}

.local-login-form {
  display: grid;
  gap: 15px;
}

.local-login-form > label {
  display: grid;
  gap: 7px;
}

.local-login-form > label > span {
  color: #cbd5e1;
  font-size: 9px;
  font-weight: 700;
}

.local-login-form > label > div {
  display: grid;
  height: 46px;
  grid-template-columns: 38px 1fr 40px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(8, 17, 31, 0.74);
  color: #64748b;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.local-login-form > label > div:focus-within {
  border-color: rgba(59, 130, 246, 0.56);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
  color: #60a5fa;
}

.local-login-form label div > i {
  text-align: center;
}

.local-login-form input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 11px;
}

.local-login-form label div > button {
  height: 100%;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.local-login-error {
  min-height: 16px;
  margin: -4px 0 0;
  color: #fca5a5;
  font-size: 8px;
  line-height: 1.5;
}

.local-login-submit {
  position: relative;
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
  color: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  transition: transform var(--ease), box-shadow var(--ease), opacity var(--ease);
}

.local-login-submit:hover {
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
  transform: translateY(-1px);
}

.local-login-submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.local-login-submit.is-loading i {
  animation: login-spin 0.8s linear infinite;
}

.local-login-submit.is-loading i::before {
  content: "\f110";
}

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

.login-test-access {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px 12px;
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 11px;
  background: rgba(34, 197, 94, 0.05);
  color: #86efac;
}

.login-test-access > i {
  font-size: 12px;
}

.login-test-access span {
  display: grid;
  gap: 3px;
}

.login-test-access strong {
  font-size: 8px;
}

.login-test-access small {
  color: #6f9689;
  font-size: 7px;
}

.login-security-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 14px 0 0;
  color: #64748b;
  font-size: 7px;
  line-height: 1.45;
}

.login-surface-link {
  display: flex;
  height: 37px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 15px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.035);
  color: #94a3b8;
  font-size: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}

.login-surface-link:hover {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.07);
  color: #bfdbfe;
}

.local-login-screen.is-admin-login {
  background:
    radial-gradient(circle at 18% 18%, rgba(34, 197, 94, 0.15), transparent 28%),
    radial-gradient(circle at 82% 78%, rgba(0, 245, 138, 0.08), transparent 25%),
    #010504;
}

.is-admin-login .local-login-card {
  border-color: rgba(74, 222, 128, 0.17);
  background: linear-gradient(
    145deg,
    rgba(7, 25, 17, 0.98),
    rgba(2, 12, 8, 0.97)
  );
}

.is-admin-login .login-brand > span,
.is-admin-login .local-login-submit {
  background: linear-gradient(145deg, #15803d, #22c55e);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.2);
}

.is-admin-login .login-heading > span,
.is-admin-login .login-brand small {
  color: #4ade80;
}

.is-admin-login .local-login-form > label > div:focus-within {
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.07);
  color: #4ade80;
}

.is-admin-login .login-surface-link:hover {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(34, 197, 94, 0.06);
  color: #86efac;
}

.admin-surface .search-wrap,
.admin-surface [data-action="toggle-filter"],
.admin-surface [data-action="settings"] {
  display: none;
}

.admin-surface .title-block {
  margin-left: auto;
}

/* Central de notificações ------------------------------------------------ */
.notification-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #111c31;
  border-radius: 99px;
  background: #ef4444;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
}

.notification-count[hidden] {
  display: none;
}

.notification-btn {
  overflow: visible;
}

.notification-popover {
  position: absolute;
  z-index: 1650;
  top: calc(100% + 12px);
  right: 43px;
  width: min(370px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 17px;
  background: rgba(10, 20, 37, 0.98);
  box-shadow: 0 26px 64px rgba(2, 6, 23, 0.48);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease);
  backdrop-filter: blur(22px);
}

.notification-popover.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.notification-popover > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.notification-popover header > span {
  display: grid;
  gap: 3px;
}

.notification-popover header small {
  color: #60a5fa;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notification-popover header strong {
  font-size: 13px;
}

.notification-popover header button {
  background: transparent;
  color: #60a5fa;
  cursor: pointer;
  font-size: 7px;
  font-weight: 700;
}

.notification-list {
  display: grid;
  max-height: 350px;
  overflow: auto;
}

.notification-item {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 34px minmax(0, 1fr) 8px;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  background: transparent;
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  transition: background var(--ease);
}

.notification-item:hover,
.notification-item.is-unread {
  background: rgba(59, 130, 246, 0.055);
}

.notification-item-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.notification-item.level-success .notification-item-icon {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.notification-item.level-warning .notification-item-icon {
  background: rgba(250, 204, 21, 0.1);
  color: #fde047;
}

.notification-item.level-critical .notification-item-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.notification-item-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.notification-item-copy strong {
  font-size: 9px;
}

.notification-item-copy > span {
  color: #94a3b8;
  font-size: 8px;
  line-height: 1.5;
}

.notification-item-copy small {
  color: #526178;
  font-size: 7px;
}

.notification-unread-dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.notification-popover > footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  color: #64748b;
  font-size: 7px;
}

.notification-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 24px;
  color: #64748b;
  text-align: center;
}

.notification-empty > i {
  font-size: 20px;
}

.notification-empty strong {
  color: #cbd5e1;
  font-size: 9px;
}

.notification-empty span {
  font-size: 8px;
}

/* Edição dos comandos ---------------------------------------------------- */
.remote-actions-header-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.command-edit-toggle {
  display: inline-flex;
  height: 26px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 7px;
  background: rgba(59, 130, 246, 0.07);
  color: #93c5fd;
  cursor: pointer;
  font-size: 7px;
  font-weight: 800;
}

.remote-actions-panel.is-editing .command-edit-toggle {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
  color: #86efac;
}

.remote-action-slot {
  position: relative;
  min-width: 0;
}

.remote-action-slot .remote-action-card {
  width: 100%;
  height: 100%;
}

.command-delete-badge {
  position: absolute;
  z-index: 4;
  top: -5px;
  right: -5px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid #111c31;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 7px 16px rgba(239, 68, 68, 0.3);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease);
}

.command-delete-badge i {
  font-size: 8px;
}

.remote-actions-panel.is-editing .command-delete-badge {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.remote-actions-panel.is-editing .remote-action-card {
  pointer-events: none;
  opacity: 0.76;
  animation: command-jiggle 0.28s ease-in-out infinite alternate;
}

@keyframes command-jiggle {
  from {
    transform: rotate(-0.35deg);
  }
  to {
    transform: rotate(0.35deg);
  }
}

.remote-actions-empty {
  display: grid;
  grid-column: 1 / -1;
  min-height: 170px;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: #64748b;
  text-align: center;
}

.remote-actions-empty i {
  font-size: 20px;
}

.remote-actions-empty strong {
  color: #cbd5e1;
  font-size: 9px;
}

.remote-actions-empty span {
  max-width: 270px;
  font-size: 7px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .local-login-screen {
    padding: 12px;
  }

  .local-login-card {
    padding: 22px 18px;
    border-radius: 19px;
  }

  .notification-popover {
    position: fixed;
    top: 66px;
    right: 10px;
    left: 10px;
    width: auto;
  }

  .remote-actions-header-tools {
    justify-content: space-between;
    margin-top: 10px;
  }

  .command-builder-actions {
    grid-template-columns: 1fr;
  }
}

/* Superfícies que acompanham o tema global ------------------------------ */
.app-shell .build-view,
.app-shell .master-admin-view,
.app-shell .device-logs-view {
  background:
    radial-gradient(circle at 86% 8%, var(--theme-accent-soft), transparent 28%),
    linear-gradient(145deg, var(--theme-surface-deep), var(--bg) 58%, var(--panel));
  color: var(--text);
}

.app-shell .build-view::before,
.app-shell .master-admin-view::before,
.app-shell .device-logs-view::before {
  background-image:
    linear-gradient(var(--theme-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--theme-grid) 1px, transparent 1px);
}

.app-shell .build-panel {
  border-color: var(--border);
  background: var(--theme-surface);
  box-shadow: var(--shadow);
}

.app-shell .build-panel-heading,
.app-shell .build-history-heading {
  border-color: var(--border);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
}

.app-shell .build-panel-heading > span,
.app-shell .build-title-icon {
  border-color: color-mix(in srgb, var(--theme-accent) 38%, transparent);
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
}

.app-shell .build-title-row small,
.app-shell .build-save-status.is-saved,
.app-shell .build-icon-upload,
.app-shell .build-permission.is-selected,
.app-shell .history-status,
.app-shell .build-preview-placeholder {
  color: var(--theme-accent);
}

.app-shell .build-save-status,
.app-shell .build-ghost-btn,
.app-shell .build-input-wrap,
.app-shell .build-select-wrap,
.app-shell .build-readonly-field,
.app-shell .build-opening-card,
.app-shell .build-preview-paths,
.app-shell .build-history-actions button,
.app-shell .history-row-actions button {
  border-color: var(--border);
  background: var(--theme-surface-deep);
}

.app-shell .build-title-row h1,
.app-shell .build-panel-heading strong,
.app-shell .build-history-heading strong,
.app-shell .build-history-table strong {
  color: var(--text);
}

.app-shell .build-title-row p,
.app-shell .build-panel-heading small,
.app-shell .build-field-label,
.app-shell .build-history-heading small,
.app-shell .build-history-table,
.app-shell .build-preview-meta small {
  color: var(--muted);
}

.app-shell .build-input-wrap input,
.app-shell .build-select-wrap select,
.app-shell .build-readonly-field input {
  color: var(--text);
}

.app-shell .build-select-wrap select {
  background: var(--theme-surface-deep);
  color-scheme: dark;
}

.app-shell .build-select-wrap select option {
  background: var(--theme-surface-deep, #0d1614);
  color: var(--text, #d8eee6);
}

.app-shell .build-icon-option:hover,
.app-shell .build-icon-option.is-selected {
  border-color: color-mix(in srgb, var(--theme-accent) 78%, transparent);
  box-shadow: 0 0 0 2px var(--theme-accent-soft);
}

.app-shell .build-icon-option.is-selected::after {
  border-color: var(--bg-deep);
  background: var(--theme-accent);
}

.app-shell .build-permission.is-selected,
.app-shell .history-status {
  border-color: color-mix(in srgb, var(--theme-accent) 44%, transparent);
  background: var(--theme-accent-soft);
}

.app-shell .build-generate-btn {
  border-color: var(--theme-accent);
  background: linear-gradient(92deg, color-mix(in srgb, var(--theme-accent) 96%, white), var(--theme-accent));
  color: var(--bg-deep);
  box-shadow: 0 10px 28px var(--theme-accent-soft);
}

.app-shell .build-generate-btn small {
  color: color-mix(in srgb, var(--bg-deep) 74%, transparent);
}

.app-shell .master-admin-view {
  background:
    radial-gradient(circle at 86% 8%, var(--theme-accent-soft), transparent 27%),
    radial-gradient(circle at 8% 82%, color-mix(in srgb, var(--theme-accent) 7%, transparent), transparent 30%),
    var(--theme-surface-deep);
}

.app-shell .master-admin-heading,
.app-shell .master-tabs,
.app-shell .master-theme-switch,
.app-shell .master-live-status,
.app-shell .master-heading-actions > button,
.app-shell .admin-loading-state,
.app-shell .admin-error-state,
.app-shell .master-metric,
.app-shell .master-card,
.app-shell .admin-section-card,
.app-shell .admin-user-table,
.app-shell .admin-notification-history {
  border-color: var(--border);
}

.app-shell .master-tabs,
.app-shell .master-theme-switch,
.app-shell .admin-loading-state,
.app-shell .admin-error-state,
.app-shell .master-metric,
.app-shell .master-card,
.app-shell .admin-section-card,
.app-shell .admin-user-table,
.app-shell .admin-notification-history {
  background: var(--theme-surface);
}

.app-shell .master-metric,
.app-shell .master-card {
  box-shadow: var(--shadow);
}

.app-shell .master-card > header {
  border-color: var(--border);
}

.app-shell .master-activity-list {
  background: var(--border);
}

.app-shell .master-activity-list > div {
  background: var(--theme-surface-deep);
}

.app-shell .master-health-ring::before {
  background: var(--theme-surface-deep);
}

.app-shell .master-user-bars > button:hover,
.app-shell .admin-user-row:hover,
.app-shell .admin-user-table-head,
.app-shell .admin-notification-record:hover {
  background: var(--theme-accent-soft);
}

.app-shell .admin-users-toolbar label,
.app-shell .admin-notification-composer input,
.app-shell .admin-notification-composer select,
.app-shell .admin-notification-composer textarea,
.app-shell .admin-modal input,
.app-shell .admin-modal select,
.app-shell .admin-row-actions button,
.app-shell .admin-server-summary {
  border-color: var(--border);
  background: var(--theme-surface-deep);
}

.app-shell .admin-modal {
  border-color: var(--border-strong);
  background:
    radial-gradient(circle at 90% 0, var(--theme-accent-soft), transparent 30%),
    var(--theme-surface);
  box-shadow: var(--shadow);
}

.app-shell .admin-modal > header,
.app-shell .admin-notification-record {
  border-color: var(--border);
}

.app-shell .admin-modal-layer {
  background: color-mix(in srgb, var(--theme-surface-deep) 76%, transparent);
}

.app-shell .admin-notification-record > span,
.app-shell .admin-server-summary > i,
.app-shell .master-user-avatar {
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
}

.app-shell .admin-primary-btn {
  border-color: var(--theme-accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent) 72%, var(--bg)), var(--theme-accent));
  box-shadow: 0 10px 24px var(--theme-accent-soft);
  color: var(--bg-deep);
}

.app-shell .admin-loader i {
  background: var(--theme-accent);
}

.app-shell .master-health-ring {
  background: conic-gradient(
    var(--theme-accent) calc(var(--health) * 1%),
    var(--theme-accent-soft) 0
  );
}

.app-shell .master-kicker,
.app-shell .master-live-status,
.app-shell .master-tabs button.is-active,
.app-shell .master-theme-switch button.is-active,
.app-shell .master-metric > span {
  color: var(--theme-accent);
}

.app-shell .master-heading-actions > button:hover,
.app-shell .master-tabs button.is-active,
.app-shell .master-theme-switch button.is-active {
  background: var(--theme-accent-soft);
}

.app-shell .master-admin-heading h1,
.app-shell .admin-section-heading strong,
.app-shell .master-metric strong,
.app-shell .admin-loading-state strong,
.app-shell .admin-error-state strong,
.app-shell .admin-user-table strong {
  color: var(--text);
}

.app-shell .master-admin-heading p,
.app-shell .master-metric small,
.app-shell .admin-section-heading small,
.app-shell .admin-user-table,
.app-shell .admin-loading-state,
.app-shell .admin-error-state {
  color: var(--muted);
}

.admin-client-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--theme-surface);
  color: var(--muted);
  font-size: 8px;
}

.websocket-settings-card {
  border-color: color-mix(in srgb, var(--theme-accent) 22%, var(--border));
}

.proxy-status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 14px;
}

.proxy-status-banner i {
  font-size: 18px;
  flex-shrink: 0;
}

.proxy-status-banner span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proxy-status-banner strong {
  font-size: 10px;
  font-weight: 700;
}

.proxy-status-banner small {
  font-size: 8px;
  color: var(--muted);
  line-height: 1.4;
}

.proxy-status-banner.proxy-active {
  background: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-surface-deep));
  border-color: color-mix(in srgb, var(--theme-accent) 30%, var(--border));
}

.proxy-status-banner.proxy-active i {
  color: var(--theme-accent);
}

.proxy-status-banner.proxy-inactive {
  background: var(--theme-surface-deep);
}

.proxy-status-banner.proxy-inactive i {
  color: var(--muted);
}

.websocket-field-grid {
  margin-top: 14px;
}

.websocket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--theme-surface-deep);
}

.websocket-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.websocket-info-label {
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 600;
}

.websocket-info-value {
  font-size: 9px;
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.settings-toggle-field {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--theme-surface-deep);
  cursor: pointer;
}

.settings-toggle-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--theme-accent);
}

.settings-toggle-field span {
  display: grid;
  gap: 3px;
}

.settings-toggle-field b {
  color: var(--text);
  font-size: 8px;
}

.settings-toggle-field small {
  color: var(--muted);
  font-size: 7px;
}

.websocket-enabled-field {
  margin-top: 12px;
}

.websocket-action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.websocket-last-check {
  margin-left: auto;
  color: var(--muted);
  font-size: 7px;
}

.server-status-badge.server-is-connecting,
.server-status-badge.server-is-error {
  border-color: color-mix(in srgb, var(--yellow) 35%, var(--border));
  color: var(--yellow);
}

.server-status-badge.server-is-connected {
  border-color: color-mix(in srgb, var(--green) 35%, var(--border));
  color: var(--green);
}

.admin-client-count i {
  color: var(--theme-accent);
}

.admin-client-table .admin-user-table-head,
.admin-client-table .admin-user-row {
  grid-template-columns: minmax(230px, 1.4fr) minmax(150px, 1fr) 130px minmax(150px, 0.8fr) 64px;
}

.admin-client-row > div {
  min-width: 0;
}

.admin-client-row .admin-user-identity > span {
  display: grid;
  place-items: center;
  color: var(--theme-accent);
}

.admin-client-owner,
.admin-client-seen {
  display: grid;
  gap: 4px;
  align-content: center;
}

.admin-client-owner strong,
.admin-client-seen strong {
  overflow: hidden;
  color: var(--text);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-client-owner small,
.admin-client-seen small,
.admin-client-row > div > small {
  color: var(--muted);
  font-size: 7px;
}

.client-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 7px;
  font-weight: 750;
}

.client-status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
}

.client-status-pill.status-ativo,
.client-status-pill.status-premium {
  color: var(--green);
}

.client-status-pill.status-ativo i,
.client-status-pill.status-premium i {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

.client-status-pill.status-pendente {
  color: var(--yellow);
}

.client-status-pill.status-pendente i {
  background: var(--yellow);
}

.client-status-pill.status-offline {
  color: var(--red);
}

.client-status-pill.status-offline i {
  background: var(--red);
}

/* As janelas de suporte e modo de exibição compartilham o tema ativo. */
.screen-console-backdrop {
  background:
    radial-gradient(circle at 50% 15%, var(--theme-accent-soft), transparent 34%),
    var(--screen-backdrop);
}

.screen-console,
.screen-floating-window {
  border-color: var(--screen-window-border);
  background: var(--screen-window-bg);
  box-shadow: var(--screen-window-shadow);
}

.screen-console-header,
.screen-floating-window .screen-console-header {
  border-bottom-color: var(--screen-window-border);
  background: var(--screen-header-bg);
}

.screen-console-heading > span,
.screen-console-heading h2,
.screen-console-heading p strong,
.screen-console.is-running [data-screen-live-log],
.screen-console.is-running [data-screen-live-log] i {
  color: var(--theme-accent);
}

.screen-console-heading h2,
.screen-session-client strong,
.screen-consent-card strong,
.screen-device-content h3 {
  color: var(--screen-device-text);
}

.screen-console-heading p,
.screen-console-heading p em,
.screen-console-footer,
.screen-console-footer strong,
.screen-session-client small,
.screen-session-client div > span,
.screen-session-summary small,
.screen-session-log > span,
.screen-session-log p,
.screen-text-form input::placeholder {
  color: var(--screen-device-muted);
}

.screen-tools,
.screen-session-panel {
  border-color: var(--screen-control-border);
  background: var(--screen-panel-bg);
}

.screen-tools button,
.screen-floating-window .screen-tools button {
  border-color: var(--screen-control-border);
  background: var(--screen-tool-bg);
  color: var(--screen-tool-color);
}

.screen-tools button:hover,
.screen-tools button.is-active {
  border-color: var(--screen-window-border);
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
}

.screen-console-close {
  border-color: var(--screen-control-border);
  background: var(--screen-control-bg);
  color: var(--screen-device-muted);
}

.screen-console-close:hover {
  background: var(--theme-accent-soft);
  color: var(--screen-device-text);
}

.screen-session-toggle,
.screen-text-form button {
  background: var(--theme-accent);
  color: var(--bg-deep);
  box-shadow: 0 7px 22px var(--theme-accent-soft);
}

.screen-session-toggle:hover,
.screen-text-form button:hover {
  background: var(--blue-bright);
}

.device-range-row,
.device-range-row output,
.device-status-bar,
.device-navigation {
  color: var(--screen-device-muted);
}

.device-range-row input {
  accent-color: var(--theme-accent);
}

.device-frame {
  border: none;
  background: var(--screen-frame-bg);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.35);
}

.device-camera {
  border-color: var(--screen-frame-border);
  background: var(--bg-deep);
}

.device-screen {
  border: none;
  background: var(--screen-device-bg);
}

.device-screen::before {
  display: none;
}

.device-screen-content > small,
.device-screen-content p {
  color: var(--screen-device-muted);
}

.device-screen-content h3,
.device-privacy-layer strong {
  color: var(--screen-device-text);
}

.device-secure-icon,
.screen-client-monogram {
  border-color: var(--screen-window-border);
  background: var(--theme-accent-soft);
  color: var(--theme-accent);
}

.device-demo-cards span {
  border-color: var(--screen-window-border);
  background: linear-gradient(135deg, var(--theme-accent-soft), rgba(59, 130, 246, 0.04));
}

.device-privacy-layer {
  background:
    repeating-linear-gradient(135deg, var(--theme-accent-soft) 0 8px, transparent 8px 16px),
    var(--screen-frame-bg);
  color: var(--screen-device-muted);
}

.device-privacy-layer i,
.screen-console.is-running .device-secure-icon,
.screen-console.is-running .screen-session-client div > span {
  color: var(--theme-accent);
}

.screen-text-form input {
  border-color: var(--screen-control-border);
  background: var(--screen-control-bg);
  color: var(--screen-device-text);
}

.screen-text-form input:focus {
  border-color: var(--screen-window-border);
  box-shadow: 0 0 0 3px var(--theme-accent-soft);
}

.screen-session-summary > span {
  border-color: var(--screen-control-border);
  background: var(--screen-control-bg);
}

.screen-console-footer {
  border-top-color: var(--screen-window-border);
  background: var(--screen-header-bg);
}

.device-info-panel {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 14px;
  background: rgba(2, 6, 12, 0.5);
}

.device-info-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.device-info-header span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(148, 163, 184, 0.6);
}

.device-info-header strong {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}

.device-info-grid,
.device-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.device-telemetry-grid {
  border-top: 1px solid rgba(52, 211, 153, 0.08);
  padding-top: 12px;
}

.device-info-item,
.device-telemetry-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
}

.device-info-item i,
.device-telemetry-item i {
  font-size: 14px;
  color: rgba(52, 211, 153, 0.7);
  flex-shrink: 0;
}

.device-info-item span,
.device-telemetry-item span {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.device-info-item small,
.device-telemetry-item small {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.5);
}

.device-info-item strong,
.device-telemetry-item strong {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-wallpaper-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.device-wallpaper-preview small {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(148, 163, 184, 0.5);
  flex-shrink: 0;
}

.device-wallpaper-preview img {
  width: 48px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(52, 211, 153, 0.15);
}

.device-captures-section {
  margin: 12px 0;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.device-captures-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(148, 163, 184, 0.05);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 12px;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.device-captures-header i {
  color: #fbbf24;
  font-size: 13px;
}

.device-captures-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(148, 163, 184, 0.08);
}

.captures-col {
  display: flex;
  flex-direction: column;
  background: var(--bg-deep, #0a0a0f);
  min-height: 0;
}

.captures-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}

.captures-col-header i {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.5);
}

.captures-col-header small {
  font-size: 10px;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.captures-feed {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px 10px;
}

.captures-feed::-webkit-scrollbar {
  width: 4px;
}

.captures-feed::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.15);
  border-radius: 2px;
}

.captures-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
}

.captures-empty small {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.35);
  font-style: italic;
}

.device-permissions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.perm-count-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-count-btn:hover {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(15, 23, 42, 0.9);
}

.perm-count-btn i {
  font-size: 14px;
  color: rgba(52, 211, 153, 0.7);
}

.perm-accessibility-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: rgba(148, 163, 184, 0.4);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-accessibility-btn.acc-active {
  border-color: transparent;
  color: #fff;
  animation: acc-rainbow 3s linear infinite;
}

@keyframes acc-rainbow {
  0%   { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(255, 0, 0, 0.4); border-color: rgba(255, 0, 0, 0.5); }
  16%  { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(255, 165, 0, 0.4); border-color: rgba(255, 165, 0, 0.5); }
  33%  { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(255, 255, 0, 0.4); border-color: rgba(255, 255, 0, 0.5); }
  50%  { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(0, 255, 0, 0.4); border-color: rgba(0, 255, 0, 0.5); }
  66%  { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(0, 200, 255, 0.4); border-color: rgba(0, 200, 255, 0.5); }
  83%  { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(100, 0, 255, 0.4); border-color: rgba(100, 0, 255, 0.5); }
  100% { background: rgba(15, 23, 42, 0.6); box-shadow: 0 0 8px rgba(255, 0, 0, 0.4); border-color: rgba(255, 0, 0, 0.5); }
}

.perm-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.2s ease;
}

.perm-popup-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.perm-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 360px;
  max-width: 90vw;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: var(--bg-card, #0f172a);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.2s ease;
}

.perm-popup.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.perm-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.perm-popup-header span {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
}

.perm-popup-header button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: rgba(148, 163, 184, 0.1);
  color: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.perm-popup-header button:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.perm-popup-body {
  overflow-y: auto;
  padding: 8px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.perm-popup-acc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.05);
  margin-bottom: 6px;
}

.perm-popup-acc.acc-active {
  background: rgba(148, 163, 184, 0.05);
  animation: acc-rainbow-glow 1.4s linear infinite;
}

@keyframes acc-rainbow-glow {
  0%   { border-color: rgba(255, 0, 0, 0.60); box-shadow: 0 0 14px rgba(255, 0, 0, 0.35); }
  16%  { border-color: rgba(255, 165, 0, 0.60); box-shadow: 0 0 14px rgba(255, 165, 0, 0.35); }
  33%  { border-color: rgba(255, 255, 0, 0.60); box-shadow: 0 0 14px rgba(255, 255, 0, 0.35); }
  50%  { border-color: rgba(0, 255, 0, 0.60); box-shadow: 0 0 14px rgba(0, 255, 0, 0.35); }
  66%  { border-color: rgba(0, 200, 255, 0.60); box-shadow: 0 0 14px rgba(0, 200, 255, 0.35); }
  83%  { border-color: rgba(100, 0, 255, 0.60); box-shadow: 0 0 14px rgba(100, 0, 255, 0.35); }
  100% { border-color: rgba(255, 0, 0, 0.60); box-shadow: 0 0 14px rgba(255, 0, 0, 0.35); }
}

.perm-popup-acc i {
  font-size: 18px;
  color: rgba(148, 163, 184, 0.5);
}

.perm-popup-acc.acc-active i {
  animation: acc-rainbow-icon 1.4s linear infinite;
  text-shadow: 0 0 8px currentColor;
}

@keyframes acc-rainbow-icon {
  0%   { color: #ff3333; }
  16%  { color: #ff9900; }
  33%  { color: #ffee00; }
  50%  { color: #00ff55; }
  66%  { color: #00ddff; }
  83%  { color: #bb33ff; }
  100% { color: #ff3333; }
}

.perm-popup-acc span {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.perm-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.perm-popup-item:hover {
  background: rgba(148, 163, 184, 0.05);
}

.perm-popup-item i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.perm-popup-item i.perm-on {
  color: rgba(52, 211, 153, 0.8);
}

.perm-popup-item i.perm-off {
  color: rgba(148, 163, 184, 0.3);
}

.perm-popup-item span {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: #cbd5e1;
}

.perm-status {
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  padding: 2px 8px;
  border-radius: 6px;
}

.perm-status.on {
  background: rgba(52, 211, 153, 0.12);
  color: rgba(52, 211, 153, 0.9);
}

.perm-status.off {
  background: rgba(148, 163, 184, 0.08);
  color: rgba(148, 163, 184, 0.5);
}

[data-theme="light"] .perm-popup {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .perm-popup-header span,
[data-theme="light"] .perm-popup-item span,
[data-theme="light"] .perm-popup-acc span {
  color: #1e293b;
}

[data-theme="light"] .perm-popup-header button {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .perm-popup-header button:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1e293b;
}

[data-theme="light"] .perm-count-btn {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: #475569;
}

[data-theme="light"] .perm-accessibility-btn {
  background: rgba(241, 245, 249, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .perm-popup-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.permissions-window {
  width: 380px;
  min-height: 420px;
  max-height: 80vh;
}

.permissions-window .screen-console-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
}

.permissions-window .perm-popup-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
}

.permissions-window .perm-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

.permissions-window .perm-popup-item span {
  flex: 1;
}

.perm-request-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(25, 118, 210, 0.15);
  color: rgba(52, 211, 153, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
}

.perm-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}

.perm-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.perm-toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.15);
  transition: background 0.2s ease;
}

.perm-toggle-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.6);
  transition: transform 0.2s ease, background 0.2s ease;
}

.perm-toggle.on .perm-toggle-slider {
  background: rgba(52, 211, 153, 0.25);
}

.perm-toggle.on .perm-toggle-slider::before {
  transform: translateX(16px);
  background: rgba(52, 211, 153, 0.9);
}

.perm-toggle input:disabled + .perm-toggle-slider {
  cursor: default;
}

.perm-toggle:not(.on) {
  cursor: pointer;
}

.perm-toggle:not(.on):hover .perm-toggle-slider {
  background: rgba(56, 189, 248, 0.2);
}

.perm-toggle:not(.on):hover .perm-toggle-slider::before {
  background: rgba(56, 189, 248, 0.7);
}

[data-theme="light"] .perm-toggle-slider {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .perm-toggle-slider::before {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .perm-toggle.on .perm-toggle-slider {
  background: rgba(52, 211, 153, 0.2);
}

[data-theme="light"] .perm-toggle.on .perm-toggle-slider::before {
  background: rgba(52, 211, 153, 0.85);
}

[data-theme="light"] .perm-popup-acc {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .perm-popup-item span {
  color: #334155;
}

[data-theme="light"] .perm-status.off {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.4);
}

@media (max-width: 760px) {
  .device-info-grid,
  .device-telemetry-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
  }
}

/* ==================== APPS MODAL ==================== */

.apps-modal-overlay {
  display: none !important;
}

.apps-modal-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  flex-shrink: 0;
}

.apps-modal-search i {
  color: var(--text-muted, rgba(148, 163, 184, 0.5));
  font-size: 13px;
}

.apps-modal-search input {
  flex: 1;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  outline: none;
  transition: border-color 0.15s;
}

.apps-modal-search input:focus {
  border-color: rgba(99, 102, 241, 0.5);
}

.apps-modal-search input::placeholder {
  color: var(--text-muted, rgba(148, 163, 184, 0.4));
}

.apps-modal-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, rgba(148, 163, 184, 0.6));
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.apps-modal-filter-btn:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary, #e2e8f0);
}

.apps-modal-filter-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
  color: #818cf8;
}

[data-theme="light"] .apps-modal-filter-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: rgba(100, 116, 139, 0.7);
}

[data-theme="light"] .apps-modal-filter-btn:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #1e293b;
}

.apps-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

.apps-modal-body::-webkit-scrollbar {
  width: 6px;
}

.apps-modal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
}

.apps-modal-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px;
  color: var(--text-muted, rgba(148, 163, 184, 0.5));
  font-size: 13px;
}

.apps-modal-empty i {
  font-size: 24px;
}

.apps-modal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.12s;
}

.apps-modal-row:hover {
  background: rgba(148, 163, 184, 0.05);
}

.apps-modal-row.is-favorite {
  background: rgba(250, 204, 21, 0.06);
}

.apps-modal-row.is-favorite:hover {
  background: rgba(250, 204, 21, 0.1);
}

.apps-modal-row.is-blocked {
  background: rgba(239, 68, 68, 0.06);
}

.apps-modal-row.is-blocked:hover {
  background: rgba(239, 68, 68, 0.1);
}

.apps-modal-row.is-running {
  background: rgba(34, 197, 94, 0.06);
}

.apps-modal-row.is-running:hover {
  background: rgba(34, 197, 94, 0.1);
}

.apps-modal-icon {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.apps-modal-icon img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.apps-modal-icon i {
  font-size: 20px;
  color: var(--text-muted, rgba(148, 163, 184, 0.5));
}

.apps-modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.apps-modal-info strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apps-modal-info small {
  font-size: 11px;
  color: var(--text-muted, rgba(148, 163, 184, 0.5));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apps-modal-info span {
  font-size: 10px;
  color: var(--text-muted, rgba(148, 163, 184, 0.35));
}

.apps-modal-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.apps-modal-action {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 8px;
  color: var(--text-muted, rgba(148, 163, 184, 0.6));
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.apps-modal-action:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-primary, #e2e8f0);
  transform: translateY(-1px);
}

.apps-modal-action.active {
  background: rgba(250, 204, 21, 0.15);
  border-color: rgba(250, 204, 21, 0.3);
  color: #facc15;
}

.apps-modal-action.active.blocked {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.apps-modal-action.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.apps-running-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--bg-secondary, #1e293b);
  box-shadow: 0 0 4px rgba(34, 197, 94, 0.6);
}

.apps-modal-action.running {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.apps-modal-action.running:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Light theme overrides */
[data-theme="light"] .apps-modal {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .apps-modal-header span {
  color: #1e293b;
}

[data-theme="light"] .apps-modal-header button {
  color: rgba(100, 116, 139, 0.7);
}

[data-theme="light"] .apps-modal-header button:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #1e293b;
}

[data-theme="light"] .apps-modal-search input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}

[data-theme="light"] .apps-modal-search input::placeholder {
  color: rgba(100, 116, 139, 0.5);
}

[data-theme="light"] .apps-modal-row:hover {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .apps-modal-row.is-running {
  background: rgba(34, 197, 94, 0.08);
}

[data-theme="light"] .apps-running-dot {
  border-color: #fff;
}

[data-theme="light"] .apps-modal-info strong {
  color: #1e293b;
}

[data-theme="light"] .apps-modal-info small {
  color: rgba(100, 116, 139, 0.7);
}

[data-theme="light"] .apps-modal-action {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
  color: rgba(100, 116, 139, 0.7);
}

[data-theme="light"] .apps-modal-action:hover {
  background: rgba(0, 0, 0, 0.07);
  color: #1e293b;
}

[data-theme="light"] .apps-modal-empty {
  color: rgba(100, 116, 139, 0.5);
}

/* === ADB Floating Window === */
.adb-floating-window {
  position: relative;
  width: min(440px, calc(100% - 16px));
  height: auto;
  min-height: 320px;
  max-height: min(680px, calc(100% - 16px));
  grid-template-rows: auto minmax(0, 1fr);
}

.adb-floating-window .adb-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
}

.adb-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
}

.adb-status-bar.connected {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.adb-status-bar.disconnected {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.adb-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.adb-status-dot.connected { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.adb-status-dot.disconnected { background: #ef4444; }
.adb-status-dot.idle { background: rgba(148, 163, 184, 0.4); }

.adb-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adb-wizard {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adb-info-panel {
  position: fixed;
  width: 300px;
  max-height: 600px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  pointer-events: auto;
}

.adb-info-step strong {
  font-size: 13px;
  color: var(--text-primary, #e2e8f0);
  display: block;
  margin-bottom: 4px;
}

.adb-info-step p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
}

.adb-step {
  padding: 14px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.adb-step h3 {
  font-size: 14px;
  margin: 0 0 8px;
  color: var(--text-primary, #e2e8f0);
}

.adb-step p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 12px;
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
}

.adb-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.15));
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-primary, #e2e8f0);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.adb-btn:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
}

.adb-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.adb-btn.primary {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.adb-btn.primary:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.18);
}

.adb-btn.success {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.adb-btn.danger {
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.adb-btn i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.adb-log {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.08);
  font-family: "Cascadia Code", "Fira Code", monospace;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(148, 163, 184, 0.7);
  display: none;
}

.adb-log.visible { display: block; }

.adb-log-entry {
  padding: 2px 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.adb-log-entry.progress { color: #3b82f6; }
.adb-log-entry.success { color: #22c55e; }
.adb-log-entry.error { color: #ef4444; }

/* === ADB Shell Builder === */
.adb-shell-builder {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.adb-shell-builder-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, rgba(148, 163, 184, 0.8));
  display: flex;
  align-items: center;
  gap: 6px;
}

.adb-shell-cmd-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adb-shell-cmd-input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.15));
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary, #e2e8f0);
  font-family: "Cascadia Code", "Fira Code", monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}

.adb-shell-cmd-input:focus {
  border-color: rgba(59, 130, 246, 0.4);
}

.adb-shell-delay-input {
  width: 60px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-color, rgba(148, 163, 184, 0.15));
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary, #e2e8f0);
  font-size: 12px;
  text-align: center;
  outline: none;
}

.adb-shell-delay-label {
  font-size: 11px;
  color: var(--text-secondary, rgba(148, 163, 184, 0.5));
}

.adb-btn.small {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
}

.adb-shell-cmd-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adb-shell-cmd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.08);
  font-family: "Cascadia Code", "Fira Code", monospace;
  font-size: 12px;
}

.adb-shell-cmd-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.adb-shell-cmd-text {
  flex: 1;
  color: var(--text-primary, #e2e8f0);
  white-space: pre-wrap;
  word-break: break-all;
}

.adb-shell-cmd-delay {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
  font-size: 10px;
  font-weight: 600;
}

.adb-shell-cmd-remove {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary, rgba(148, 163, 184, 0.5));
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.15s;
}

.adb-shell-cmd-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

[data-theme="light"] .adb-shell-cmd-input,
[data-theme="light"] .adb-shell-delay-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}

/* === ADB Presets === */
.adb-preset-row {
  display: flex;
  gap: 6px;
  align-items: center;
}

.adb-preset-name-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.05);
  color: var(--text-primary, #e2e8f0);
  font-size: 12px;
}

.adb-preset-name-input:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.3);
}

.adb-preset-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}

.adb-preset-empty {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.4);
  text-align: center;
  padding: 6px;
}

.adb-preset-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.adb-preset-item.builtin {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}

.adb-preset-item.builtin .adb-preset-name {
  color: #4ade80;
}

.adb-preset-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary, #e2e8f0);
}

.adb-preset-count {
  font-size: 10px;
  color: rgba(148, 163, 184, 0.5);
  flex-shrink: 0;
}

[data-theme="light"] .adb-preset-name-input {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}

[data-theme="light"] .adb-preset-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .adb-preset-name {
  color: #1e293b;
}

[data-theme="light"] .adb-shell-cmd-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .adb-shell-cmd-text {
  color: #1e293b;
}

[data-theme="light"] .adb-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  color: #1e293b;
}

[data-theme="light"] .adb-log {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.06);
  color: rgba(100, 116, 139, 0.8);
}

.card-grid {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 16px;
  gap: 6px;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  align-content: start;
}

.card-grid[aria-hidden="false"] {
  display: grid;
}

.card-grid-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
}

.card-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--popup-color) 40%, transparent);
}

.card-item-compact {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card-item-compact:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--popup-color) 40%, transparent);
}

.card-item .card-preview.card-preview-sm,
.card-item-compact .card-preview.card-preview-sm {
  width: 180px;
  height: 320px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.card-preview-sm .card-preview-placeholder {
  font-size: 22px;
  color: rgba(71, 85, 105, 0.5);
}

.card-preview-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #ef4444;
  font-size: 24px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.card-item-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  min-height: 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.card-geo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 10px;
  overflow: hidden;
}

.card-geo-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.card-geo-flag-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 14px;
  font-size: 10px;
  color: var(--text-dim, #666);
  flex-shrink: 0;
}

.card-geo-country {
  font-weight: 600;
  color: var(--text, #e0e0e0);
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-geo-sep {
  color: var(--text-dim, #555);
  flex-shrink: 0;
}

.card-geo-ip {
  color: var(--text-dim, #888);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.card-geo-city {
  color: var(--text-dim, #aaa);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.card-item-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.5);
}

.card-item-dot.online,
.card-item-dot.ativo {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.card-item-dot.offline {
  background: #ef4444;
}

.card-item-device {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.card-item-latency {
  flex-shrink: 0;
  font-size: 9px;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}

.card-item-fav,
.card-item-detail {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 5px;
  background: transparent;
  color: rgba(148, 163, 184, 0.6);
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s;
}

.card-item-fav:hover,
.card-item-detail:hover {
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.card-item-fav.active {
  color: #eab308;
  border-color: rgba(234, 179, 8, 0.3);
}

.card-preview {
  width: 100%;
  height: 140px;
  background: #0a0f1a;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-preview.has-preview .card-preview-placeholder {
  display: none;
}

.card-preview-placeholder {
  color: rgba(71, 85, 105, 0.5);
  font-size: 32px;
}

.card-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(10, 15, 26, 0.6));
  pointer-events: none;
}

.card-item .popup-hero h3 {
  font-size: 16px;
}

.card-item .popup-hero p {
  font-size: 10px;
}

.card-item .popup-body {
  padding: 14px 18px 16px;
}

.card-item .popup-grid {
  gap: 14px;
}

.card-item .popup-detail span {
  font-size: 8px;
}

.card-item .popup-detail strong {
  font-size: 11px;
}

.card-item .popup-updated {
  font-size: 8px;
}

.card-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  align-items: stretch;
}

.card-item-fav {
  flex-shrink: 0;
  width: 38px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(30, 41, 59, 0.5);
  color: rgba(148, 163, 184, 0.4);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.card-item-fav:hover {
  color: #eab308;
  background: rgba(234, 179, 8, 0.1);
}

.card-item-fav.active {
  color: #eab308;
}

.card-item-actions .popup-action {
  flex: 1;
  margin-top: 0;
}

.view-mode-toggle {
  position: relative;
}

.view-mode-toggle i {
  transition: transform 0.2s ease;
}

.view-mode-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.view-mode-switch:hover {
  border-color: var(--blue);
}

.view-mode-track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 9px;
  background: rgba(71, 85, 105, 0.5);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.view-mode-switch.on .view-mode-track {
  background: var(--blue);
}

.view-mode-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 0.2s ease;
}

.view-mode-switch.on .view-mode-thumb {
  transform: translateX(16px);
}

.view-mode-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.view-mode-switch.on .view-mode-label {
  color: var(--blue);
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  padding: 16px;
}

.confirm-modal {
  width: 360px;
  max-width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.confirm-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 12px;
}

.confirm-modal-header i {
  color: #ef4444;
}

.confirm-modal-body {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 18px;
}

.confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.confirm-modal-btn {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.6);
  color: rgba(148, 163, 184, 0.9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.confirm-modal-btn.secondary:hover {
  border-color: var(--blue);
  color: #38bdf8;
}

.confirm-modal-btn.danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.confirm-modal-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.view-mode-switch.preview-switch.on .view-mode-label {
  color: #22d3ee;
}

.view-mode-switch.preview-switch.on .view-mode-track {
  background: rgba(34, 211, 238, 0.25);
  border-color: rgba(34, 211, 238, 0.4);
}

.view-mode-switch.preview-switch.on .view-mode-thumb {
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

.awaiting-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted, #7fa394);
  font-size: 11px;
  text-align: center;
}

.awaiting-state.compact {
  padding: 10px 12px;
  font-size: 9px;
  gap: 6px;
}

.awaiting-state .mini-spinner {
  width: 26px;
  height: 26px;
  border-width: 3px;
}

.awaiting-state.compact .mini-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.recent-list,
.card-grid {
  position: relative;
  min-height: 220px;
}

.recent-list .awaiting-state,
.card-grid .awaiting-state {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Tema Gold: preto absoluto + dourado metálico + tons quentes */
html[data-theme="gold"] {
  --bg: #090909;
  --bg-deep: #050505;
  --panel: #151515;
  --card: #1a1a1a;
  --card-soft: rgba(21, 21, 21, 0.88);
  --blue: #D4AF37;
  --blue-bright: #D4AF37;
  --green: #00FF66;
  --yellow: #D4AF37;
  --red: #ef4444;
  --text: #F5F2E8;
  --muted: #8a8a8a;
  --muted-2: #6a6a6a;
  --border: rgba(212, 175, 55, 0.12);
  --border-strong: rgba(212, 175, 55, 0.22);
  --theme-accent: #D4AF37;
  --theme-accent-soft: rgba(212, 175, 55, 0.1);
  --theme-grid: rgba(212, 175, 55, 0.06);
  --theme-surface: rgba(21, 21, 21, 0.88);
  --theme-surface-deep: rgba(5, 5, 5, 0.9);
  --screen-backdrop: rgba(9, 9, 9, 0.82);
  --screen-window-bg: linear-gradient(180deg, rgba(21, 21, 21, 0.98), rgba(9, 9, 9, 0.99) 70%);
  --screen-window-border: rgba(212, 175, 55, 0.28);
  --screen-window-shadow: 0 28px 74px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(212, 175, 55, 0.06) inset;
  --screen-header-bg: rgba(9, 9, 9, 0.92);
  --screen-panel-bg: rgba(15, 15, 15, 0.82);
  --screen-tool-bg: rgba(26, 26, 26, 0.96);
  --screen-tool-color: #D4AF37;
  --screen-frame-bg: #090909;
  --screen-frame-border: #3A3A3A;
  --screen-frame-inset: #1a1a1a;
  --screen-device-bg: radial-gradient(circle at 50% 42%, rgba(212, 175, 55, 0.14), transparent 32%), linear-gradient(160deg, #1a1510, #050505 68%);
  --screen-device-grid: rgba(212, 175, 55, 0.035);
  --screen-device-text: #F5F2E8;
  --screen-device-muted: #8a8a8a;
  --screen-control-bg: rgba(26, 26, 26, 0.96);
  --screen-control-border: rgba(212, 175, 55, 0.16);
}

html[data-theme="gold"] body {
  background: #090909;
  background-image: url("/assets/bg-gold.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

html[data-theme="gold"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: rgba(9, 9, 9, 0.55);
}

html[data-theme="gold"] .app-shell {
  position: relative;
  z-index: 1;
  background: transparent;
}

html[data-theme="gold"] .topbar,
html[data-theme="gold"] .left-sidebar,
html[data-theme="gold"] .right-panel {
  background: rgba(15, 15, 15, 0.82);
  border-color: rgba(212, 175, 55, 0.1);
}

html[data-theme="gold"] .settings-view,
html[data-theme="gold"] .profile-view,
html[data-theme="gold"] .client-detail-view,
html[data-theme="gold"] .device-logs-view {
  background:
    radial-gradient(circle at 78% 12%, rgba(212, 175, 55, 0.06), transparent 30%),
    linear-gradient(145deg, #0d0d0d, #121212 58%, #0a0a0a);
}

html[data-theme="gold"] .icon-btn,
html[data-theme="gold"] .action-btn,
html[data-theme="gold"] .map-control-btn,
html[data-theme="gold"] .nav-item {
  background: rgba(26, 26, 26, 0.72);
}

html[data-theme="gold"] .nav-item.active {
  background: rgba(212, 175, 55, 0.1);
  color: #D4AF37;
}

html[data-theme="gold"] .nav-item.active::before {
  background: #D4AF37;
}

html[data-theme="gold"] .profile-hero-card,
html[data-theme="gold"] .profile-info-card,
html[data-theme="gold"] .session-security-card,
html[data-theme="gold"] .client-control-hero,
html[data-theme="gold"] .remote-actions-panel,
html[data-theme="gold"] .client-activity-panel,
html[data-theme="gold"] .settings-card {
  background: linear-gradient(
    145deg,
    rgba(21, 21, 21, 0.9),
    rgba(12, 12, 12, 0.92)
  );
  border-color: rgba(212, 175, 55, 0.1);
}

html[data-theme="gold"] #world-map .leaflet-tile-pane {
  filter: grayscale(0.9) brightness(0.5) sepia(0.5) hue-rotate(5deg)
    saturate(1.2);
}

html[data-theme="gold"] .brand-logo,
html[data-theme="gold"] .user-avatar {
  background: linear-gradient(145deg, #8F6B1D, #D4AF37);
  box-shadow: 0 10px 24px rgba(212, 175, 55, 0.2);
}

html[data-theme="gold"] .theme-toggle-btn {
  color: #D4AF37;
}

html[data-theme="gold"] .master-theme-switch {
  border-color: rgba(212, 175, 55, 0.11);
  background: rgba(5, 5, 5, 0.7);
}

html[data-theme="gold"] .master-theme-switch button {
  color: #6a6a6a;
}

html[data-theme="gold"] .master-theme-switch button.is-active {
  background: rgba(212, 175, 55, 0.11);
  color: #D4AF37;
}

html[data-theme="gold"] .master-live-status,
html[data-theme="gold"] .master-heading-actions > button {
  border-color: rgba(212, 175, 55, 0.13);
  background: rgba(15, 15, 15, 0.72);
  color: #D4AF37;
}

html[data-theme="gold"] .build-view {
  background:
    radial-gradient(circle at 88% 4%, rgba(212, 175, 55, 0.06), transparent 26%),
    linear-gradient(145deg, #090909, #0d0d0d 58%, #080808);
}

html[data-theme="gold"] .build-view::before {
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.06) 1px, transparent 1px);
}

html[data-theme="gold"] .map-stage {
  background: rgba(12, 12, 12, 0.7);
}

html[data-theme="gold"] #world-map {
  background: transparent;
}
