/* ═══════════════════════════════════════════════════════════════════════════
   NRT Operations Centre - Roadmap Tab
   ═══════════════════════════════════════════════════════════════════════════ */

.rm-wrap { padding: 20px 24px 48px; width: 100%; box-sizing: border-box; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.rm-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.rm-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.rm-sub   { font-size: 12px; color: var(--text4); margin: 0; }

.rm-overall { display: flex; align-items: center; gap: 10px; }
.rm-overall-nums { font-size: 12px; color: var(--text3); white-space: nowrap; }
.rm-overall-done { font-size: 18px; font-weight: 800; color: var(--live); }
.rm-progress-track { width: 140px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.rm-progress-fill  { height: 100%; background: var(--live); border-radius: 3px; transition: width .6s; }
.rm-overall-pct { font-size: 11px; font-weight: 700; color: var(--live); }

/* ── Category section ────────────────────────────────────────────────────── */
.rm-section { margin-bottom: 28px; }

.rm-cat-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.rm-cat-icon { font-size: 14px; opacity: .7; flex-shrink: 0; }
.rm-cat-name { font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.rm-cat-bar  { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; max-width: 200px; }
.rm-cat-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .5s; }
.rm-cat-stat { font-size: 10px; color: var(--text4); flex-shrink: 0; }

/* ── Item rows ───────────────────────────────────────────────────────────── */
.rm-items { display: flex; flex-direction: column; }

.rm-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border2);
  transition: background .1s;
}
.rm-item:last-child { border-bottom: none; }
.rm-item:hover { background: var(--border2); border-radius: 6px; }

.rm-item-left {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  width: 100px;
  flex-shrink: 0;
}

.rm-item-body { flex: 1; min-width: 0; }
.rm-item-title { font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 2px; }
.rm-item-desc  { font-size: 11px; color: var(--text4); line-height: 1.4; }

/* ── Status badges ───────────────────────────────────────────────────────── */
.rm-status-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.rm-complete    { background: rgba(16,185,129,.15); color: var(--live); }
.rm-in-progress { background: rgba(14,165,233,.15); color: var(--accent); }
.rm-planned     { background: rgba(99,102,241,.12); color: #818cf8; }
.rm-idea        { background: rgba(107,114,128,.12); color: var(--text4); }

/* Dim planned/idea rows slightly */
.rm-item-planned .rm-item-title,
.rm-item-idea    .rm-item-title { color: var(--text3); }

.rm-version {
  font-size: 9px;
  font-family: ui-monospace, monospace;
  color: var(--text4);
  padding: 1px 4px;
  background: var(--border);
  border-radius: 3px;
  white-space: nowrap;
}

/* ── Status group collapsing ────────────────────────────────────────────── */
.rm-status-group { margin-bottom: 2px; }

.rm-status-group-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 5px;
  transition: background .1s;
  user-select: none;
}
.rm-status-group-hdr:hover { background: var(--border2); }

.rm-sg-chevron { font-size: 9px; color: var(--text4); width: 10px; flex-shrink: 0; }
.rm-sg-count   { font-size: 10px; color: var(--text4); margin-left: auto; }

/* ── Item edit/delete actions ────────────────────────────────────────────── */
.rm-item { position: relative; }
.rm-item:hover .rm-item-actions { opacity: 1; }

.rm-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  flex-shrink: 0;
  align-items: center;
  transition: opacity .15s;
}
.rm-item-edit, .rm-item-del {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text4);
  cursor: pointer;
  font-size: 12px;
  padding: 1px 5px;
  line-height: 1.4;
  transition: color .12s, border-color .12s;
}
.rm-item-edit:hover { color: var(--accent); border-color: var(--accent); }
.rm-item-del:hover  { color: #f87171;       border-color: #ef4444; }

/* Implementation notes (collapsed by default look) */
.rm-item-notes {
  font-size: 10px;
  color: var(--text4);
  line-height: 1.5;
  margin-top: 4px;
  padding: 5px 8px;
  background: var(--border2);
  border-radius: 4px;
  border-left: 2px solid var(--border);
  white-space: pre-wrap;
}

/* ── Add button ──────────────────────────────────────────────────────────── */
.rm-add-btn {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  white-space: nowrap;
  transition: background .12s;
}
.rm-add-btn:hover { background: var(--accent2); }

/* ── Loading state ───────────────────────────────────────────────────────── */
.rm-loading { padding: 60px 24px; text-align: center; color: var(--text4); font-size: 13px; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.rm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}
.rm-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 580px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.rm-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.rm-modal-hdr h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.rm-modal-close  { background: none; border: none; color: var(--text3); cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px; }
.rm-modal-close:hover { color: var(--text); }

.rm-modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.rm-modal-footer { padding: 12px 20px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0; }

.rm-field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.rm-field > span { font-size: 11px; font-weight: 600; color: var(--text3); }
.rm-field-row { display: flex; gap: 10px; }
.rm-field-sm { max-width: 110px; flex: 0 0 110px; }
.rm-hint { font-weight: 400; color: var(--text4); font-size: 10px; }
.rm-required { color: #f87171; }

.rm-field input,
.rm-field select,
.rm-field textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
  padding: 6px 9px;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.rm-field input:focus,
.rm-field select:focus,
.rm-field textarea:focus  { border-color: var(--accent); }
.rm-field textarea { resize: vertical; line-height: 1.5; }

.rm-btn-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text3);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  padding: 6px 16px;
  transition: color .12s, border-color .12s;
}
.rm-btn-cancel:hover { color: var(--text); border-color: var(--text3); }

.rm-btn-save {
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 20px;
  transition: background .12s;
}
.rm-btn-save:hover { background: var(--accent2); }

/* ── Two-column page layout ──────────────────────────────────────────────── */
.rm-page {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.rm-main {
  flex: 1;
  min-width: 0;
}
.rm-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (max-width: 760px) {
  .rm-page { flex-direction: column; }
  .rm-sidebar { width: 100%; position: static; max-height: none; }
}

/* ── Sidebar sections ────────────────────────────────────────────────────── */
.rm-sb-section {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.rm-sb-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text4);
  margin-bottom: 8px;
}

/* Stats chips */
.rm-sb-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rm-sb-stat {
  background: var(--bg3);
  border-radius: 6px;
  padding: 6px 8px;
  text-align: center;
  font-size: 10px;
  color: var(--text3);
}
.rm-sb-num { display: block; font-size: 20px; font-weight: 800; line-height: 1.1; margin-bottom: 1px; }
.rm-sb-stat.rm-complete    .rm-sb-num { color: var(--live); }
.rm-sb-stat.rm-in-progress .rm-sb-num { color: var(--accent); }
.rm-sb-stat.rm-planned     .rm-sb-num { color: #818cf8; }
.rm-sb-stat.rm-idea        .rm-sb-num { color: var(--text4); }

/* Category rows */
.rm-sb-cat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  color: var(--text2);
  transition: background .1s;
  margin-bottom: 2px;
}
.rm-sb-cat:hover { background: var(--border2); }
.rm-sb-cat-active { background: rgba(14,165,233,.1); color: var(--accent); }
.rm-sb-cat-icon { font-size: 11px; flex-shrink: 0; width: 14px; text-align: center; }
.rm-sb-cat-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-sb-cat-track { width: 48px; height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; flex-shrink: 0; }
.rm-sb-cat-fill  { height: 100%; background: var(--accent); border-radius: 2px; }
.rm-sb-cat-pct   { font-size: 9px; color: var(--text4); width: 26px; text-align: right; flex-shrink: 0; }

/* In Progress + Recently Shipped items */
.rm-sb-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
  font-size: 11px;
  transition: background .1s;
}
.rm-sb-item:last-child { border-bottom: none; }
.rm-sb-item:hover { background: var(--border2); border-radius: 4px; }
.rm-sb-item-cat   { font-size: 9px; color: var(--text4); flex-shrink: 0; white-space: nowrap; }
.rm-sb-item-title { flex: 1; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-sb-shipped    { cursor: default; }
.rm-sb-ver        { flex-shrink: 0; }

/* Quick Add form */
.rm-quick-form { display: flex; flex-direction: column; gap: 6px; }
.rm-qa-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  padding: 5px 8px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.rm-qa-input:focus { border-color: var(--accent); }
.rm-qa-row { display: flex; gap: 5px; }
.rm-qa-select {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  font-family: inherit;
  font-size: 10px;
  padding: 4px 6px;
  outline: none;
  min-width: 0;
}
.rm-qa-actions { display: flex; gap: 5px; }
.rm-qa-add {
  flex: 1;
  background: var(--accent);
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  padding: 5px 10px;
  transition: background .12s;
}
.rm-qa-add:hover { background: var(--accent2); }
.rm-qa-detail {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text3);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  padding: 5px 8px;
  transition: color .12s, border-color .12s;
  white-space: nowrap;
}
.rm-qa-detail:hover { color: var(--accent); border-color: var(--accent); }

/* Changelog rows */
.rm-cl-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 10px;
}
.rm-cl-row:last-child { border-bottom: none; }
.rm-cl-action { color: var(--text4); flex-shrink: 0; width: 12px; text-align: center; }
.rm-cl-title  { flex: 1; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-cl-time   { color: var(--text4); flex-shrink: 0; white-space: nowrap; }

/* Category filter chip */
.rm-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14,165,233,.12);
  border: 1px solid var(--accent);
  border-radius: 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px 3px 12px;
  margin-bottom: 12px;
}
.rm-filter-chip button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  opacity: .7;
  transition: opacity .1s;
}
.rm-filter-chip button:hover { opacity: 1; }
