/* ==========================================
   CS BUSINESS VALUE CALCULATOR
   IBM Carbon Design System
   ========================================== */

/* IBM Plex Sans from Google Fonts (loaded in HTML) */
:root {
  /* IBM Carbon color tokens */
  --ibm-blue:        #0f62fe;
  --ibm-blue-hover:  #0353e9;
  --ibm-blue-dark:   #002d9c;
  --ibm-blue-light:  #d0e2ff;
  --ibm-blue-bg:     #edf5ff;

  --ibm-teal:        #009d9a;
  --ibm-green:       #198038;
  --ibm-green-light: #defbe6;
  --ibm-red:         #da1e28;
  --ibm-yellow:      #f1c21b;

  /* Carbon UI Shell */
  --shell-bg:        #161616;   /* sidebar */
  --shell-hover:     #262626;
  --shell-active:    #393939;
  --shell-selected:  #0f62fe;

  /* Carbon layer system */
  --bg-page:         #f4f4f4;   /* page background */
  --bg-ui:           #ffffff;   /* card / layer-01 */
  --bg-field:        #f4f4f4;   /* input background */
  --bg-subtle:       #e8e8e8;   /* subtle background */

  /* Carbon text */
  --text-primary:    #161616;
  --text-secondary:  #525252;
  --text-placeholder:#a8a8a8;
  --text-on-color:   #ffffff;
  --text-helper:     #6f6f6f;

  /* Carbon borders */
  --border-subtle:   #e0e0e0;
  --border-strong:   #8d8d8d;
  --border-inverse:  #393939;
  --focus:           #0f62fe;

  /* Typography */
  --font: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* Carbon has zero border-radius */
  --radius: 0px;
  --radius-sm: 0px;

  --sidebar-w: 256px;
  --shadow: 0 2px 6px rgba(0,0,0,0.20);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────
   APP LAYOUT
───────────────────────────────────────── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* ─────────────────────────────────────────
   IBM CARBON UI SHELL — SIDEBAR
───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--shell-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 10;
  border-right: 1px solid #393939;
}

/* Brand / Header */
.brand {
  display: flex; align-items: center;
  min-height: 56px;
  padding: 12px 16px;
  background: var(--ibm-blue);
  flex-shrink: 0;
  border-bottom: 1px solid #0353e9;
}
.brand-logo {
  display: flex; align-items: center; gap: 10px;
}
.brand-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  line-height: 1.45;
  letter-spacing: 0.2px;
}

/* Nav label */
.nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  color: #6f6f6f;
  padding: 20px 16px 8px;
}

.nav { display: flex; flex-direction: column; flex: 1; }
.nav-item {
  display: flex; align-items: center;
  height: 48px;
  padding: 0 16px;
  color: #c6c6c6;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.16px;
  transition: background 0.1s, color 0.1s;
  cursor: pointer;
  border: none;
  position: relative;
  gap: 12px;
}
.nav-item:hover { background: var(--shell-hover); color: #f4f4f4; }
.nav-item.active {
  background: var(--shell-active);
  color: #ffffff;
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--ibm-blue);
}
.nav-step {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #393939;
  font-size: 11px; font-weight: 600;
  color: #a8a8a8;
  flex-shrink: 0;
}
.nav-item.active .nav-step {
  background: var(--ibm-blue);
  color: #fff;
}

/* Status strip */
.sidebar-status {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #393939;
  font-size: 12px;
  color: #6f6f6f;
  background: #0f0f0f;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #525252;
  flex-shrink: 0;
  transition: background 0.3s;
}
.status-dot.ok    { background: #42be65; }
.status-dot.warn  { background: var(--ibm-yellow); }
.status-dot.error { background: var(--ibm-red); }
#statusText { font-size: 12px; letter-spacing: 0.32px; }

/* ─────────────────────────────────────────
   MAIN CONTENT AREA
───────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 0;
  min-width: 0;
  width: calc(100vw - var(--sidebar-w));
  max-width: calc(100vw - var(--sidebar-w));
  overflow-x: hidden;
  overflow-y: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}



/* Page header bar */
.section-header {
  background: var(--bg-ui);
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 32px 16px;
  margin-bottom: 0;
  flex-shrink: 0;
}
.section-header h1 {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.2;
}
.section-header p {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.16px;
}

/* Content padding */
.section-content {
  padding: 32px 48px;
}

/* ─────────────────────────────────────────
   SECTIONS
───────────────────────────────────────── */
.section { display: none; animation: fadeIn 0.2s ease; }
.section.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ─────────────────────────────────────────
   CARBON TILES (cards)
───────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-subtle);
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
/* Wrap card-grid in a content block */
.cards-wrap {
  padding: 16px 24px;
  background: var(--bg-page);
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.card {
  background: var(--bg-ui);
  padding: 16px 20px;
  transition: box-shadow 0.15s;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--ibm-blue); }
.card.span-2 { grid-column: span 2; }
.card.span-full { grid-column: span 2; }

.card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 8px;
}

/* ─────────────────────────────────────────
   FORM ELEMENTS — Carbon style
───────────────────────────────────────── */
.field {
  display: flex; flex-direction: column; gap: 0;
  margin-bottom: 16px;
}
.field:last-child { margin-bottom: 0; }

.field label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.32px;
  margin-bottom: 4px;
  display: block;
}

.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 160px; }
.field-row.vertical { flex-direction: column; }
.field.narrow { flex: 0 0 140px; }

input[type="text"],
input[type="number"],
select {
  background: var(--bg-field);
  border: none;
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 11px 16px 11px 16px;
  outline: none;
  transition: background 0.15s;
  width: 100%;
  height: 40px;
  letter-spacing: 0.16px;
}
input:focus, select:focus {
  background: var(--bg-ui);
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  border-bottom-color: transparent;
}
input::placeholder { color: var(--text-placeholder); }
select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23525252' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

.input-percent {
  display: flex; align-items: stretch;
  background: var(--bg-field);
  border-bottom: 1px solid var(--border-strong);
  height: 40px;
}
.input-percent input {
  border: none; background: transparent;
  flex: 1; height: 100%;
}
.input-percent:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  background: var(--bg-ui);
}
.input-percent:focus-within input { background: transparent; }
.input-percent span {
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border-left: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  white-space: nowrap;
  font-weight: 500;
}
.input-percent.small input { padding: 0 16px; }

/* ─────────────────────────────────────────
   TOGGLE — Carbon style
───────────────────────────────────────── */
.toggle-group { display: flex; flex-direction: column; gap: 16px; }
.toggle-item {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: var(--text-primary);
  cursor: pointer;
  letter-spacing: 0.16px;
}
.toggle { position: relative; display: inline-block; width: 48px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; inset: 0;
  background: #8d8d8d;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.15s;
}
.slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .slider { background: var(--ibm-blue); }
input:checked + .slider::before { transform: translateX(24px); }
input:focus + .slider { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ─────────────────────────────────────────
   CHANNEL ROWS
───────────────────────────────────────── */
.channel-inputs { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border-subtle); }
.channel-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.channel-row.inactive { opacity: 0.35; pointer-events: none; }
.ch-label {
  font-size: 14px; color: var(--text-secondary); min-width: 110px;
  letter-spacing: 0.16px;
}
.channel-row input {
  width: 120px; text-align: right; padding: 8px 12px; height: 36px;
}

/* ─────────────────────────────────────────
   AUTOMATION GRID
───────────────────────────────────────── */
.auto-grid { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--border-subtle); }
.auto-row {
  display: grid;
  grid-template-columns: 140px 1fr 110px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.auto-row.header {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.32px;
  padding: 8px 0;
  background: transparent; border-bottom: 1px solid var(--border-strong);
}
.auto-row.inactive { opacity: 0.3; pointer-events: none; }

/* ─────────────────────────────────────────
   LOCATION GRID
───────────────────────────────────────── */
.location-grid {
  display: grid;
  grid-template-columns: 100px 1fr 110px;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}
.location-grid .loc-header {
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.32px;
  grid-column: span 3;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-strong);
  display: grid; grid-template-columns: 100px 1fr 110px; gap: 12px;
}

/* ─────────────────────────────────────────
   LIVE CHECKS — Carbon notification style
───────────────────────────────────────── */
.checks-bar {
  display: flex; gap: 0;
  background: var(--bg-ui);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.check-item {
  display: flex; flex-direction: column;
  padding: 12px 24px;
  border-right: 1px solid var(--border-subtle);
  flex: 1;
  min-width: 140px;
}
.check-item:last-child { border-right: none; }
.check-icon { display: none; }
.check-label {
  font-size: 11px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.32px;
  font-weight: 600; margin-bottom: 6px;
}
.check-value {
  font-size: 20px; font-weight: 300;
  color: var(--text-primary);
  font-family: var(--font);
  letter-spacing: -0.3px;
}

/* Labels */
.required { color: var(--ibm-red); font-size: 11px; }
.optional { color: var(--text-placeholder); font-size: 11px; }

/* ─────────────────────────────────────────
   NAV FOOTER — Carbon button style
───────────────────────────────────────── */
.nav-footer {
  display: flex; justify-content: flex-end; gap: 0;
  padding: 14px 32px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-ui);
  flex-shrink: 0;
}
.btn-next, .btn-back, .btn-export {
  font-family: var(--font);
  font-size: 14px; font-weight: 400;
  padding: 0 24px;
  height: 48px;
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  letter-spacing: 0.16px;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-next {
  background: var(--ibm-blue);
  color: #fff;
}
.btn-next:hover { background: var(--ibm-blue-hover); }
.btn-next::after { content: '→'; font-size: 16px; }
.btn-back {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  margin-right: 1px;
}
.btn-back:hover { background: var(--border-subtle); }
.btn-export {
  background: var(--bg-ui);
  color: var(--ibm-blue);
  border: 1px solid var(--ibm-blue);
  margin-right: 8px;
}
.btn-export:hover { background: var(--ibm-blue-bg); }

/* ─────────────────────────────────────────
   RESULTS — KPI STRIP
───────────────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}
.kpi {
  background: var(--bg-ui);
  padding: 16px 14px;
  border-right: 1px solid var(--border-subtle);
}
.kpi:last-child { border-right: none; }
.kpi.accent {
  background: var(--ibm-blue);
  border-right-color: var(--ibm-blue-hover);
}
.kpi-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.32px; text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.kpi.accent .kpi-label { color: rgba(255,255,255,0.7); }
.kpi-value {
  font-size: 22px; font-weight: 300;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}
.kpi.accent .kpi-value { color: #fff; }

/* ─────────────────────────────────────────
   RESULTS GRID
───────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-subtle);
  margin: 0;
}
.chart-card { min-height: 220px; background: var(--bg-ui); padding: 16px; }
canvas { max-width: 100%; }

/* ─────────────────────────────────────────
   DATA TABLE — Carbon data table
───────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.data-table thead tr {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-strong);
}
.data-table th {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.32px;
  color: var(--text-secondary);
  padding: 12px 16px;
  text-align: right;
  white-space: nowrap;
}
.data-table th:first-child { text-align: left; }
.data-table th.col-total {
  background: var(--ibm-blue-bg);
  color: var(--ibm-blue);
  border-left: 2px solid var(--ibm-blue);
}
.data-table td {
  padding: 12px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border-subtle);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  letter-spacing: 0.16px;
}
.data-table td:first-child { text-align: left; color: var(--text-secondary); font-size: 13px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-field); }
.data-table tr.highlight td {
  color: var(--ibm-green);
  font-weight: 600;
}
.data-table tr.highlight:hover td { background: var(--ibm-green-light); }
.data-table tr.total td {
  font-weight: 600; color: var(--text-primary);
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-strong);
}
.data-table td.col-total {
  background: var(--ibm-blue-bg);
  font-weight: 600; color: var(--ibm-blue);
  border-left: 2px solid var(--ibm-blue);
}
.data-table tr.highlight td.col-total {
  background: var(--ibm-green-light);
  color: var(--ibm-green);
  border-left-color: var(--ibm-green);
}
.data-table tr.total td.col-total {
  background: #d0e2ff;
  color: var(--ibm-blue-dark);
}

/* ─────────────────────────────────────────
   NARRATIVE
───────────────────────────────────────── */
.narrative { font-size: 14px; color: var(--text-secondary); line-height: 1.9; letter-spacing: 0.16px; }
.narrative p { margin-bottom: 10px; }
.narrative strong { color: var(--text-primary); font-weight: 600; }

/* ─────────────────────────────────────────
   ADMIN PANEL — Carbon notification/modal
───────────────────────────────────────── */
.admin-banner {
  background: #393939;
  border-left: 4px solid var(--ibm-blue);
  padding: 10px 24px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.admin-banner p { font-size: 13px; color: #c6c6c6; margin: 0; letter-spacing: 0.16px; }
.admin-banner strong { display: block; font-size: 14px; font-weight: 600; color: #f4f4f4; margin-bottom: 2px; }
.btn-admin {
  background: var(--ibm-blue);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: 14px; font-weight: 400;
  padding: 0 20px;
  height: 40px;
  cursor: pointer;
  transition: background 0.1s;
  white-space: nowrap;
  letter-spacing: 0.16px;
}
.btn-admin:hover { background: var(--ibm-blue-hover); }

.admin-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000; align-items: center; justify-content: center;
}
.admin-modal-overlay.open { display: flex; }
.admin-modal {
  background: var(--bg-ui);
  width: 560px; max-width: 96vw; max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  animation: fadeIn 0.15s ease;
}
.admin-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: var(--shell-bg);
  position: sticky; top: 0; z-index: 1;
  border-bottom: 1px solid #393939;
}
.admin-modal-header h2 {
  font-size: 16px; font-weight: 400;
  color: #f4f4f4; letter-spacing: 0;
}
.btn-close-modal {
  background: none; border: none;
  font-size: 20px; color: #6f6f6f;
  cursor: pointer; padding: 4px 8px;
  line-height: 1;
  transition: color 0.1s;
}
.btn-close-modal:hover { color: #f4f4f4; }
.admin-modal-body { padding: 24px; }
.admin-section-title {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.32px;
  color: var(--ibm-blue);
  margin: 24px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}
.admin-section-title:first-child { margin-top: 0; }
.admin-row {
  display: grid; grid-template-columns: 1fr 130px;
  gap: 16px; align-items: center; margin-bottom: 12px;
}
.admin-row label {
  font-size: 13px; color: var(--text-secondary);
  letter-spacing: 0.16px;
}
.admin-row input, .admin-row select { height: 36px; font-size: 13px; }
.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: flex-end; gap: 0;
  position: sticky; bottom: 0; background: var(--bg-ui);
}
.btn-save-admin {
  background: var(--ibm-blue); color: #fff;
  font-family: var(--font); font-size: 14px; font-weight: 400;
  padding: 0 24px; height: 48px;
  border: none; cursor: pointer;
  letter-spacing: 0.16px;
}
.btn-save-admin:hover { background: var(--ibm-blue-hover); }
.btn-cancel-admin {
  background: var(--bg-subtle); color: var(--text-primary);
  border: 1px solid var(--border-strong);
  font-family: var(--font); font-size: 14px;
  padding: 0 20px; height: 48px;
  cursor: pointer; margin-right: 1px;
  letter-spacing: 0.16px;
}
.btn-cancel-admin:hover { background: var(--border-subtle); }

/* ─────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #8d8d8d; }

/* ─────────────────────────────────────────
   PRINT
───────────────────────────────────────── */
@media print {
  .sidebar, .nav-footer, .admin-banner, .admin-modal-overlay { display: none !important; }
  .main { margin-left: 0; }
  .section { display: block !important; page-break-before: always; }
  .section:first-of-type { page-break-before: auto; }
  body { background: #fff; }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1100px) {
  .card-grid { grid-template-columns: 1fr; }
  .card.span-2 { grid-column: span 1; }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 48px; }
  .brand-title, .nav-label,
  .nav-item span:not(.nav-step), .sidebar-status span { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .section-header, .cards-wrap, .nav-footer { padding-left: 16px; padding-right: 16px; }
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .usecase-generic-list { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   PPT EXPORT BUTTON
───────────────────────────────────────── */
.btn-ppt {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 0 24px;
  height: 48px;
  cursor: pointer;
  transition: background 0.1s;
  border: none;
  letter-spacing: 0.16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ibm-blue);
  color: #fff;
  margin-left: 1px;
}
.btn-ppt:hover { background: var(--ibm-blue-hover); }
.btn-ppt:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ─────────────────────────────────────────
   USE CASES TAB
───────────────────────────────────────── */
.cards-wrap .card.span-full { grid-column: 1 / -1; }

.usecase-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.usecase-table th {
  background: var(--bg-subtle);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.32px; text-transform: uppercase;
  color: var(--text-secondary);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
.usecase-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}
.usecase-table tr:hover td { background: var(--ibm-blue-bg); }
.usecase-table tr:last-child td { border-bottom: none; }

.uc-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px;
  border-radius: 2px;
  white-space: nowrap;
}
.uc-badge.sprint-1 { background: #d0e2ff; color: #0043ce; }
.uc-badge.sprint-2 { background: #d9fbfb; color: #005d5d; }
.uc-badge.sprint-3 { background: #defbe6; color: #044317; }
.uc-badge.sprint-4 { background: #ffd6e8; color: #740937; }
.uc-badge.sprint-5 { background: #fdeece; color: #8e3a00; }
.uc-badge.sprint-6 { background: #f2e0ff; color: #491d8b; }

.uc-auto-bar {
  height: 8px; border-radius: 0;
  background: var(--ibm-blue-light);
  position: relative; overflow: hidden;
  min-width: 60px;
}
.uc-auto-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ibm-blue);
  transition: width 0.4s ease;
}

.uc-complexity { font-size: 11px; font-weight: 600; }
.uc-complexity.low  { color: var(--ibm-green); }
.uc-complexity.mid  { color: #f1c21b; }
.uc-complexity.high { color: var(--ibm-red); }

.uc-summary-bar {
  display: flex; gap: 0;
  background: var(--ibm-blue);
  padding: 14px 24px;
  margin-bottom: 1px;
  align-items: center; flex-wrap: wrap; gap: 32px;
}
.uc-summary-item { color: rgba(255,255,255,0.8); font-size: 13px; }
.uc-summary-item strong { color: #fff; font-size: 18px; font-weight: 300; display: block; margin-bottom: 2px; }

.usecase-generic-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border-subtle);
}
.uc-generic-item {
  background: var(--bg-ui);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.uc-generic-item::before {
  content: '→';
  color: var(--ibm-blue);
  margin-right: 8px;
  font-weight: 600;
}

@media (max-width: 900px) {
  .usecase-generic-list { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────
   FULL-WIDTH CARD (use cases, results)
───────────────────────────────────────── */
.uc-full-card {
  background: var(--bg-ui);
  padding: 16px 24px;
  border: none;
  width: 100%;
  box-sizing: border-box;
}

/* Results inner scroll container */
#section-results .kpi-strip,
#section-results .results-grid,
#section-results .admin-banner {
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

/* All sections full width */
.section { width: 100%; box-sizing: border-box; }

/* Fix checks bar */
.checks-bar { width: 100%; box-sizing: border-box; flex-shrink: 0; }

/* Results inner area scrolls */
.results-scroll-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ─────────────────────────────────────────
   TO-BE LOCATION TABLE
───────────────────────────────────────── */
.tobe-location-grid {
  display: grid;
  grid-template-columns: 110px 1fr 140px;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}
.tobe-loc-header {
  display: contents;
}
.tobe-loc-header > span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32px;
  color: var(--text-secondary);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-strong);
}
.tobe-loc-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.tobe-inactive {
  opacity: 0.3;
  pointer-events: none;
}
.tobe-hc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-field);
  border-left: 3px solid var(--ibm-blue);
}
.tobe-hc-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.tobe-hc-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--ibm-blue);
}

/* ─────────────────────────────────────────
   FULL-WIDTH CONTENT AREAS (Business Case / Use Cases)
   Fix cut-off issue by ensuring full-bleed layout
───────────────────────────────────────── */
#section-results,
#section-usecases {
  width: 100%;
  overflow-x: hidden;
}

#section-results .kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: 100%;
  overflow: hidden;
}

#section-results .results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  overflow: hidden;
}

.uc-full-card,
.chart-card {
  min-width: 0;
  overflow: hidden;
}

/* Prevent any card from overflowing its container */
.card, .uc-full-card {
  min-width: 0;
  overflow: hidden;
}

.card-grid {
  width: 100%;
  overflow: hidden;
}

/* Fix section header h1 overflow */
.section-header h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  #section-results .kpi-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .tobe-location-grid {
    grid-template-columns: 80px 1fr 100px 1fr 70px;
    gap: 6px;
  }
}

@media (max-width: 900px) {
  #section-results .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  #section-results .results-grid {
    grid-template-columns: 1fr;
  }
  .tobe-location-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

/* ─────────────────────────────────────────
   RESULTS SCROLL CONTAINER
───────────────────────────────────────── */
.results-scroll-wrap {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  background: var(--bg-page);
  padding: 0 0 8px 0;
}

/* ─────────────────────────────────────────
   USE CASES SCROLL
───────────────────────────────────────── */
.cards-wrap.uc-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px 24px;
}

/* ─────────────────────────────────────────
   RESPONSIVE TOBE GRID FIX
───────────────────────────────────────── */
@media (max-width: 1200px) {
  .tobe-location-grid {
    grid-template-columns: 90px 1fr 120px;
    gap: 8px;
  }
}
@media (max-width: 900px) {
  .tobe-location-grid {
    grid-template-columns: 80px 1fr 100px;
    gap: 6px;
  }
}
