/* TecnoHelicoidal v2.0 - Martin Tools */

/* Hero */
.hc-hero { background:linear-gradient(135deg,#001a4d,#062F87,#1a4a9f); color:#fff; padding:60px 30px 40px; text-align:center; border-bottom:4px solid #3B82F6; margin-top:100px }
.hc-hero h1 { font-family:'Oswald',sans-serif; font-size:36px; font-weight:500; margin:0 0 8px }
.hc-hero h1 span { color:#3B82F6 }
.hc-hero p { font-size:14px; color:rgba(255,255,255,0.8); max-width:700px; margin:0 auto 16px }
.hc-hero .hc-hero-stats { display:flex; gap:24px; justify-content:center; flex-wrap:wrap; font-size:13px; color:rgba(255,255,255,0.7) }
.hc-hero .hc-hero-stats span { white-space:nowrap }
.hc-hero .hc-hero-stats strong { color:#fff }

.container { max-width:1100px; margin:0 auto; padding:30px 20px 150px }

/* ===== TABS ===== */
.hc-tabs { display:flex; gap:2px; margin-bottom:0; background:#f1f5f9; border-radius:8px 8px 0 0; overflow:hidden; border:1px solid #e2e8f0; border-bottom:none }
.hc-tab { flex:1; padding:10px 14px; font-size:12px; font-weight:700; border:none; background:#f8fafc; color:#64748b; cursor:pointer; transition:all 0.15s; font-family:Roboto,sans-serif; text-align:center; border-bottom:3px solid transparent }
.hc-tab:hover { background:#e2e8f0; color:#1e293b }
.hc-tab.active { background:#fff; color:#062F87; border-bottom-color:#062F87 }
.hc-tab i { margin-right:4px; font-size:11px }
.hc-tab-content { display:none; background:#fff; border:1px solid #e2e8f0; border-top:none; border-radius:0 0 8px 8px; padding:16px; margin-bottom:16px }
.hc-tab-content.active { display:block }

/* Form Grid */
.hc-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px }
.hc-form-group { display:flex; flex-direction:column }
.hc-form-group label { font-size:11px; font-weight:700; color:#1e293b; margin-bottom:3px; text-transform:uppercase; letter-spacing:0.3px }
.hc-form-group select,.hc-form-group input[type=number] { padding:6px 10px; border:1px solid #cbd5e1; border-radius:4px; font-size:13px; font-family:Roboto,sans-serif; background:#fff; color:#1e293b }
.hc-form-group select:focus,.hc-form-group input:focus { border-color:#3B82F6; outline:none; box-shadow:0 0 0 2px rgba(59,130,246,0.2) }
.hc-form-group .hc-hint { font-size:10px; color:#94a3b8; margin-top:2px }

/* Examples */
.hc-examples { display:flex; gap:8px; flex-wrap:wrap; margin-top:16px }
.hc-example-btn { padding:6px 14px; font-size:11px; font-weight:700; border:1px solid #cbd5e1; background:#fff; border-radius:4px; cursor:pointer; color:#1e293b; transition:all 0.15s }
.hc-example-btn:hover { background:#062F87; color:#fff; border-color:#062F87 }

/* Lead */
.hc-lead { display:flex; gap:8px; flex-wrap:wrap; margin:16px 0; padding:12px; background:#fff; border:1px solid #e2e8f0; border-radius:6px }
.hc-lead input { flex:1; min-width:120px; padding:6px 10px; border:1px solid #cbd5e1; border-radius:4px; font-size:13px; font-family:Roboto,sans-serif }
.hc-lead input:focus { border-color:#3B82F6; outline:none }

/* Unit Toggle */
.hc-unit-row { display:flex; align-items:center; gap:10px; margin-bottom:16px; padding:8px 12px; background:#fff; border:1px solid #e2e8f0; border-radius:6px }
.hc-unit-label { font-size:12px; font-weight:700; color:#1e293b; text-transform:uppercase; letter-spacing:0.3px }
.hc-unit-btn { padding:6px 14px; font-size:12px; font-weight:700; border:2px solid #cbd5e1; border-radius:4px; cursor:pointer; transition:all 0.15s; font-family:Roboto,sans-serif; background:#fff; color:#1e293b; min-width:60px; text-align:center }
.hc-unit-btn i { margin-right:2px }
.hc-unit-btn.hc-unit-hp { border-color:#062F87; background:#062F87; color:#fff }
.hc-unit-btn.hc-unit-kw { border-color:#3B82F6; background:#3B82F6; color:#fff }

/* Action Buttons */
.hc-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:20px }
.hc-action-btn { padding:8px 20px; font-size:13px; font-weight:700; border:none; border-radius:6px; cursor:pointer; transition:all 0.15s; font-family:Roboto,sans-serif }
.hc-action-btn.hc-primary { background:#062F87; color:#fff }
.hc-action-btn.hc-primary:hover { background:#001a4d }
.hc-action-btn.hc-secondary { background:#f1f5f9; color:#1e293b; border:1px solid #cbd5e1 }
.hc-action-btn.hc-secondary:hover { background:#e2e8f0 }
.hc-action-btn.hc-danger { background:#dc2626; color:#fff }
.hc-action-btn.hc-danger:hover { background:#b91c1c }
.hc-action-btn.hc-green { background:#16a34a; color:#fff }
.hc-action-btn.hc-green:hover { background:#15803d }

/* KPI */
.hc-kpi-primary { background:#062F87 !important; color:#fff !important }
.hc-kpi-primary .kpi-val { color:#fff !important }
.hc-kpi-primary .kpi-lbl { color:rgba(255,255,255,0.75) !important }
.kpi-item { background:#fff; border:1px solid #e2e8f0; border-radius:6px; padding:10px 12px; text-align:center }
.kpi-item .kpi-val { font-size:18px; font-weight:800; color:#062F87 }
.kpi-item .kpi-lbl { font-size:10px; color:#64748b; text-transform:uppercase; letter-spacing:0.3px; margin-top:2px }
.kpi-bar { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; margin-bottom:16px }

/* Results Grid */
.hc-result-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px }
.hc-result-card { background:#fff; border:1px solid #e2e8f0; border-radius:6px; padding:12px; display:flex; flex-direction:column }
.hc-result-card .hc-label { font-size:10px; color:#64748b; text-transform:uppercase; letter-spacing:0.3px; margin-bottom:2px }
.hc-result-card .hc-value { font-size:16px; font-weight:700; color:#1e293b }

/* Alerts */
.alerts-box { background:#fef2f2; border:1px solid #fecaca; border-radius:6px; padding:12px 16px; margin-bottom:16px }
.alert-item { font-size:12px; color:#dc2626; padding:4px 0; display:flex; align-items:center; gap:6px }

/* Derivation */
.hc-derivation { background:#fff; border:1px solid #e2e8f0; border-radius:6px; padding:12px 16px; margin-top:16px }
.hc-derivation summary { cursor:pointer; font-weight:700; font-size:14px; color:#062F87; padding:4px 0 }
.hc-derivation summary i { margin-right:6px }
.hc-derivation .derivation-content { padding-top:12px; font-size:12px; color:#1e293b }
.hc-derivation h5 { margin:12px 0 4px; color:#062F87; font-size:12px; text-transform:uppercase }
.hc-derivation p { margin:4px 0; line-height:1.5 }

/* History Panel */
.hc-history { display:none; background:#fff; border:1px solid #e2e8f0; border-radius:8px; margin-top:16px; overflow:hidden }
.hc-history .history-header { display:flex; justify-content:space-between; align-items:center; padding:10px 16px; background:#f1f5f9; border-bottom:1px solid #e2e8f0; font-size:13px }
.hc-history .history-close { background:none; border:none; font-size:20px; cursor:pointer; color:#64748b; padding:0 4px }
.hc-history .history-table { width:100%; border-collapse:collapse; font-size:12px }
.hc-history .history-table th { text-align:left; padding:8px 12px; background:#f8fafc; border-bottom:1px solid #e2e8f0; color:#64748b; text-transform:uppercase; font-size:10px; letter-spacing:0.3px }
.hc-history .history-table td { padding:8px 12px; border-bottom:1px solid #f1f5f9; color:#1e293b }
.hc-history .history-restore { padding:4px 10px; font-size:11px; background:#062F87; color:#fff; border:none; border-radius:4px; cursor:pointer }
.error-card { background:#fef2f2; border:1px solid #fecaca; border-radius:6px; padding:16px; color:#dc2626; font-size:14px; display:flex; align-items:center; gap:8px }

/* Contencao Cards */
.hc-contencao-grid { display:grid; gap:12px; margin-top:16px }
.hc-contencao-card { background:#fff; border:1px solid #e2e8f0; border-radius:8px; padding:14px 16px }
.hc-contencao-card h4 { font-size:13px; font-weight:700; color:#062F87; margin:0 0 8px }
.hc-contencao-card .hc-cc-row { display:flex; justify-content:space-between; font-size:12px; padding:3px 0; border-bottom:1px solid #f1f5f9 }
.hc-contencao-card .hc-cc-label { color:#64748b }
.hc-contencao-card .hc-cc-val { font-weight:700; color:#1e293b }
.hc-contencao-card .hc-cc-alerta { font-size:11px; color:#dc2626; margin-top:6px; padding:6px; background:#fef2f2; border-radius:4px; line-height:1.4 }

/* Report Print */
@page { size: A4; margin: 0.4in; }
@media print {
  #print-report { font-family:Roboto,Arial,sans-serif; padding:0; color:#1e293b; line-height:1.3; font-size:9px }
  body > *:not(#print-report) { display:none !important; }
  .report-wrap { max-width:100%; margin:0 auto }
  .report-wrap h2 { font-size:14px; margin:0 0 2px; color:#062F87 }
  .report-section-title { color:#062F87; border-bottom:1px solid #062F87; padding-bottom:2px; margin-top:8px; margin-bottom:4px; font-size:10px; page-break-after:avoid }
  .report-table { width:100%; border-collapse:collapse; font-size:8px; margin-bottom:6px; page-break-inside:avoid }
  .report-table th { background:#f1f5f9; color:#1e293b; padding:2px 4px; border:1px solid #cbd5e1; text-align:left; font-size:7px; text-transform:uppercase; letter-spacing:0.2px }
  .report-table td { padding:2px 4px; border:1px solid #e2e8f0; color:#1e293b }
  .report-td { padding:2px 4px; border:1px solid #e2e8f0 }
  .report-td-label { padding:2px 4px; font-weight:700; background:#f8fafc }
  .report-deriv { font-size:8px; margin:2px 0 }
  .report-alert-list { font-size:8px; color:#dc2626; margin:2px 0; padding-left:14px }
  .report-ok { font-size:8px; color:#16a34a; margin:2px 0 }
  .report-footer { font-size:7px; color:#94a3b8; margin-top:8px; border-top:1px solid #e2e8f0; padding-top:3px }
  .report-table p { margin:1px 0; }
  .report-table ul { margin:1px 0; padding-left:12px; }
}

/* Validation Badge */
.val-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; border-radius:10px; font-size:10px; font-weight:700; text-transform:uppercase }
.val-badge.pass { background:#dcfce7; color:#16a34a }
.val-badge.warn { background:#fef3c7; color:#d97706 }
.val-badge.fail { background:#fef2f2; color:#dc2626 }

/* Executive Summary Box */
.hc-exec-summary { background:linear-gradient(135deg,#f0f9ff,#e0f2fe); border:1px solid #bae6fd; border-radius:8px; padding:14px 18px; margin-bottom:16px }
.hc-exec-summary h4 { font-size:13px; color:#0369a1; margin:0 0 6px; font-weight:700 }
.hc-exec-summary .exec-row { display:flex; gap:20px; flex-wrap:wrap; font-size:12px; color:#1e293b; line-height:1.6 }
.hc-exec-summary .exec-row span { white-space:nowrap }
.hc-exec-summary .exec-row strong { color:#062F87 }
.hc-exec-summary .hc-model-note { font-size:11px; color:#475569; margin-top:8px; padding:6px 10px; background:rgba(37,99,235,0.06); border-radius:4px; border-left:3px solid #2563eb; line-height:1.5 }

/* Validation Table */
.hc-val-table { width:100%; border-collapse:collapse; font-size:11px; margin:12px 0 }
.hc-val-table th { text-align:left; padding:6px 8px; background:#f8fafc; border-bottom:2px solid #e2e8f0; color:#64748b; text-transform:uppercase; font-size:10px; letter-spacing:0.3px }
.hc-val-table td { padding:6px 8px; border-bottom:1px solid #f1f5f9; color:#1e293b }
.hc-val-table tr:hover { background:#f8fafc }

/* Metric Badge in labels */
.hc-metric-hint { font-size:10px; color:#94a3b8; font-weight:400; text-transform:none; letter-spacing:0 }

/* Per-Field Unit Selectors */
.hc-unit-per-field { display:flex; align-items:center; gap:6px; margin-bottom:10px; padding:6px 10px; background:#f8fafc; border:1px solid #e2e8f0; border-radius:6px; flex-wrap:wrap; font-size:11px }
.hc-unit-per-label { font-weight:700; color:#1e293b; white-space:nowrap; margin-left:4px }
.hc-unit-per-label:first-child { margin-left:0 }
.hc-unit-per-sel { font-size:10px; padding:1px 4px; border:1px solid #cbd5e1; border-radius:3px; background:#fff; color:#1e293b; cursor:pointer; min-width:44px }
.hc-unit-per-sel:hover { border-color:#94a3b8 }
.hc-unit-per-sel:focus { border-color:#062F87; outline:none }

/* Dual Unit Display */
.dual-unit { display:flex; align-items:baseline; gap:6px }
.dual-unit .imp { font-weight:700; color:#1e293b; font-size:16px }
.dual-unit .met { font-size:11px; color:#64748b }

/* Model Differentiation */
.hc-model-diff ul, .hc-model-other ul { margin:4px 0 0 14px; padding:0 }
.hc-model-diff ul li, .hc-model-other ul li { margin-bottom:3px }
.hc-model-other ul li { margin-bottom:2px }
.hc-model-other strong { color:#334155 }

/* Metric */
body.hc-metric .hc-imp-only { display:none }
body:not(.hc-metric) .hc-met-only { display:none }

/* Responsive */
@media (max-width:860px) {
  .hc-tabs { flex-wrap:wrap }
  .hc-tab { flex:1 1 30%; font-size:11px; padding:8px 6px }
  .hc-form-grid { grid-template-columns:1fr }
  .hc-result-grid { grid-template-columns:1fr 1fr }
  .hc-hero { margin-top:80px; padding:40px 20px 30px }
  .hc-hero h1 { font-size:28px }
  .hc-lead { flex-direction:column }
  .hc-lead input { min-width:auto }
}
@media (max-width:480px) {
  .hc-tab { flex:1 1 48%; font-size:10px; padding:6px 4px }
  .hc-result-grid { grid-template-columns:1fr }
}
