/* Conversores — estilo limpio y accesible */
.calc-section, .conv-section, .sci-section, .waves-section { margin: 16px auto; max-width: 980px; }
.calc-section h2, .conv-section h2, .sci-section h2, .waves-section h2 { font: 600 18px/1.2 system-ui, Segoe UI, Roboto, sans-serif; margin: 0 0 10px; color: #0f172a; display:flex; align-items:center; justify-content:space-between }
.card { background:#fff; border:1px solid #e6e8f0; border-radius:14px; padding:14px; box-shadow: 0 1px 2px rgba(16,24,40,.03); }

/* Ajuste suave de la calculadora dentro de su tarjeta */
.calc-section .calculator { margin: 0; }

/* Pestañas de conversores */
#convTabs{margin:6px 0 10px; display:flex; flex-wrap:wrap; gap:8px}
#convTabs .tab{border:1px solid #e0e6ef; border-radius:999px; padding:6px 12px; cursor:pointer; background:#fff; color:#0f172a}
#convTabs .tab.active{background:#f2f5fb}
#convTabs .tab .icon{width:16px;height:16px;vertical-align:text-bottom;margin-right:6px;fill:currentColor}

.conv-panel{display:none; border:1px solid #e0e6ef; border-radius:12px; padding:12px; margin-top:8px; background:#fafbff}
.conv-panel.active{display:block}

.conv-row{display:flex; gap:8px; align-items:center; margin:6px 0; flex-wrap:wrap}
.conv-row input, .conv-row select{padding:6px 8px; border:1px solid #ccd4e0; border-radius:8px; min-width:140px; font: 14px system-ui, Segoe UI, Roboto, sans-serif}
.conv-row input[readonly]{background:#f4f6fb}
.conv-note{color:#6b7280; font-size:.9em}

.conv-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px}
.conv-card{border:1px solid #e0e6ef; border-radius:12px; padding:10px; background:#fff}
.conv-card h4{margin:0 0 6px 0; font-size:14px; color:#0f172a}
.conv-card input{width:100%; padding:8px 10px; border:1px solid #ccd4e0; border-radius:8px; font: 14px system-ui, Segoe UI, Roboto, sans-serif}
.conv-card small{color:#6b7280}

@media (max-width: 720px){
  .calc-section, .conv-section { padding: 0 10px; }
}

/* Científica y Trig/Ondas */
.sci-section, .waves-section { margin: 16px auto; max-width: 980px; }
.sci-section h2, .waves-section h2 { font: 600 18px/1.2 system-ui, Segoe UI, Roboto, sans-serif; margin: 0 0 10px; color: #0f172a; }
.sci-toolbar{display:flex; gap:10px; align-items:center; margin-bottom:8px}
.sci-toolbar .angle-mode select{padding:6px 8px; border:1px solid #ccd4e0; border-radius:8px}
.sci-buttons{display:grid; grid-template-columns:repeat(auto-fit, minmax(64px, 1fr)); gap:8px}
.sci-buttons button{border:1px solid #e0e6ef; background:#fff; border-radius:10px; padding:8px; cursor:pointer}
.sci-buttons button:hover{background:#f7f9ff}
.grid-two{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.form-row{display:flex; gap:8px; align-items:center; margin:6px 0}
.form-row input{padding:6px 8px; border:1px solid #ccd4e0; border-radius:8px; min-width:140px}
.form-row label{min-width:140px; color:#0f172a}
.theme-toggle{display:flex; align-items:center; gap:8px; font: 14px system-ui, Segoe UI, Roboto, sans-serif}
.theme-toggle input{width:42px; height:22px}

/* Tema oscuro del módulo (scoped) */
#calcmod.theme-dark .card{ background:#0f1627; border-color:#1f2a44; box-shadow:none }
#calcmod.theme-dark .calc-section h2, #calcmod.theme-dark .conv-section h2, #calcmod.theme-dark .sci-section h2{ color:#eaf1ff }
#calcmod.theme-dark .conv-panel{ background:#0c1324; border-color:#1f2a44 }
#calcmod.theme-dark .conv-row input, #calcmod.theme-dark .conv-row select, #calcmod.theme-dark .form-row input{ background:#0f1627; color:#eaf1ff; border-color:#2b3b60 }
#calcmod.theme-dark .conv-note, #calcmod.theme-dark .conv-card small, #calcmod.theme-dark label{ color:#9fb1d9 }
#calcmod.theme-dark #convTabs .tab{ background:#0f1627; color:#eaf1ff; border-color:#2b3b60 }
#calcmod.theme-dark #convTabs .tab.active{ background:#1a2340 }
