/* ==========================================================================
   MEMP ROADMAP & FEATURE HORIZONS STYLESHEET
   High-craft, standalone application design (Collection & Linear/Raycast grade)
   Non-AI aesthetic: deep obsidian palette, 1px structural hairlines,
   subtle ambient glow, responsive grid, and native modal dialog.
   ========================================================================== */

:root {
  --rdm-font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --rdm-font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Theme Colors (Dark Obsidian Default) */
  --rdm-bg-body: #0c0d12;
  --rdm-bg-header: rgba(12, 13, 18, 0.88);
  --rdm-bg-card: #13141a;
  --rdm-bg-card-hover: #181a24;
  --rdm-bg-surface: rgba(255, 255, 255, 0.035);
  --rdm-bg-surface-hover: rgba(255, 255, 255, 0.065);
  --rdm-bg-surface-active: rgba(255, 255, 255, 0.1);
  --rdm-bg-column: rgba(16, 17, 23, 0.8);

  --rdm-border: rgba(255, 255, 255, 0.08);
  --rdm-border-strong: rgba(255, 255, 255, 0.16);
  --rdm-border-glow: rgba(16, 185, 129, 0.35);

  --rdm-text-main: #f3f4f8;
  --rdm-text-muted: #949baa;
  --rdm-text-subtle: #5f6676;

  /* Brand Accents */
  --rdm-emerald: #10b981;
  --rdm-emerald-rgb: 16, 185, 129;
  --rdm-cyan: #00f0ff;
  --rdm-cyan-rgb: 0, 240, 255;
  --rdm-indigo: #6366f1;
  --rdm-amber: #f59e0b;
  --rdm-rose: #f43f5e;
  --rdm-blue: #3b82f6;

  /* Sizing & Radius */
  --rdm-radius-sm: 6px;
  --rdm-radius-md: 10px;
  --rdm-radius-lg: 16px;
  --rdm-radius-full: 9999px;

  /* Elevation Shadows */
  --rdm-shadow-card: 0 4px 16px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
  --rdm-shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 16px rgba(16, 185, 129, 0.12);
  --rdm-shadow-dialog: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  /* Form Elements Dark Theme */
  --rdm-select-bg: #161720;
  --rdm-select-border: rgba(255, 255, 255, 0.12);
  --rdm-select-border-focus: #10b981;
  --rdm-select-option-bg: #161720;
  --rdm-select-option-color: #f3f4f8;
  --rdm-select-option-hover: #10b981;

  color-scheme: dark;
}

:root[data-theme="light"] {
  /* Form Elements Light Theme */
  --rdm-select-bg: #ffffff;
  --rdm-select-border: rgba(0, 0, 0, 0.14);
  --rdm-select-border-focus: #059669;
  --rdm-select-option-bg: #ffffff;
  --rdm-select-option-color: #14151a;
  --rdm-select-option-hover: #059669;

  color-scheme: light;
  --rdm-bg-body: #f8f7f4;
  --rdm-bg-header: rgba(248, 247, 244, 0.92);
  --rdm-bg-card: #ffffff;
  --rdm-bg-card-hover: #fafafa;
  --rdm-bg-surface: rgba(0, 0, 0, 0.035);
  --rdm-bg-surface-hover: rgba(0, 0, 0, 0.06);
  --rdm-bg-surface-active: rgba(0, 0, 0, 0.09);
  --rdm-bg-column: rgba(242, 239, 234, 0.8);

  --rdm-border: rgba(0, 0, 0, 0.08);
  --rdm-border-strong: rgba(0, 0, 0, 0.16);
  --rdm-border-glow: rgba(5, 150, 105, 0.3);

  --rdm-text-main: #14151a;
  --rdm-text-muted: #5e6473;
  --rdm-text-subtle: #8a91a0;

  --rdm-emerald: #059669;
  --rdm-emerald-rgb: 5, 150, 105;
  --rdm-blue: #2563eb;

  --rdm-shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
  --rdm-shadow-card-hover: 0 8px 20px rgba(0, 0, 0, 0.08), 0 0 12px rgba(5, 150, 105, 0.1);
  --rdm-shadow-dialog: 0 20px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   PAGE BASE & FULLSCREEN RESET
   ========================================================================== */
html[data-page="roadmap"],
body.standalone-roadmap {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  background-color: var(--rdm-bg-body) !important;
  color: var(--rdm-text-main);
  font-family: var(--rdm-font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  box-sizing: border-box;
}

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

/* ==========================================================================
   AMBIENT BACKGROUND MESH
   ========================================================================== */
.roadmap-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  will-change: transform;
}

.ambient-glow.glow-1 {
  width: 580px;
  height: 580px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(99, 102, 241, 0.1) 60%, transparent 80%);
  animation: glowFloat1 18s ease-in-out infinite alternate;
}

.ambient-glow.glow-2 {
  width: 520px;
  height: 520px;
  top: 360px;
  left: -100px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.18) 0%, rgba(139, 92, 246, 0.1) 60%, transparent 80%);
  animation: glowFloat2 22s ease-in-out infinite alternate;
}

:root[data-theme="light"] .ambient-glow {
  opacity: 0.12;
  filter: blur(140px);
}

@keyframes glowFloat1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-35px, 25px) scale(1.06); }
  100% { transform: translate(25px, -15px) scale(0.96); }
}

@keyframes glowFloat2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(25px, -35px) scale(1.04); }
  100% { transform: translate(-15px, 25px) scale(0.94); }
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-size: 36px 36px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse 75% 55% at 50% 12%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 12%, #000 20%, transparent 80%);
}

:root[data-theme="light"] .ambient-grid {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
}

/* ==========================================================================
   STANDALONE APPLICATION HEADER (Collection Grade)
   ========================================================================== */
.roadmap-app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 64px;
  background: var(--rdm-bg-header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rdm-border);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.header-inner {
  max-width: 1720px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Left: Back Button & Brand Badge */
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.standalone-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-full);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.standalone-back-btn svg {
  color: var(--rdm-emerald);
  transition: transform 0.2s ease;
}

.standalone-back-btn:hover {
  background: var(--rdm-bg-surface-hover);
  border-color: var(--rdm-border-strong);
  transform: translateY(-1px);
}

.standalone-back-btn:hover svg {
  transform: translateX(-3px);
}

.standalone-back-btn:active {
  transform: translateY(0);
}

.header-divider {
  width: 1px;
  height: 24px;
  background: var(--rdm-border);
}

.roadmap-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-glyph {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.98rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--rdm-text-main);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.brand-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--rdm-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Live Socket Sync Pill */
.socket-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--rdm-radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rdm-emerald);
  user-select: none;
}

.socket-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rdm-emerald);
  box-shadow: 0 0 6px var(--rdm-emerald);
  animation: pulseBeacon 2.2s infinite;
}

@keyframes pulseBeacon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* Center: View Mode Segmented Switcher */
.header-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-mode-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--rdm-bg-surface);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-md);
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rdm-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.view-tab-btn svg {
  opacity: 0.75;
  transition: opacity 0.15s ease;
}

.view-tab-btn:hover {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-hover);
}

.view-tab-btn:hover svg {
  opacity: 1;
}

.view-tab-btn.active {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-card);
  border-color: var(--rdm-border-strong);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.view-tab-btn.active svg {
  color: var(--rdm-emerald);
  opacity: 1;
}

/* Right: Role Studio Button, Theme Toggle & Auth Badge */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.studio-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--rdm-radius-full);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.32);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.studio-trigger-btn svg {
  color: #ffffff;
}

.studio-trigger-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
  filter: brightness(1.06);
}

.studio-trigger-btn:active {
  transform: translateY(0);
}

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rdm-bg-surface);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-md);
  color: var(--rdm-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-hover);
  border-color: var(--rdm-border-strong);
}

/* Toggle icon display based on data-theme */
:root[data-theme="dark"] .theme-toggle-btn .sun-icon { display: block; }
:root[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }
:root[data-theme="light"] .theme-toggle-btn .sun-icon { display: none; }
:root[data-theme="light"] .theme-toggle-btn .moon-icon { display: block; }

/* Discord Auth Mount */
.user-auth-mount {
  display: flex;
  align-items: center;
}

.discord-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: #5865f2;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--rdm-radius-full);
  text-decoration: none;
  transition: all 0.15s ease;
}

.discord-connect-btn:hover {
  background: #4752c4;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(88, 101, 242, 0.4);
}

.discord-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  background: var(--rdm-bg-surface);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-full);
}

.discord-user-badge .user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--rdm-bg-surface-active);
  flex-shrink: 0;
}

.discord-user-badge .user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rdm-text-main);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.discord-user-badge .manager-pill {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.28);
  border-radius: 4px;
  line-height: 1.2;
}

/* ==========================================================================
   MAIN CONTENT CONTAINER
   ========================================================================== */
.roadmap-standalone-content {
  position: relative;
  z-index: 1;
  max-width: 1720px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ==========================================================================
   HERO HEADLINE SECTION
   ========================================================================== */
.roadmap-hero-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-top-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-indicator-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rdm-emerald);
  background: rgba(var(--rdm-emerald-rgb), 0.1);
  border: 1px solid rgba(var(--rdm-emerald-rgb), 0.24);
  border-radius: var(--rdm-radius-full);
}

.hero-timestamp {
  font-size: 0.76rem;
  color: var(--rdm-text-subtle);
  font-family: var(--rdm-font-mono);
}

.roadmap-main-title {
  margin: 0;
  font-size: 2.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--rdm-text-main);
  line-height: 1.15;
}

.roadmap-main-desc {
  margin: 0;
  font-size: 1.02rem;
  color: var(--rdm-text-muted);
  max-width: 820px;
  line-height: 1.6;
}

/* ==========================================================================
   TELEMETRY KPI METRICS STRIP
   ========================================================================== */
.roadmap-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.telemetry-loading-card {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--rdm-text-subtle);
  font-size: 0.88rem;
  background: var(--rdm-bg-card);
  border: 1px dashed var(--rdm-border);
  border-radius: var(--rdm-radius-md);
}

.telemetry-card {
  background: var(--rdm-bg-card);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  box-shadow: var(--rdm-shadow-card);
}

.telemetry-card:hover {
  border-color: var(--rdm-border-strong);
  transform: translateY(-1px);
}

.telemetry-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.telemetry-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--rdm-text-subtle);
}

.telemetry-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rdm-bg-surface-active);
  border: 1px solid var(--rdm-border);
}

.telemetry-icon.icon-blue {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}

.telemetry-icon.icon-emerald {
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

.telemetry-icon.icon-purple {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
}

.telemetry-icon.icon-slate {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.25);
}

.telemetry-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.telemetry-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--rdm-text-main);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.telemetry-hint {
  font-size: 0.75rem;
  color: var(--rdm-text-muted);
}

.telemetry-progress-track {
  height: 4px;
  background: var(--rdm-bg-surface-active);
  border-radius: var(--rdm-radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.telemetry-progress-fill {
  height: 100%;
  border-radius: var(--rdm-radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.telemetry-progress-fill.fill-blue {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.telemetry-progress-fill.fill-emerald {
  background: linear-gradient(90deg, #10b981, #34d399);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.telemetry-progress-fill.fill-purple {
  background: linear-gradient(90deg, #8b5cf6, #c084fc);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.telemetry-progress-fill.fill-slate {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}

/* ==========================================================================
   FILTER & SEARCH TOOLBAR
   ========================================================================== */
.roadmap-filter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: var(--rdm-bg-card);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-md);
  flex-wrap: wrap;
  box-shadow: var(--rdm-shadow-card);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.horizon-pills-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--rdm-bg-surface);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  flex-wrap: wrap;
}

.horizon-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rdm-text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.horizon-pill-btn:hover {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-hover);
}

.horizon-pill-btn.active {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-active);
  border-color: var(--rdm-border-strong);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.horizon-pill-btn .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.horizon-pill-btn .dot.in-progress { background: var(--rdm-blue); box-shadow: 0 0 6px var(--rdm-blue); }
.horizon-pill-btn .dot.short-term { background: var(--rdm-emerald); box-shadow: 0 0 6px var(--rdm-emerald); }
.horizon-pill-btn .dot.mid-term { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }
.horizon-pill-btn .dot.long-term { background: var(--rdm-amber); box-shadow: 0 0 6px var(--rdm-amber); }
.horizon-pill-btn .dot.shipped { background: #64748b; }

.horizon-pill-btn .pill-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--rdm-radius-full);
  background: var(--rdm-bg-surface-active);
  font-family: var(--rdm-font-mono);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 10px;
  color: var(--rdm-text-subtle);
  pointer-events: none;
}

.search-input-wrap input {
  padding: 7px 12px 7px 32px;
  font-size: 0.82rem;
  background: var(--rdm-bg-surface);
  color: var(--rdm-text-main);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  outline: none;
  min-width: 220px;
  font-family: inherit;
  transition: all 0.15s ease;
}

.search-input-wrap input:focus {
  border-color: var(--rdm-emerald);
  background: var(--rdm-bg-surface-hover);
}

.filter-select-wrap .custom-select {
  padding: 8px 34px 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  background-color: var(--rdm-select-bg) !important;
  color: var(--rdm-text-main) !important;
  border: 1px solid var(--rdm-select-border);
  border-radius: var(--rdm-radius-sm);
  outline: none;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23949baa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: dark;
}

:root[data-theme="light"] .filter-select-wrap .custom-select {
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235e6473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.filter-select-wrap .custom-select:focus {
  border-color: var(--rdm-select-border-focus);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}

/* ==========================================================================
   WORKSPACE & EMPTY STATES
   ========================================================================== */
.roadmap-workspace {
  min-height: 520px;
}

.workspace-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 20px;
  color: var(--rdm-text-muted);
}

.pulse-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--rdm-border);
  border-top-color: var(--rdm-emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.roadmap-empty-state {
  padding: 64px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--rdm-bg-card);
  border: 1px dashed var(--rdm-border-strong);
  border-radius: var(--rdm-radius-md);
  max-width: 600px;
  margin: 40px auto;
  box-shadow: var(--rdm-shadow-card);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rdm-bg-surface-active);
  border: 1px solid var(--rdm-border);
  color: var(--rdm-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.empty-state-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--rdm-text-main);
}

.empty-state-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--rdm-text-muted);
  max-width: 440px;
  line-height: 1.5;
}

.empty-state-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--rdm-radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
}

.empty-state-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   BOARD VIEW (5-Column Kanban)
   ========================================================================== */
.roadmap-board-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 1540px) {
  .roadmap-board-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .roadmap-column {
    min-width: 300px;
    max-width: 340px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

.roadmap-column {
  background: var(--rdm-bg-column);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--rdm-shadow-card);
}

.roadmap-column-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rdm-border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.column-indicator.in-progress { background: var(--rdm-blue); box-shadow: 0 0 8px var(--rdm-blue); }
.column-indicator.short-term { background: var(--rdm-emerald); box-shadow: 0 0 8px var(--rdm-emerald); }
.column-indicator.mid-term { background: #8b5cf6; box-shadow: 0 0 8px #8b5cf6; }
.column-indicator.long-term { background: var(--rdm-amber); box-shadow: 0 0 8px var(--rdm-amber); }
.column-indicator.shipped { background: #64748b; }

.column-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--rdm-text-main);
  margin: 0;
}

.column-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--rdm-radius-full);
  background: var(--rdm-bg-surface-active);
  color: var(--rdm-text-muted);
  font-family: var(--rdm-font-mono);
}

.roadmap-column-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 140px;
}

.empty-column-msg {
  padding: 36px 16px;
  text-align: center;
  color: var(--rdm-text-subtle);
  font-size: 0.82rem;
  border: 1px dashed var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  margin: 4px;
}

/* ==========================================================================
   ROADMAP CARD (Linear/Raycast Editorial Aesthetic)
   ========================================================================== */
.roadmap-card {
  background: var(--rdm-bg-card);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  box-shadow: var(--rdm-shadow-card);
}

.roadmap-card:hover {
  border-color: var(--rdm-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--rdm-shadow-card-hover);
}

.roadmap-card.is-pinned {
  border-left: 3px solid #eab308;
}

.roadmap-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-tags-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.card-pin-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  color: #eab308;
}

.category-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--rdm-bg-surface-active);
  color: var(--rdm-text-muted);
  border: 1px solid var(--rdm-border);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.status-badge.status-in-progress {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge.status-planned {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge.status-concept {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.status-badge.status-testing {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge.status-shipped {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-badge.status-paused {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.card-actions-right {
  display: flex;
  align-items: center;
}

.card-action-icon-btn {
  background: transparent;
  border: 0;
  color: var(--rdm-text-subtle);
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-action-icon-btn:hover {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-active);
}

.roadmap-card-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--rdm-text-main);
  line-height: 1.35;
}

.roadmap-card-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--rdm-text-muted);
  line-height: 1.45;
}

/* Card Progress Bar */
.card-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 2px;
}

.card-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--rdm-text-subtle);
  font-family: var(--rdm-font-mono);
}

.card-progress-bar {
  height: 4px;
  background: var(--rdm-bg-surface-active);
  border-radius: var(--rdm-radius-full);
  overflow: hidden;
}

.card-progress-bar-inner {
  height: 100%;
  border-radius: var(--rdm-radius-full);
  background: var(--rdm-emerald);
  transition: width 0.3s ease;
}

/* Milestone Checklists in Card */
.card-milestones-summary {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 6px;
  border-top: 1px solid var(--rdm-border);
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--rdm-text-muted);
  line-height: 1.35;
}

.milestone-checkbox-fake {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1px solid var(--rdm-border-strong);
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
}

.milestone-item.completed {
  color: var(--rdm-text-subtle);
  text-decoration: line-through;
}

.milestone-item.completed .milestone-checkbox-fake {
  background: var(--rdm-emerald);
  border-color: var(--rdm-emerald);
  color: #ffffff;
}

.roadmap-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: var(--rdm-text-subtle);
  padding-top: 6px;
  border-top: 1px solid var(--rdm-border);
  font-family: var(--rdm-font-mono);
}

.eta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--rdm-text-main);
}

.priority-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rdm-text-muted);
}

/* ==========================================================================
   TIMELINE VIEW
   ========================================================================== */
.roadmap-timeline-view {
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: relative;
  padding-left: 32px;
}

.roadmap-timeline-view::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--rdm-border);
}

.timeline-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-node-marker {
  position: absolute;
  left: -32px;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--rdm-bg-card);
  border: 3px solid var(--rdm-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.timeline-group-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.timeline-group-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--rdm-text-main);
  margin: 0;
}

.timeline-group-desc {
  font-size: 0.84rem;
  color: var(--rdm-text-muted);
}

.timeline-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

/* ==========================================================================
   MATRIX LIST VIEW (Linear-grade Data Grid)
   ========================================================================== */
.roadmap-list-view {
  background: var(--rdm-bg-card);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-md);
  overflow: hidden;
  box-shadow: var(--rdm-shadow-card);
  width: 100%;
}

.list-table-scroll-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.list-table-inner {
  min-width: 920px;
  width: 100%;
}

.list-table-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 130px 170px 80px 85px;
  gap: 16px;
  align-items: center;
  padding: 12px 20px;
  background: var(--rdm-bg-surface-active);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rdm-text-subtle);
  border-bottom: 1px solid var(--rdm-border);
}

.header-col {
  user-select: none;
}

.header-col.col-progress {
  text-align: right;
  padding-right: 4px;
}

.header-col.col-actions {
  text-align: right;
}

.list-table-body {
  display: flex;
  flex-direction: column;
}

.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px 130px 170px 80px 85px;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--rdm-border);
  font-size: 0.85rem;
  color: var(--rdm-text-main);
  transition: background 0.12s ease;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row:hover {
  background: var(--rdm-bg-surface-hover);
}

.list-title-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 10px;
}

.list-title-text {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--rdm-text-main);
  line-height: 1.35;
  word-break: break-word;
}

.list-desc-snippet {
  font-size: 0.79rem;
  color: var(--rdm-text-muted);
  line-height: 1.45;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-cell {
  min-width: 0;
  display: flex;
  align-items: center;
}

.table-horizon-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rdm-text-muted);
  white-space: nowrap;
}

.table-horizon-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.table-horizon-pill .dot.in-progress { background: var(--rdm-blue); box-shadow: 0 0 6px var(--rdm-blue); }
.table-horizon-pill .dot.short-term { background: var(--rdm-emerald); box-shadow: 0 0 6px var(--rdm-emerald); }
.table-horizon-pill .dot.mid-term { background: #8b5cf6; box-shadow: 0 0 6px #8b5cf6; }
.table-horizon-pill .dot.long-term { background: var(--rdm-amber); box-shadow: 0 0 6px var(--rdm-amber); }
.table-horizon-pill .dot.shipped { background: #64748b; }

.list-status-cell {
  white-space: nowrap;
}

.list-category-cell {
  white-space: nowrap;
  overflow: hidden;
}

.table-progress-val {
  font-family: var(--rdm-font-mono);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--rdm-emerald);
  width: 100%;
  text-align: right;
  padding-right: 4px;
}

.list-actions-cell {
  justify-content: flex-end;
}

.list-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-active);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.list-edit-btn:hover {
  color: #ffffff;
  background: var(--rdm-emerald);
  border-color: var(--rdm-emerald);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.list-edit-btn:active {
  transform: translateY(0);
}

.eta-tag {
  font-family: var(--rdm-font-mono);
  font-size: 0.75rem;
  color: var(--rdm-text-subtle);
  white-space: nowrap;
}

/* ==========================================================================
   ROLE-GATED STUDIO MODAL (<dialog>)
   ========================================================================== */
dialog.roadmap-editor-dialog {
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 680px;
  width: 92%;
  overflow: visible;
  outline: none;
}

dialog.roadmap-editor-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropFadeIn 0.2s ease;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dialog-shell {
  background: var(--rdm-bg-card);
  color: var(--rdm-text-main);
  border: 1px solid var(--rdm-border-strong);
  border-radius: var(--rdm-radius-lg);
  box-shadow: var(--rdm-shadow-dialog);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.dialog-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--rdm-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.head-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dialog-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(var(--rdm-emerald-rgb), 0.12);
  color: var(--rdm-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.dialog-head h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--rdm-text-main);
}

.dialog-head p {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: var(--rdm-text-muted);
}

.dialog-close-btn {
  background: transparent;
  border: 0;
  color: var(--rdm-text-subtle);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.dialog-close-btn:hover {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-active);
}

.dialog-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(88vh - 120px);
  overflow-y: auto;
}

.form-row {
  display: flex;
  gap: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

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

.form-field.flex-grow {
  flex: 1;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rdm-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.required-star {
  color: var(--rdm-rose);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-val {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--rdm-emerald);
  font-family: var(--rdm-font-mono);
}

.dialog-form input[type="text"],
.dialog-form input[type="search"],
.dialog-form textarea {
  padding: 8px 12px;
  font-size: 0.86rem;
  background-color: var(--rdm-select-bg) !important;
  color: var(--rdm-text-main) !important;
  border: 1px solid var(--rdm-select-border);
  border-radius: var(--rdm-radius-sm);
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: dark;
}

:root[data-theme="light"] .dialog-form input[type="text"],
:root[data-theme="light"] .dialog-form input[type="search"],
:root[data-theme="light"] .dialog-form textarea {
  color-scheme: light;
}

.dialog-form input[type="text"]:focus,
.dialog-form input[type="search"]:focus,
.dialog-form textarea:focus {
  border-color: var(--rdm-select-border-focus);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}

.dialog-form select {
  padding: 9px 34px 9px 12px;
  font-size: 0.86rem;
  font-weight: 500;
  background-color: var(--rdm-select-bg) !important;
  color: var(--rdm-text-main) !important;
  border: 1px solid var(--rdm-select-border);
  border-radius: var(--rdm-radius-sm);
  outline: none;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23949baa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  color-scheme: dark;
}

:root[data-theme="light"] .dialog-form select {
  color-scheme: light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235e6473' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.dialog-form select:focus {
  border-color: var(--rdm-select-border-focus);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
}

/* ==========================================================================
   NATIVE SELECT OPTIONS & POPUP MENU STYLING (FIX WHITE-ON-WHITE ISSUE)
   ========================================================================== */
select,
.custom-select,
.dialog-form select,
dialog.roadmap-editor-dialog {
  color-scheme: dark !important;
}

:root[data-theme="light"] select,
:root[data-theme="light"] .custom-select,
:root[data-theme="light"] .dialog-form select,
:root[data-theme="light"] dialog.roadmap-editor-dialog {
  color-scheme: light !important;
}

select option,
select optgroup,
.custom-select option,
.dialog-form select option {
  background-color: var(--rdm-select-option-bg) !important;
  color: var(--rdm-select-option-color) !important;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
}

select option:hover,
select option:focus,
select option:checked,
.custom-select option:checked,
.dialog-form select option:checked {
  background-color: var(--rdm-select-option-hover) !important;
  color: #ffffff !important;
}

.dialog-form textarea {
  resize: vertical;
  min-height: 72px;
}

.checkbox-field {
  justify-content: flex-end;
  padding-bottom: 8px;
}

.checkbox-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.84rem;
  text-transform: none !important;
}

.checkbox-container input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--rdm-emerald);
  cursor: pointer;
}

/* Checklist Builder */
.checklist-builder-section {
  background: var(--rdm-bg-surface);
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checklist-header label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rdm-text-muted);
}

.checklist-add-btn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rdm-emerald);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 4px;
}

.checklist-add-btn:hover {
  background: rgba(var(--rdm-emerald-rgb), 0.1);
}

.checklist-items-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.milestone-chk {
  width: 16px;
  height: 16px;
  accent-color: var(--rdm-emerald);
  cursor: pointer;
}

.milestone-text-input {
  flex: 1;
  padding: 6px 10px !important;
  font-size: 0.82rem !important;
}

.milestone-del-btn {
  background: transparent;
  border: 0;
  color: var(--rdm-rose);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  opacity: 0.7;
}

.milestone-del-btn:hover {
  opacity: 1;
  background: rgba(244, 63, 94, 0.1);
}

.dialog-error {
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--rdm-rose);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--rdm-radius-sm);
}

.dialog-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--rdm-border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rdm-rose);
  background: transparent;
  border: 0;
  border-radius: var(--rdm-radius-sm);
  cursor: pointer;
}

.delete-btn:hover {
  background: rgba(244, 63, 94, 0.1);
}

.dialog-right-btns {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.cancel-btn {
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--rdm-text-muted);
  background: transparent;
  border: 1px solid var(--rdm-border);
  border-radius: var(--rdm-radius-sm);
  cursor: pointer;
}

.cancel-btn:hover {
  color: var(--rdm-text-main);
  background: var(--rdm-bg-surface-hover);
}

.save-btn {
  padding: 7px 18px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--rdm-emerald);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--rdm-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.save-btn:hover {
  filter: brightness(1.08);
}

/* ==========================================================================
   STANDALONE FOOTER
   ========================================================================== */
.roadmap-app-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rdm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--rdm-text-subtle);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mark {
  font-weight: 800;
  color: var(--rdm-emerald);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-link {
  color: var(--rdm-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--rdm-text-main);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 992px) {
  .header-inner {
    padding: 0 16px;
  }
  .roadmap-standalone-content {
    padding: 24px 16px 60px;
  }
  .header-center {
    order: 3;
    width: 100%;
    margin-top: 8px;
    padding-bottom: 8px;
  }
  .roadmap-app-header {
    height: auto;
    padding: 8px 0;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .roadmap-main-title {
    font-size: 1.8rem;
  }
  .roadmap-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .toolbar-left, .toolbar-right {
    width: 100%;
  }
  .horizon-pills-bar {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .search-input-wrap {
    width: 100%;
  }
  .search-input-wrap input {
    width: 100%;
    min-width: 0;
  }
  .custom-select {
    width: 100%;
  }
}
