:root,
html[data-theme="light"] {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #0078d4;
  --accent-muted: #deecf9;
  --sidebar: #faf9f8;
  --topbar: #ffffff;
  --hover: #f3f2f1;
  --link: #0078d4;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --radius: 8px;
  --timeline-line: #e5e7eb;
  --dot-on: #107c10;
  --dot-off: #c8c6c4;
}

html[data-theme="dark"] {
  --bg: #0b0b0b;
  --surface: #161616;
  --border: #333333;
  --text: #f3f3f3;
  --muted: #bdbdbd;
  --accent: #e8e8e8;
  --accent-muted: #2a2a2a;
  --sidebar: #121212;
  --topbar: #121212;
  --hover: #242424;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --timeline-line: #333333;
  --dot-on: #e8e8e8;
  --dot-off: #666666;
  --link: #9ecbff;
}

html[data-theme="dark"] .login-screen {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="dark"] .rmm-mini,
html[data-theme="dark"] .rmm-select,
html[data-theme="dark"] .rmm-textarea,
html[data-theme="dark"] .select,
html[data-theme="dark"] .rmm-btn-ghost {
  background: #1a1a1a;
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .rmm-mini--primary,
html[data-theme="dark"] .btn-primary {
  background: #f3f3f3;
  color: #111;
  border-color: #f3f3f3;
}

html[data-theme="dark"] .rmm-mini--accent {
  color: var(--text);
  border-color: #888;
  background: #1a1a1a;
}

html[data-theme="dark"] .rmm-mini--danger {
  color: #ff8a80;
  border-color: #8a3030;
  background: #1a1a1a;
}

html[data-theme="dark"] .rmm-dot--on {
  background: var(--dot-on);
}

html[data-theme="dark"] .rmm-dot--off {
  background: var(--dot-off);
}

html[data-theme="dark"] .rmm-brand-img,
html[data-theme="dark"] .login-brand-img {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .rmm-link-btn {
  color: var(--link);
}

html[data-theme="dark"] .rmm-muted,
html[data-theme="dark"] .rmm-lead,
html[data-theme="dark"] .rmm-account,
html[data-theme="dark"] .rmm-side-title,
html[data-theme="dark"] .rmm-filter-label {
  color: var(--muted);
}

html[data-theme="dark"] .rmm-modal {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .rmm-modal-backdrop {
  background: rgba(0, 0, 0, 0.72);
}

html[data-theme="dark"] code {
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

/* Blank public page (no branding / no visible copy) */
.login-screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.login-screen--blank {
  position: relative;
  background: #fff;
  color: transparent;
}

.login-blank-form {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-blank-input {
  width: min(280px, 70vw);
  height: 36px;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #111;
  padding: 0 10px;
  font-size: 14px;
  outline: none;
}

.login-blank-go {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  border: 0;
  padding: 0;
  overflow: hidden;
}

.login-screen--blank .login-error {
  color: #b91c1c;
  font-size: 12px;
  max-width: 280px;
  text-align: center;
}

.login-header {
  padding: 28px 32px 8px;
  display: flex;
  justify-content: center;
}

.login-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.login-brand-img {
  height: 28px;
  width: auto;
  display: block;
}

.login-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 8px 24px 64px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.login-title {
  margin: 0 0 28px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  text-align: center;
  line-height: 1.25;
}

.login-field {
  margin-bottom: 18px;
}

.login-label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.login-input {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
  color: #1a1a1a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-input:focus {
  outline: none;
  border-color: #006bff;
  box-shadow: 0 0 0 3px rgba(0, 107, 255, 0.12);
}

.login-btn-continue {
  margin-top: 4px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #006bff;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.login-btn-continue:hover {
  background: #0056d6;
}

.login-btn-continue:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-error {
  margin-top: 12px;
  color: #d93025;
  font-size: 13px;
  text-align: center;
}

.login-or {
  display: flex;
  align-items: center;
  margin: 22px 0 18px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}

.login-or::before,
.login-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.login-or span {
  padding: 0 14px;
}

.login-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  padding: 11px 16px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: default;
}

.login-oauth-icon {
  flex-shrink: 0;
}

.login-footer {
  margin: 22px 0 0;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.login-footer-link {
  color: #006bff;
  text-decoration: none;
  font-weight: 500;
}

.login-footer-link:hover {
  text-decoration: underline;
}

.rmm-bind-warning {
  background: #fff8e6;
  border-bottom: 1px solid #e6c86e;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.45;
  color: #5c4a12;
}

.rmm-bind-warning code {
  font-size: 12px;
}

.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.app[hidden],
.login-screen[hidden] {
  display: none !important;
}

body:not(.panel-authenticated) #main-app {
  display: none !important;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0078d4, #5c2d91);
}

.brand-text {
  font-size: 15px;
}

.topnav {
  display: flex;
  gap: 4px;
}

.topnav-link {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.topnav-link:hover {
  background: var(--bg);
  color: var(--text);
}

.topnav-link.is-active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
}

.icon-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.user-chip {
  margin-left: 4px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-size: 13px;
}

.shell {
  flex: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 0;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 8px 10px;
}

.tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree ul {
  list-style: none;
  margin: 4px 0 8px 0;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.tree-item {
  margin: 2px 0;
}

.tree-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

.tree-link:hover {
  background: var(--hover);
}

.tree-link.is-active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

.tree-chevron {
  font-size: 10px;
  color: var(--muted);
  width: 14px;
  flex-shrink: 0;
}

.tree-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--text);
}

.tree-toggle:hover {
  background: var(--hover);
}

.tree-label {
  flex: 1;
  font-size: 13px;
}

.sidebar-hint {
  margin-top: auto;
  padding: 12px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px dashed var(--border);
}

.sidebar-hint code {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  word-break: break-all;
  color: var(--text);
  background: var(--surface);
  padding: 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.main {
  padding: 24px 32px 48px;
  overflow: auto;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: var(--accent);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span.sep {
  color: #d1d5db;
}

.page-header {
  margin-bottom: 24px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.page-sub {
  margin: 0 0 16px;
  color: var(--muted);
  max-width: 640px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

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

.filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.select {
  min-width: 180px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
}

.btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
  height: 36px;
}

.btn-ghost:hover {
  background: var(--bg);
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.timeline-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px 28px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ecfdf5;
  color: #047857;
}

.pill-live .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.85);
  }
}

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

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 8px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--timeline-line);
  border-radius: 2px;
}

.tl-item {
  position: relative;
  padding: 0 0 22px 28px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}

.tl-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  background: #fafafa;
}

.tl-card:hover {
  border-color: #cbd5e1;
}

.tl-time {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.tl-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.tl-desc {
  font-size: 13px;
  color: #374151;
}

.tl-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #4338ca;
}

.tag-warn {
  background: #fef3c7;
  color: #b45309;
}

.tag-ok {
  background: #d1fae5;
  color: #047857;
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 280px;
  }
}

.rmm-app .rmm-topbar {
  background: var(--topbar, var(--surface));
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  color: var(--text);
}

.rmm-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rmm-top-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.rmm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.rmm-brand-img {
  height: 22px;
  width: auto;
  display: block;
}

.rmm-logo {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(140deg, #0078d4 0%, #8764b8 100%);
}

.rmm-brand-text {
  font-size: 15px;
}

.rmm-topnav {
  display: flex;
  gap: 2px;
}

.rmm-toplink {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.rmm-toplink:hover {
  background: var(--hover);
  color: var(--text);
}

.rmm-toplink.is-active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

.rmm-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rmm-btn-ghost {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.rmm-btn-ghost:hover {
  background: var(--hover);
}

.rmm-account {
  font-size: 13px;
  color: var(--muted);
  margin-left: 8px;
}

.rmm-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  max-width: 1400px;
  margin: 0 auto;
}

.rmm-sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}

.rmm-side-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 10px 4px;
}

.rmm-side-title-sub {
  margin-top: 12px;
}

.rmm-side-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rmm-side-link {
  display: block;
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
}

.rmm-side-link:hover {
  background: var(--hover);
}

.rmm-side-link.is-active {
  background: var(--accent-muted);
  color: var(--accent);
  font-weight: 600;
}

.rmm-tree {
  margin: 0;
  padding-left: 0;
}

.rmm-hint {
  margin-top: auto;
  font-size: 11px;
}

.install-cmd-line {
  display: block;
  margin-top: 6px;
  word-break: break-all;
  font-size: 0.82em;
  line-height: 1.35;
}

.install-hint-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.install-hint-body {
  margin-top: 10px;
}

.install-hint-body[hidden] {
  display: none !important;
}

.rmm-btn-ghost--xs {
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.4;
  flex-shrink: 0;
}

.rmm-main {
  padding: 24px 28px 48px;
  background: var(--bg);
  min-width: 0;
}

.rmm-view[hidden] {
  display: none !important;
}

.rmm-page-head {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.rmm-monitor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.rmm-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.rmm-filter-label {
  color: var(--muted);
}

.rmm-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.rmm-h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rmm-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 720px;
  line-height: 1.5;
}

.rmm-lead a {
  color: var(--accent);
}

.rmm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.rmm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.rmm-table th {
  text-align: left;
  padding: 12px 14px;
  background: var(--sidebar);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.rmm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

.rmm-table tr:last-child td {
  border-bottom: none;
}

.rmm-muted {
  color: var(--muted);
}

.rmm-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rmm-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.rmm-dot--on {
  background: var(--dot-on, #107c10);
  box-shadow: 0 0 0 3px rgba(16, 124, 16, 0.2);
}

html[data-theme="dark"] .rmm-dot--on {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.rmm-dot--off {
  background: var(--dot-off, #c8c6c4);
}

.rmm-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 7rem;
}

.rmm-actions-toggle {
  font-weight: 600;
}

.rmm-actions-panel {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
}

.rmm-actions-panel[hidden] {
  display: none !important;
}

.rmm-mini {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.rmm-mini:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--hover);
}

.rmm-mini--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

html[data-theme="dark"] .rmm-mini--primary {
  color: #111;
}

.rmm-mini--primary:hover {
  filter: brightness(1.05);
  color: #fff;
}

html[data-theme="dark"] .rmm-mini--primary:hover {
  color: #111;
}

.rmm-mini--accent {
  border-color: #0d7a4f;
  color: #0b5c3c;
  font-weight: 600;
}

.rmm-mini--danger {
  border-color: #b91c1c;
  color: #b91c1c;
}

.rmm-mini--danger:hover {
  background: #fef2f2;
}

.rmm-link-btn {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--link, var(--accent));
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}

.rmm-link-btn:hover {
  text-decoration: underline;
  color: var(--text);
}

.remote-web-wrap {
  outline: none;
  background: #1a1a1a;
  border-radius: 6px;
  padding: 4px;
  max-height: 70vh;
  overflow: auto;
}

.remote-web-wrap:focus {
  box-shadow: 0 0 0 2px var(--accent);
}

.remote-web-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65vh;
  object-fit: contain;
  vertical-align: top;
}

.rmm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 100;
}

.rmm-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  z-index: 101;
  padding: 20px 22px;
  width: min(480px, 92vw);
  max-height: 88vh;
  overflow: auto;
}

.rmm-modal-wide {
  width: min(920px, 96vw);
}

.rmm-modal-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}

.rmm-modal-sub {
  margin: 0 0 12px;
  font-size: 13px;
}

.rmm-textarea {
  width: 100%;
  font-family: Consolas, monospace;
  font-size: 13px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  resize: vertical;
}

.rmm-modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.rmm-modal-actions--wrap {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.rdp-help {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.rdp-help p {
  margin: 0 0 10px;
}

.rdp-help code {
  font-size: 13px;
}

.rdp-url-hint {
  font-size: 12px;
  margin-top: 8px;
}

.rdp-url-hint code {
  word-break: break-all;
  font-size: 11px;
}

.rmm-screen-wrap {
  background: #252423;
  border-radius: 6px;
  padding: 8px;
  max-height: 60vh;
  overflow: auto;
}

.rmm-screen-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.rmm-pre {
  margin: 0;
  padding: 12px;
  background: var(--sidebar);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 50vh;
  overflow: auto;
}

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

  .rmm-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.zip-builder-card {
  padding: 20px;
}

.zip-builder-status {
  margin-bottom: 16px;
  font-size: 13px;
}

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

.zip-builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.zip-builder-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zip-builder-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.zip-builder-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}

.zip-pdf-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
}

.zip-builder-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
