/* roadmap-bubble.html — page-specific styles */

:root {
    --bg: #0c1015;
    --surface: #12171f;
    --surface2: #19202b;
    --surface3: #202a38;
    --border: #273445;
    --border2: #324157;
    --accent: #5ba3eb;
    --accent2: #2d89e5;
    --text: #d8e9fa;
    --text2: #8f9aa9;
    --text3: #8b96a6;
    --init-color: #8a98f6;
    --epic-color: #4898e8;
    --cap-color: #34d399;
    --feat-color: #8c99a8;
    --score-hi: #4ade80;
    --score-med: #fbbf24;
    --score-lo: #f87171;
    --mono: 'IBM Plex Mono', monospace;
    --sans: 'IBM Plex Sans', sans-serif;
    --c0: #8a98f6; /* DEC-ICAP-2026-01 alternatives */
    --c1: #4898e8; /* VAD · New Value-Add Distribution Platform */
    --c2: #34d399; /* BAI · Initrode Hydraulics Add-ons */
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    height: 100vh;
    overflow: hidden;
  }
  /* ── HEADER ── */
  header {
    background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    position: sticky; top: 0; z-index: 20;
  }
  .logo { display: flex; align-items: center; gap: 10px; }
  .logo img { height: 32px; }
  .header-title {
    font-size: 26px; font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: normal;
    background: linear-gradient(135deg, #ff6b00, #ff9933); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  }
  .header-stats { display: flex; gap: 16px; margin-left: auto; }

  .stat-val { font-family: var(--mono); font-size: 16px; font-weight: 500; color: var(--accent); line-height: 1; }
  .stat-label { font-size: 9px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text3); }
  .back-btn {
    background: none; border: 1px solid var(--border2); color: var(--text2);
    border-radius: 4px; padding: 5px 10px; font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px; transition: all .15s; white-space: nowrap; flex-shrink: 0;
  }
  .back-btn:hover { border-color: var(--accent); color: var(--text); }
  .back-btn .material-icons { font-size: 15px; }
  .next-step-btn { background: var(--accent2); border-color: var(--accent); color: #fff; font-weight: 600; }
  .next-step-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
  /* ── TOOLBAR ── */
  .toolbar {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 20px; display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; flex-wrap: wrap; position: sticky; top: 57px; z-index: 19;
  }
  .toolbar-label {
    font-size: 11px; font-weight: 500; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text3); white-space: nowrap;
  }
  .btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 4px; border: 1px solid var(--border2); background: var(--surface2);
    color: var(--text2); font-family: var(--sans); font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
  }
  .btn:hover { background: var(--surface3); border-color: var(--accent); color: var(--text); }
  .btn.active { background: var(--accent2); border-color: var(--accent); color: white; }
  .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  /* ── LAYOUT ── */
  main { padding: 24px 20px 48px; max-width: 1400px; width: 100%; margin: 0 auto; }
  .panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px 22px; margin-bottom: 28px;
  }
  .panel-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
  .panel-head h2 { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
  .panel-head .sub { font-size: 11px; color: var(--text3); font-family: var(--mono); }
  .panel-desc { font-size: 12px; color: var(--text2); margin-bottom: 18px; line-height: 1.5; max-width: 760px; }
  /* ── BUBBLE CHART ── */
  .chart-wrap { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
  .chart-svg-box { flex: 1 1 640px; min-width: 320px; }
  svg.bubble { width: 100%; height: auto; display: block; }
  .axis-line { stroke: var(--border2); stroke-width: 1; }
  .grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 4; }
  .axis-label { fill: var(--text2); font-family: var(--sans); font-size: 12px; font-weight: 500; }
  .axis-tick { fill: var(--text3); font-family: var(--mono); font-size: 10px; }
  .quad-label { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .04em; opacity: .5; }
  .quad-sub { font-family: var(--mono); font-size: 9px; letter-spacing: .05em; }
  .bubble-c { cursor: pointer; transition: opacity .2s, stroke-width .15s; }
  .bubble-c:hover { stroke: #fff; stroke-width: 2; }
  .bubble-num { fill: #fff; font-family: var(--mono); font-size: 10px; font-weight: 600; text-anchor: middle; pointer-events: none; }
  .dim { opacity: 0.08 !important; }
  /* tooltip */
  #tip {
    position: fixed; pointer-events: none; z-index: 999; display: none;
    background: var(--surface3); border: 1px solid var(--border2);
    border-radius: 6px; padding: 9px 11px; font-size: 11px; color: var(--text);
    box-shadow: 0 8px 24px rgba(0,0,0,.5); max-width: 240px;
  }
  #tip .tt { font-family: var(--mono); font-weight: 600; margin-bottom: 5px; font-size: 12px; }
  #tip .tr { display: flex; justify-content: space-between; gap: 16px; color: var(--text2); line-height: 1.6; }
  #tip .tr b { color: var(--text); font-family: var(--mono); }
  /* legend / ranked list beside chart */
  .chart-side { flex: 1 1 260px; min-width: 240px; }
  .rank-list { display: flex; flex-direction: column; gap: 4px; }
  .rank-row {
    display: flex; align-items: center; gap: 9px; padding: 6px 8px;
    border-radius: 5px; background: var(--surface2); border: 1px solid var(--border);
    font-size: 12px; cursor: default; transition: opacity .2s;
  }
  .rank-idx { font-family: var(--mono); color: var(--text3); width: 18px; text-align: right; font-size: 11px; }
  .rank-name { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .rank-score { font-family: var(--mono); font-weight: 600; font-size: 12px; }
  /* ── ROADMAP ── */
  .road-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .road-col { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
  .road-col-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .road-col-title { font-size: 13px; font-weight: 600; letter-spacing: .03em; display: flex; align-items: center; gap: 7px; }
  .phase-pill { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 10px; color: #e2e6ec; font-weight: 600; }
  .road-col-count { font-family: var(--mono); font-size: 11px; color: var(--text3); }
  .card {
    background: var(--surface); border: 1px solid var(--border2);
    border-left-width: 3px; border-radius: 6px; padding: 10px 11px; margin-bottom: 9px;
    transition: opacity .2s, transform .12s; cursor: default;
  }
  .card:hover { transform: translateX(2px); border-color: var(--accent); }
  .card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 7px; }
  .card-name { font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.3; }
  .card-init { font-size: 9px; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); margin-top: 3px; font-weight: 500; }
  .card-score { font-family: var(--mono); font-size: 14px; font-weight: 600; flex-shrink: 0; }
  .card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
  .chip {
    font-family: var(--mono); font-size: 9.5px; padding: 2px 6px; border-radius: 3px;
    background: var(--surface3); color: var(--text2); border: 1px solid var(--border);
    display: inline-flex; align-items: center; gap: 3px;
  }
  .mini-bars { display: flex; gap: 8px; margin-top: 8px; }
  .mini-bar { flex: 1; }
  .mini-bar-lab { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); margin-bottom: 2px; display: flex; justify-content: space-between; }
  .mini-bar-track { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; }
  .mini-bar-fill { height: 100%; border-radius: 2px; }
  .footer-note { font-size: 11px; color: var(--text3); text-align: center; margin-top: 8px; line-height: 1.6; }
  @media (max-width: 860px){ .road-grid{ grid-template-columns: 1fr; } }

  /* ── EXPORT BUTTON ── */
  .btn.btn-export { background:#16a34a; border-color:#15803d; color:#fff; }
  .btn.btn-export:hover { background:#22c55e; border-color:#16a34a; color:#fff; }
  .btn.btn-export .material-icons { font-size:15px; }

  /* ── GANTT VIEW ── */
  #ganttPanel { display:none; }
  .gantt-wrap { position:relative; }
  .gantt-scroll {
    overflow:auto; max-height:600px; border:1px solid var(--border);
    border-radius:8px; background:var(--surface); position:relative;
  }
  .gantt-scroll::-webkit-scrollbar { width:12px; height:12px; }
  .gantt-scroll::-webkit-scrollbar-thumb { background:var(--border2); border-radius:6px; border:3px solid var(--surface); }
  .gantt-scroll::-webkit-scrollbar-track { background:var(--surface); }
  .gantt-grid { display:inline-block; min-width:100%; }
  .gantt-head-row { display:flex; }
  .gantt-corner {
    position:sticky; left:0; z-index:8; flex-shrink:0; box-sizing:border-box;
    background:var(--surface3); border-right:1px solid var(--border2); border-bottom:1px solid var(--border2);
    display:flex; align-items:center;
  }
  .gantt-tl { display:flex; flex-shrink:0; box-sizing:border-box; background:var(--surface3); border-bottom:1px solid var(--border2); }
  .gantt-tick {
    flex-shrink:0; font-family:var(--mono); font-size:9px; color:var(--text3);
    border-right:1px solid var(--border); padding:6px 0 6px 5px; box-sizing:border-box;
    text-transform:uppercase; letter-spacing:.05em;
  }
  .gantt-phaseband { position:absolute; top:0; bottom:0; box-sizing:border-box; }
  .gantt-row { display:flex; align-items:stretch; border-bottom:1px solid var(--border); }
  .gantt-row:hover { background:var(--surface2); }
  .gantt-label {
    position:sticky; left:0; z-index:5; flex-shrink:0; box-sizing:border-box;
    background:var(--surface); border-right:1px solid var(--border2); padding:0 10px;
    display:flex; align-items:center; gap:8px;
  }
  .gantt-row:hover .gantt-label { background:var(--surface2); }
  .gantt-lname { font-size:11.5px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .gantt-track { position:relative; flex-shrink:0; box-sizing:border-box; }
  .gantt-bar {
    position:absolute; top:50%; transform:translateY(-50%); height:20px; border-radius:4px;
    cursor:pointer; display:flex; align-items:center; padding:0 6px; box-sizing:border-box;
    overflow:hidden; box-shadow:0 1px 3px rgba(0,0,0,.4); transition:filter .15s;
  }
  .gantt-bar:hover { filter:brightness(1.25); }
  .gantt-bar span { font-family:var(--mono); font-size:9px; font-weight:600; color:#fff; white-space:nowrap; }
  /* d-pad scroll controls */
  .scroll-pad {
    position:absolute; right:18px; bottom:18px; z-index:14;
    display:grid; grid-template-columns:repeat(3,34px); grid-template-rows:repeat(3,34px); gap:4px;
  }
  .scroll-btn {
    border:1px solid var(--border2); background:rgba(32,42,56,.94); color:var(--text2);
    border-radius:7px; cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition:all .15s; box-shadow:0 2px 8px rgba(0,0,0,.45);
  }
  .scroll-btn:hover { background:var(--accent2); border-color:var(--accent); color:#fff; }
  .scroll-btn:active { transform:scale(.92); }
  .scroll-btn .material-icons { font-size:20px; }

  /* ── PRINT / PDF ── */
  @media print {
    @page { size: landscape; margin: 12mm; }
    html, body {
      background:#fff !important; color:#0c1015 !important;
      -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .toolbar, .back-btn, #tip, .sidebar, .scroll-pad { display:none !important; }
    .app-container { display:block !important; height:auto !important; }
    .main-content { overflow:visible !important; background:#fff !important; }
    header { position:static; border-bottom:1px solid #c1cad7; background:#fff !important; }
    .header-title, .stat-label { color:#0c1015 !important; -webkit-text-fill-color:#0c1015 !important; background:none !important; }
    .stat-val { color:#1a62ad !important; }
    main { max-width:none; padding:0; }
    .panel {
      background:#fff !important; border:1px solid #c1cad7 !important;
      break-inside: avoid; page-break-inside: avoid; margin-bottom:18px;
    }
    .panel:nth-of-type(2) { page-break-before: always; }
    .panel-head h2, .card-name, .rank-name { color:#0c1015 !important; }
    .panel-desc, .panel-head .sub, .card-init, .footer-note { color:#324156 !important; }
    /* chart text legible on white */
    .axis-label { fill:#0c1015 !important; }
    .axis-tick, .quad-sub { fill:#596473 !important; }
    .grid-line { stroke:#dce1e8 !important; }
    .axis-line { stroke:#8c97a6 !important; }
    /* roadmap & lists on white */
    .road-col, .rank-row { background:#f6f7f9 !important; border-color:#d6dce4 !important; }
    .card { background:#fff !important; border-color:#c1cad7 !important; }
    .chip { background:#e9f2fc !important; color:#253141 !important; border-color:#d6dce4 !important; }
    .mini-bar-track { background:#d8e9fa !important; }
    .road-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .card:hover { transform:none !important; }
    .dim { opacity:1 !important; }  /* print all items regardless of filter */
  }

  /* Sidebar & layout (matched to score-rank.html) */
  .app-container { display: flex; height: 100vh; }
  .sidebar {
    width: 280px; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1); color: white; padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3); transition: all 0.3s ease;
    overflow-y: auto; flex-shrink: 0;
  }
  .sidebar.collapsed { width: 80px; }

  .sidebar .logo { display: flex; align-items: center; font-size: 20px; font-weight: 600; color: white; }
  .sidebar .logo a { display: flex; align-items: center; text-decoration: none; }
  .sidebar .logo img { height: 32px; }
  .nav-item {
    display: flex; align-items: center; padding: 12px 24px; cursor: pointer; transition: all 0.3s ease;
    border: none; background: none; color: white; width: 100%; text-align: left; position: relative;
    border-radius: 0 25px 25px 0; margin: 4px 0; font-size: 14px; font-family: inherit;
  }

  .nav-item.section-header {
    background: rgba(43,139,230,0.2); border-left: 4px solid #2b8be6; color: #cdd4df;
    font-weight: 600; margin: 8px 0 4px 0; box-shadow: 0 4px 15px rgba(43,139,230,0.2);
  }
  .nav-item.active-page {
    background: linear-gradient(135deg, rgba(43,139,230,0.3), rgba(84,104,242,0.3));
    border-left: 4px solid #5468f2; color: white; font-weight: 500; box-shadow: 0 4px 20px rgba(84,104,242,0.3);
  }
  .nav-item .material-icons { margin-right: 12px; font-size: 20px; flex-shrink: 0; color: inherit; }
  .sidebar.collapsed .nav-text { display: none; }
  .sidebar.collapsed .expand-icon { display: none; }
  .nav-text { flex: 1; white-space: nowrap; overflow: hidden; }
  .expand-icon { margin-left: auto; transition: transform 0.3s ease; font-size: 18px; flex-shrink: 0; }
  .main-content { flex: 1; display: flex; flex-direction: column; background: rgba(255,255,255,0.02); min-width: 0; overflow-y: auto; }
  @media (max-width: 768px){ .sidebar{ width: 80px; } .sidebar .nav-text{ display: none; } }

/* PROCESS-SUBMENU-CSS */
  .nav-item.section-header { background: rgba(43,139,230,0.2); border-left:4px solid #2b8be6; color:#cdd4df; font-weight:600; margin:8px 0 4px 0; box-shadow:0 4px 15px rgba(43,139,230,0.2); }
  .expand-icon { margin-left:auto; transition:transform .3s ease; font-size:18px; flex-shrink:0; }
  .nav-item.section-header.expanded .expand-icon { transform: rotate(90deg); }
  .nav-subitems { max-height:0; overflow:hidden; transition:max-height .3s ease; }
  .nav-subitems.expanded { max-height:1400px; }
  .sidebar.collapsed .nav-subitems { display:none; }
  .sidebar.collapsed .expand-icon { display:none; }
  .nav-subitems .nav-item { padding-left:46px; font-weight:400; margin:2px 0; font-size:13px; }
  .nav-subitems .nav-item .material-icons { font-size:18px; }
  .nav-subitems .nav-item:hover { background:rgba(255,255,255,0.1); transform:translateX(8px); }
  .nav-subitems .nav-item.active-page { background:rgba(84,104,242,0.2); border-left:3px solid #5468f2; box-shadow:none; }

/* ===== BENEFITS-SIDEBAR-STYLE — sidebar menu design ported from benefits-realization.html ===== */
  .sidebar { width:280px; background:rgba(255,255,255,0.05); backdrop-filter:blur(20px); border-right:1px solid rgba(255,255,255,0.1); color:white; padding:24px 0; box-shadow:2px 0 25px rgba(0,0,0,0.3); transition:all .3s ease; overflow-y:auto; flex-shrink:0; }
  .sidebar.collapsed { width:80px; }

  .sidebar .logo { display:flex; align-items:center; font-size:20px; font-weight:600; color:white; }
  .sidebar .logo img { height:32px; }
  .nav-item { display:flex; align-items:center; padding:12px 24px; cursor:pointer; transition:all .3s ease; border:none; background:none; color:white; width:100%; text-align:left; position:relative; border-radius:0 25px 25px 0; margin:4px 0; font-size:14px; font-family:inherit; }

  .nav-item.active-page { background:linear-gradient(135deg,rgba(43,139,230,0.3),rgba(84,104,242,0.3)); border-left:4px solid #5468f2; color:white; font-weight:500; box-shadow:0 4px 20px rgba(84,104,242,0.3); }
  .nav-item .material-icons { margin-right:12px; font-size:20px; flex-shrink:0; color:inherit; }
  .sidebar.collapsed .nav-text { display:none; }
  .nav-text { flex:1; white-space:nowrap; overflow:hidden; }
  .nav-item.section-header { background:rgba(43,139,230,0.2); border-left:4px solid #2b8be6; color:#cdd4df; font-weight:600; margin:8px 0 4px 0; box-shadow:0 4px 15px rgba(43,139,230,0.2); }
  .expand-icon { margin-left:auto; transition:transform .3s ease; font-size:18px; flex-shrink:0; }
  .nav-item.section-header.expanded .expand-icon { transform:rotate(90deg); }
  .nav-subitems { max-height:0; overflow:hidden; transition:max-height .3s ease; background:transparent; backdrop-filter:none; }
  .nav-subitems.expanded { max-height:1400px; }
  .sidebar.collapsed .nav-subitems { display:none; }
  .sidebar.collapsed .expand-icon { display:none; }
  .nav-subitems .nav-item { padding-left:46px; font-weight:400; margin:2px 0; font-size:13px; background:transparent; }
  .nav-subitems .nav-item .material-icons { font-size:18px; }
  .nav-subitems .nav-item:hover { background:rgba(255,255,255,0.1); transform:translateX(8px); }
  .nav-subitems .nav-item.active-page { background:rgba(84,104,242,0.2); border-left:3px solid #5468f2; box-shadow:none; }

  .process-progress-pct { color:#fff; font-weight:600; background:linear-gradient(135deg,#2b8be6,#5468f2); padding:3px 10px; border-radius:20px; }

  .process-step { position:relative; z-index:1; display:flex; flex-direction:column; align-items:center; gap:9px; flex:1; cursor:pointer; background:none; border:none; font-family:inherit; padding:0; }
