
/* Scoped, theme-proof styles */
.hicbc-wrap{font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111827;padding:20px;box-sizing:border-box;width:100%;max-width:100%;overflow-x:hidden}
.hicbc-container{max-width:1400px;margin:0 auto;width:100%;box-sizing:border-box;padding:0;background:#ffffff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 2px 8px rgba(0,0,0,0.08);padding:24px;overflow-x:hidden;overflow-y:visible}
.hicbc-wrap *{box-sizing:border-box}
.hicbc-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:20px}
.hicbc-title{margin:0 0 16px 0;font-size:28px;line-height:1.3;font-weight:800;color:#111827}
.hicbc-subtitle{margin:0 0 20px 0;color:#374151;font-size:14px;line-height:1.6}
.hicbc-actions{display:flex;gap:8px;flex-wrap:wrap}
.hicbc-btnrow{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:10px}
.hicbc-btn{appearance:none;border:1px solid #d1d5db;background:#fff;color:#111827;border-radius:10px;padding:9px 12px;cursor:pointer;font-weight:700;font-size:14px;transition:all 0.2s}
.hicbc-btn:hover{background:#f3f4f6;color:#111827}
.hicbc-btn:active{transform:translateY(1px);color:#111827}
.hicbc-btn--primary{border-color:#1e4fd6;background:#2563eb;color:#ffffff}
.hicbc-btn--primary:hover{background:#1e4fd6;color:#ffffff}
.hicbc-btn--primary:active{color:#ffffff}

.hicbc-inst{background:#f9fafb;border:1px solid #e5e7eb;border-radius:10px;padding:10px 12px;font-size:13px;color:#111827;line-height:1.6;margin-bottom:20px}

.hicbc-card{background:#ffffff;border:1px solid #e5e7eb;border-radius:16px;padding:24px;margin-bottom:20px;box-shadow:0 2px 4px rgba(0,0,0,0.06),0 1px 2px rgba(0,0,0,0.04);overflow-x:hidden;overflow-y:visible;max-width:100%}
.hicbc-card:last-child{margin-bottom:0}
.hicbc-card h3{margin:0 0 12px 0;font-size:20px;font-weight:700;color:#111827;line-height:1.3}
.hicbc-card p.help{margin:0 0 12px 0;color:#374151;font-size:14px;line-height:1.6}

.hicbc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
@media (max-width: 900px){.hicbc-grid{grid-template-columns:1fr}.hicbc-header{flex-direction:column;align-items:stretch}}
.hicbc-field{margin-bottom:16px}
.hicbc-field:last-child{margin-bottom:0}
.hicbc-field label{display:block;font-size:14px;font-weight:600;color:#111827;margin-bottom:8px}
.hicbc-field input,.hicbc-field select{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:10px 12px;background:#fff;font-size:14px;color:#111827;transition:border-color 0.2s,box-shadow 0.2s;box-sizing:border-box}
.hicbc-field input:hover,.hicbc-field select:hover{border-color:#9ca3af}
.hicbc-field input:focus,.hicbc-field select:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,0.1)}
.hicbc-help{font-size:12px;color:#6b7280;margin-top:6px;line-height:1.5}

.hicbc-row{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap}
.hicbc-row .hicbc-field{flex:1 1 220px;margin-bottom:0}
.hicbc-small{font-size:12px;color:#6b7280;margin-top:6px;line-height:1.5}

.hicbc-results{display:grid;grid-template-columns:1.1fr .9fr;gap:20px;margin-top:8px}
@media (max-width: 1200px){.hicbc-results{grid-template-columns:1fr}}
.hicbc-badges{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.hicbc-badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:8px 12px;font-weight:800;font-size:13px;border:1px solid #e5e7eb;background:#fff}
.hicbc-badge--ok{border-color:rgba(16,185,129,0.35);background:rgba(16,185,129,0.08);color:#10b981}
.hicbc-badge--warn{border-color:rgba(245,158,11,0.35);background:rgba(245,158,11,0.08);color:#f59e0b}
.hicbc-badge--bad{border-color:rgba(239,68,68,0.35);background:rgba(239,68,68,0.08);color:#ef4444}

.hicbc-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
@media (min-width:768px){.hicbc-kpis{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1200px){.hicbc-kpis{grid-template-columns:repeat(4,1fr)}}
.hicbc-kpi{background:linear-gradient(135deg,#f8fafc 0%,#ffffff 100%);border:2px solid #e5e7eb;border-radius:12px;padding:20px;text-align:center;transition:transform 0.2s,box-shadow 0.2s}
.hicbc-kpi:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.hicbc-kpi .label{font-size:13px;color:#6b7280;font-weight:500;margin-bottom:8px;line-height:1.4}
.hicbc-kpi .value{font-size:24px;font-weight:900;margin-top:0;color:#111827;line-height:1.2}

.hicbc-tablewrap{overflow-x:auto;overflow-y:visible;border:1px solid #e5e7eb;border-radius:12px;background:#fff;margin:20px 0;max-width:100%;width:100%}
.hicbc-table{border-collapse:collapse;width:100%;min-width:760px;background:#fff;table-layout:auto;display:table}
.hicbc-table th,.hicbc-table td{padding:10px 10px;border-bottom:1px solid #eef2f7;text-align:right;font-size:13px;white-space:nowrap}
.hicbc-table th:first-child,.hicbc-table td:first-child{text-align:left}
.hicbc-table thead th{position:sticky;top:0;background:#ebf2f4;color:#111827;font-weight:900;border-bottom:1px solid #e5e7eb}
.hicbc-table tbody tr:hover td{background:#fafafa}
.hicbc-table tbody tr:last-child td{border-bottom:0}
.hicbc-muted{color:#6b7280}
.hicbc-disclaimer{font-size:12px;color:#6b7280;line-height:1.35;margin-top:60px;padding-top:24px;border-top:1px solid #e5e7eb}
.hicbc-footnote{margin-top:24px;color:#6b7280;font-size:12px;line-height:1.6}
.hicbc-suggestion-box{background:#f0f9ff;border-left:4px solid #2563eb;padding:12px;border-radius:4px;margin-top:12px}
.hicbc-option-box{background:#f0fdf4;border:2px solid #10b981;border-radius:12px;padding:16px;margin-bottom:12px}
.hicbc-option-box--blue{background:#eff6ff;border-color:#2563eb}
.hicbc-option-box--amber{background:#fff7ed;border-color:#f59e0b}
.hicbc-option-title{font-weight:700;margin-bottom:6px;font-size:14px}
.hicbc-option-value{font-size:18px;font-weight:700;margin:8px 0}
.hicbc-option-desc{font-size:13px;line-height:1.6;margin-top:8px}
.hicbc-chart-container{background:#ffffff;border:1px solid #e5e7eb;border-radius:12px;padding:20px;margin:20px 0;position:relative}
.hicbc-chart-container h4,.hicbc-chart-title{margin:0 0 16px 0;font-size:16px;font-weight:700;color:#111827}
.hicbc-chart-canvas{width:100%;height:auto;max-width:100%;display:block;image-rendering:-webkit-optimize-contrast;image-rendering:crisp-edges}
.hicbc-chart-legend{display:flex;flex-wrap:wrap;gap:16px;margin-top:16px;padding-top:16px;border-top:1px solid #e5e7eb}
.hicbc-chart-legend-item{display:flex;align-items:center;gap:8px;font-size:13px;color:#374151}
.hicbc-chart-legend-color{width:16px;height:16px;border-radius:3px;flex-shrink:0}
.hicbc-chart-legend-item{display:flex;align-items:center;gap:6px}
.hicbc-chart-legend-color{width:12px;height:12px;border-radius:2px;display:inline-block}
.hicbc-comparison{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}
@media (max-width: 900px){.hicbc-comparison{grid-template-columns:1fr}}
.hicbc-comparison-card{background:linear-gradient(135deg,#f8fafc 0%,#ffffff 100%);border:2px solid #e5e7eb;border-radius:12px;padding:20px}
.hicbc-comparison-card.active{border-color:#2563eb;background:linear-gradient(135deg,#eff6ff 0%,#f0f9ff 100%)}
.hicbc-comparison-label{font-size:12px;text-transform:uppercase;letter-spacing:0.5px;color:#6b7280;font-weight:700;margin-bottom:12px}
.hicbc-visual-bar{height:36px;background:#e5e7eb;border-radius:8px;position:relative;overflow:hidden;margin:12px 0 16px 0;clear:both;display:block;width:100%;max-width:100%;box-sizing:border-box}
.hicbc-visual-bar-fill{height:100%;background:linear-gradient(90deg,#2563eb,#3b82f6);border-radius:8px;transition:width 0.3s ease;display:flex;align-items:center;justify-content:flex-end;padding-right:10px;color:#fff;font-size:13px;font-weight:700;max-width:100%;box-sizing:border-box;overflow:hidden}
.hicbc-visual-bar-fill.warn{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.hicbc-visual-bar-fill.bad{background:linear-gradient(90deg,#ef4444,#f87171)}
.hicbc-visual-bar-fill.ok{background:linear-gradient(90deg,#10b981,#34d399)}
@media (min-width:768px){
  .hicbc-grid{grid-template-columns:repeat(2,1fr)}
  .hicbc-kpis{grid-template-columns:repeat(2,1fr)}
}
@media (min-width:1200px){
  .hicbc-grid{grid-template-columns:repeat(2,1fr);gap:20px}
  .hicbc-kpis{grid-template-columns:repeat(4,1fr)}
}
@media (max-width:768px){
  .hicbc-wrap{padding:16px}
  .hicbc-container{padding:18px;border-radius:8px}
  .hicbc-title{font-size:1.75rem}
  .hicbc-card{padding:18px;margin:16px 0}
  .hicbc-kpis{grid-template-columns:1fr;gap:12px}
  .hicbc-kpi .value{font-size:1.3rem}
  .hicbc-table{min-width:600px;font-size:0.85rem}
  .hicbc-table th,.hicbc-table td{padding:10px 12px}
  .hicbc-chart-container{padding:16px;overflow-x:auto}
  .hicbc-btn,.hicbc-field input,.hicbc-field select{font-size:0.9rem;padding:9px 12px}
}
/* Animations and Transitions */
@keyframes slideIn{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}
.hicbc-card{animation:slideIn 0.3s ease-out}
.hicbc-kpi{transition:transform 0.2s,box-shadow 0.2s}
.hicbc-kpi:hover{transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.hicbc-btn{transition:all 0.2s}
.hicbc-btn:hover{transform:translateY(-1px);box-shadow:0 2px 4px rgba(0,0,0,0.1)}
.hicbc-visual-bar-fill{transition:width 0.5s ease-out}
@keyframes pulse{
  0%,100%{opacity:1}
  50%{opacity:0.7}
}
.hicbc-kpi .value{animation:pulse 2s ease-in-out infinite}

/* Slider Styling */
input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  background:#e5e7eb;
  height:8px;
  border-radius:4px;
  outline:none;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:20px;
  height:20px;
  background:#2563eb;
  border-radius:50%;
  cursor:pointer;
  box-shadow:0 2px 4px rgba(0,0,0,0.2);
  transition:all 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover{
  background:#1e4fd6;
  transform:scale(1.1);
}
input[type="range"]::-moz-range-thumb{
  width:20px;
  height:20px;
  background:#2563eb;
  border-radius:50%;
  cursor:pointer;
  border:none;
  box-shadow:0 2px 4px rgba(0,0,0,0.2);
  transition:all 0.2s;
}
input[type="range"]::-moz-range-thumb:hover{
  background:#1e4fd6;
  transform:scale(1.1);
}

@media print{
  .hicbc-actions,.hicbc-btnrow,.hicbc-btn,[data-hicbc-action],.hicbc-inst,.hicbc-chart-container{display:none !important}
  .hicbc-wrap{max-width:none;margin:0;padding:0}
  .hicbc-card{box-shadow:none;border-color:#d1d5db;page-break-inside:avoid;margin-bottom:16px;animation:none}
  .hicbc-table{min-width:0;page-break-inside:auto}
  .hicbc-table tr{page-break-inside:avoid}
  .hicbc-kpis{page-break-inside:avoid}
  .hicbc-badges{page-break-inside:avoid}
  @page{size:A4;margin:15mm}
}
