/* ---- Repeater Map Manager — public stylesheet ---- */
:root {
  --rmm-bg: #f4f6fb;
  --rmm-card: #ffffff;
  --rmm-text: #0f172a;
  --rmm-muted: #64748b;
  --rmm-line: #e2e8f0;
  --rmm-primary: #1e3a8a;
  --rmm-accent: #1d4ed8;
  --rmm-ok: #059669;
  --rmm-bad: #dc2626;
  --rmm-warn: #d97706;
  --rmm-digital: #2563eb;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--rmm-bg);
  color: var(--rmm-text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--rmm-accent); }
.rmm-container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

.rmm-header {
  background: var(--rmm-primary);
  color: #fff;
  padding: 12px 0;
  box-shadow: 0 1px 3px rgba(15,23,42,.1);
  position: sticky; top: 0; z-index: 50;
}
.rmm-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rmm-brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.rmm-logo { height: 28px; width: auto; }
.rmm-nav a { color: #cbd5e1; margin-left: 16px; text-decoration: none; font-weight: 500; }
.rmm-nav a:hover { color: #fff; }

.rmm-main { padding: 16px 0 32px; }
.rmm-intro { background: var(--rmm-card); border: 1px solid var(--rmm-line); border-radius: 12px; padding: 16px 20px; margin-bottom: 16px; }
.rmm-intro h1 { margin: 0 0 6px; font-size: 22px; color: var(--rmm-primary); }
.rmm-intro p  { margin: 0; color: var(--rmm-muted); }

/* Map + side list layout */
.rmm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}
@media (max-width: 980px) { .rmm-layout { grid-template-columns: 1fr; } }

.rmm-mapwrap {
  background: var(--rmm-card);
  border: 1px solid var(--rmm-line);
  border-radius: 12px;
  overflow: hidden;
  height: 70vh;
  min-height: 480px;
}
@media (max-width: 980px) { .rmm-mapwrap { height: 56vh; } }

.rmm-tools {
  background: var(--rmm-card);
  border: 1px solid var(--rmm-line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 70vh;
  overflow: hidden;
}
@media (max-width: 980px) { .rmm-tools { max-height: none; } }

.rmm-search {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--rmm-line); border-radius: 8px;
  font-size: 14px;
}
.rmm-filter-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.rmm-filter-grid label { font-size: 12px; color: var(--rmm-muted); display: block; margin-bottom: 2px; }
.rmm-filter-grid select {
  width: 100%; padding: 7px 6px; border: 1px solid var(--rmm-line); border-radius: 6px; font-size: 13px;
}
.rmm-checkrow { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; }
.rmm-checkrow label { display: inline-flex; align-items: center; gap: 6px; }

.rmm-btn {
  display: inline-block; background: var(--rmm-accent); color: #fff;
  border: 0; padding: 9px 14px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.rmm-btn.secondary { background: #475569; }
.rmm-btn.ghost { background: transparent; color: var(--rmm-accent); border: 1px solid var(--rmm-accent); }
.rmm-btn:hover { filter: brightness(.95); }

.rmm-count { font-size: 13px; color: var(--rmm-muted); }
.rmm-count strong { color: var(--rmm-text); }

.rmm-list {
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding-right: 4px;
}
.rmm-list-item {
  background: #f8fafc;
  border: 1px solid var(--rmm-line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background .12s;
}
.rmm-list-item:hover { background: #eef2ff; }
.rmm-list-item .name { font-weight: 600; font-size: 14px; }
.rmm-list-item .meta { font-size: 12px; color: var(--rmm-muted); margin-top: 2px; }

.rmm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.6;
  background: #e2e8f0; color: #0f172a;
}
.rmm-badge.s-on, .rmm-badge.s-on-air        { background: #d1fae5; color: #065f46; }
.rmm-badge.s-off, .rmm-badge.s-off-air      { background: #fee2e2; color: #991b1b; }
.rmm-badge.s-test, .rmm-badge.s-testing     { background: #fef3c7; color: #92400e; }
.rmm-badge.s-int, .rmm-badge.s-intermittent { background: #ffedd5; color: #9a3412; }
.rmm-badge.s-unk, .rmm-badge.s-unknown      { background: #e2e8f0; color: #334155; }
.rmm-badge.digital { background: #dbeafe; color: #1e40af; }

/* Detail panel */
.rmm-panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  display: none; align-items: stretch; justify-content: flex-end;
  z-index: 100;
}
.rmm-panel-backdrop.open { display: flex; }
.rmm-panel {
  width: min(520px, 96vw);
  background: #fff;
  display: flex; flex-direction: column;
  height: 100%;
  overflow-y: auto;
  box-shadow: -4px 0 16px rgba(15,23,42,.18);
}
.rmm-panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--rmm-line);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.rmm-panel-head h2 { margin: 0; font-size: 18px; }
.rmm-panel-head .close { background: transparent; border: 0; font-size: 22px; cursor: pointer; color: var(--rmm-muted); }
.rmm-panel-body { padding: 14px 18px 24px; }
.rmm-panel-section { margin-bottom: 16px; }
.rmm-panel-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--rmm-muted); margin: 0 0 6px; }
.rmm-panel-grid { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.rmm-panel-grid dt { color: var(--rmm-muted); }
.rmm-panel-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.rmm-footer { background: #1e293b; color: #cbd5e1; padding: 18px 0; margin-top: 24px; font-size: 13px; }
.rmm-footer p { margin: 0; }

/* Suggestion form */
.rmm-form-row { margin-bottom: 10px; }
.rmm-form-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.rmm-form-row input, .rmm-form-row select, .rmm-form-row textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--rmm-line); border-radius: 6px; font-size: 14px;
  font-family: inherit;
}
.rmm-form-row textarea { min-height: 100px; resize: vertical; }

.rmm-loading, .rmm-error {
  padding: 14px; text-align: center; color: var(--rmm-muted); font-size: 14px;
}
.rmm-error { color: var(--rmm-bad); }
