/* resource-capacity.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;
    --score-hi:#4ade80; --score-med:#fbbf24; --score-lo:#f87171;
    --mono:'IBM Plex Mono',monospace; --sans:'IBM Plex Sans',sans-serif;
  }
  * { box-sizing:border-box; margin:0; padding:0; }
  body { background:var(--bg); color:var(--text); font-family:var(--sans); height:100vh; overflow:hidden; }

  /* ── SIDEBAR / LAYOUT (from 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 .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; }
  .main-content { flex:1; display:flex; flex-direction:column; background:rgba(255,255,255,0.02); min-width:0; overflow:hidden; }
  .main-header { background:rgba(255,255,255,0.05); backdrop-filter:blur(20px); border-bottom:1px solid rgba(255,255,255,0.1); padding:16px 28px; box-shadow:0 4px 20px rgba(0,0,0,0.1); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
  .main-header .header-left { display:flex; align-items:center; gap:16px; }
  .main-header .menu-btn { background:none; border:none; cursor:pointer; color:#f2f5f9; display:flex; }
  .main-header .header-title { font-size:24px; font-weight:700; background:linear-gradient(135deg,#ff6b00,#ff9933); background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
  .header-stats { display:flex; gap:18px; }

  .stat-val { font-family:var(--mono); font-size:17px; font-weight:500; color:var(--accent); line-height:1; }
  .stat-val.warn { color:var(--score-lo); }
  .next-step-btn { display:inline-flex; align-items:center; gap:5px; background:var(--accent2); border:1px solid var(--accent); color:#fff; font-weight:600; font-size:12px; border-radius:5px; padding:7px 13px; cursor:pointer; transition:all .15s; white-space:nowrap; }
  .next-step-btn:hover { background:var(--accent); }
  .next-step-btn .material-icons { font-size:16px; }
  .stat-label { font-size:9px; font-weight:500; text-transform:uppercase; letter-spacing:.1em; color:var(--text3); }

  /* ── 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; }
  .toolbar-label { font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:.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 .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; display:inline-block; }
  .note { font-size:11px; color:var(--text2); margin-left:auto; }

  /* ── CONTENT ── */
  .workspace { flex:1; display:flex; min-height:0; }
  .content { flex:1; overflow-y:auto; padding:20px 24px 36px; min-width:0; }
  .panel { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:16px 18px; margin-bottom:18px; }
  .panel-head { display:flex; align-items:baseline; gap:10px; margin-bottom:14px; }
  .panel-head h2 { font-size:14px; font-weight:600; }
  .panel-head .sub { font-size:11px; color:var(--text3); font-family:var(--mono); }

  /* team cards grid */
  .team-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; margin-bottom:18px; }
  .team-card { background:var(--surface); border:1px solid var(--border); border-top:3px solid var(--accent); border-radius:10px; padding:16px; transition:opacity .2s; }
  .team-card.dim { opacity:.3; }
  .tc-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
  .tc-name { font-size:14px; font-weight:600; line-height:1.25; }
  .tc-sub { font-size:11px; color:var(--text3); margin-top:2px; font-family:var(--mono); }
  .tc-util { text-align:right; flex-shrink:0; }
  .tc-util-val { font-family:var(--mono); font-size:22px; font-weight:600; line-height:1; }
  .tc-util-lab { font-size:8.5px; text-transform:uppercase; letter-spacing:.08em; color:var(--text3); }
  .util-track { height:8px; background:var(--surface3); border-radius:4px; overflow:hidden; margin:12px 0 4px; position:relative; }
  .util-fill { height:100%; border-radius:4px; }
  .util-cap-mark { position:absolute; top:-2px; bottom:-2px; width:2px; background:var(--text); opacity:.6; }
  .tc-rowline { display:flex; justify-content:space-between; font-size:11px; color:var(--text2); margin-top:3px; }
  .tc-stats { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
  .mini-stat { flex:1 1 60px; background:var(--surface2); border:1px solid var(--border); border-radius:6px; padding:7px 8px; }
  .mini-stat .v { font-family:var(--mono); font-size:14px; font-weight:600; color:var(--text); }
  .mini-stat .l { font-size:8.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--text3); margin-top:1px; }
  .role-bars { margin-top:13px; }
  .role-bars .rl-title { font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--text3); margin-bottom:6px; }
  .role-row { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
  .role-name { font-size:10.5px; color:var(--text2); width:92px; flex-shrink:0; }
  .role-track { flex:1; height:6px; background:var(--surface3); border-radius:3px; overflow:hidden; }
  .role-fill { height:100%; border-radius:3px; }
  .role-val { font-family:var(--mono); font-size:9.5px; color:var(--text3); width:54px; text-align:right; flex-shrink:0; }

  /* horizontal bar chart rows */
  .bar-row { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
  .bar-label { width:160px; flex-shrink:0; font-size:12px; color:var(--text); display:flex; align-items:center; gap:7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .bar-area { flex:1; min-width:0; }
  .bar-track { height:22px; background:var(--surface2); border:1px solid var(--border); border-radius:5px; overflow:hidden; display:flex; }
  .bar-seg { height:100%; display:flex; align-items:center; }
  .bar-cap { position:relative; }
  .cap-line { position:absolute; top:-3px; bottom:-3px; width:2px; background:var(--text); opacity:.7; }
  .bar-val { font-family:var(--mono); font-size:11px; font-weight:600; flex-shrink:0; width:120px; text-align:right; }

  .two-col { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  @media (max-width:1100px){ .two-col { grid-template-columns:1fr; } }

  .donut-wrap { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
  .legend2 { display:flex; flex-direction:column; gap:7px; }
  .legend2 .lg { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--text2); }
  .legend2 .lg b { color:var(--text); font-family:var(--mono); }
  .legend2 .lg .nm { width:110px; }
  .legend2 .lg .pw { font-family:var(--mono); font-size:11px; color:var(--text3); width:78px; text-align:right; }

  /* side panel: flags */
  .flag-panel { width:300px; flex-shrink:0; background:var(--surface); border-left:1px solid var(--border); display:flex; flex-direction:column; min-height:0; }
  .flag-head { padding:14px 16px 10px; border-bottom:1px solid var(--border); }
  .flag-head h3 { font-size:13px; font-weight:600; display:flex; align-items:center; gap:7px; }
  .flag-head h3 .material-icons { font-size:17px; color:var(--score-med); }
  .flag-head p { font-size:11px; color:var(--text3); margin-top:4px; line-height:1.5; }
  .flag-list { flex:1; overflow-y:auto; padding:10px 12px; display:flex; flex-direction:column; gap:7px; }
  .flag-row { display:flex; gap:9px; padding:9px 10px; border-radius:6px; background:var(--surface2); border:1px solid var(--border); border-left:3px solid var(--score-med); }
  .flag-ico { flex-shrink:0; }
  .flag-ico .material-icons { font-size:18px; }
  .flag-main { flex:1; min-width:0; }
  .flag-title { font-size:12px; color:var(--text); line-height:1.3; }
  .flag-desc { font-size:10.5px; color:var(--text3); margin-top:3px; line-height:1.4; }

  /* 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:260px; }
  #tip .tt { font-family:var(--mono); font-weight:600; margin-bottom:6px; font-size:12px; }
  #tip .tr { display:flex; justify-content:space-between; gap:16px; color:var(--text2); line-height:1.7; }
  #tip .tr b { color:var(--text); font-family:var(--mono); }

  @media (max-width:1024px){ .flag-panel { display:none; } }
  @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; }

  .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; }
