/* Sistemas Inteligentes — mejora global de legibilidad del panel (V2.4.1) */
:root {
  --si-text-main: #f4f8ff;
  --si-text-body: #d2deeb;
  --si-text-muted: #b2c2d4;
  --si-text-soft: #9fb2c8;
  --si-text-accent: #78ddff;
}

html { text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.65 !important;
  color: var(--si-text-body) !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Encabezados y navegación */
.admin-top, .admin-top a, .admin-brand { font-family: inherit !important; }
.admin-top > a:not(.admin-brand) { color: #c5d5e6 !important; font-size: 13px !important; font-weight: 600; }
.admin-brand { font-size: 15px !important; color: var(--si-text-main) !important; font-weight: 750 !important; }
.admin-kicker, .op-title-block .admin-kicker, .db-kicker {
  color: #83ddff !important; font-size: 11px !important; font-weight: 800 !important;
  letter-spacing: 1.65px !important; line-height: 1.5 !important;
}
.dashboard-head h1, .op-title-block h1, .db-head h1, .auth-card h1 {
  color: var(--si-text-main) !important;
  font-family: Inter, "Segoe UI", system-ui, sans-serif !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  letter-spacing: -0.7px !important;
}
.dashboard-head > div > p, .dashboard-head p, .op-title-block > p, .db-head p, .auth-card > p {
  color: #c0cede !important; font-size: 14px !important; line-height: 1.75 !important;
}

/* Textos y paneles generales */
.panel, .auth-card, .admin-project, .lead-card, .db-card, .db-state,
.op-record, .op-inventory, .op-payment, .crm-customer, .crm-warranty,
.crm-report-card, .crm-history-item {
  color: var(--si-text-body);
}
.panel-heading h2, .op-dashboard-columns .panel-heading h2,
.db-card h2, .crm-history-columns h3 {
  color: var(--si-text-main) !important; font-size: 18px !important;
  font-weight: 750 !important; line-height: 1.35 !important;
}
.panel-heading p, .op-dashboard-columns .panel-heading p, .panel > p,
.admin-project p, .db-card > p, .db-note, .db-warning,
.op-note, .op-footer-note, .op-workflow-card p {
  color: #b5c5d7 !important; font-size: 13px !important; line-height: 1.7 !important;
}
.admin-wrap small, .db-wrap small { color: #b2c2d4; }
.admin-footnote, .admin-muted, .admin-footer { color: #a7b9cd !important; font-size: 12px !important; }

/* Botones, pestañas y enlaces de navegación */
button, .primary, .secondary { font-family: inherit !important; font-size: 13px !important; font-weight: 700 !important; }
.op-tabs a, .crm-tabs a { font-size: 13px !important; font-weight: 700 !important; color: #d0ddec !important; }
.op-tabs a.active, .op-tabs a:hover, .crm-tabs a.active, .crm-tabs a:hover { color: #8fe5ff !important; }
.op-head-actions .op-back, .op-head-help, .op-panel-link { font-size: 12px !important; }
.op-panel-tag { font-size: 10px !important; color: #9de7ff !important; }

/* Indicadores */
.admin-stat span, .op-kpi-label, .crm-kpis small {
  color: #c2d0df !important; font-size: 13px !important; font-weight: 650 !important;
  line-height: 1.45 !important; letter-spacing: .1px !important;
}
.admin-stat b, .op-kpi > b, .crm-kpis b { color: #ffffff !important; font-weight: 800 !important; }
.admin-stat small, .op-kpi > small, .crm-kpis span {
  color: #a9dcf2 !important; font-size: 12px !important; line-height: 1.5 !important;
}
.op-kpi { min-height: 148px !important; }

/* Accesos rápidos y agenda */
.op-quick a { color: #edf5ff !important; font-size: 14px !important; line-height: 1.4 !important; }
.op-quick-main b { color: #f2f7ff !important; font-size: 13px !important; font-weight: 750 !important; line-height: 1.45 !important; }
.op-quick-main small { color: #b5c5d7 !important; font-size: 12px !important; line-height: 1.45 !important; }
.op-quick > a > i { font-size: 15px !important; }
.op-empty, .op-empty-enhanced > span:not(.op-empty-icon) {
  color: #c0cede !important; font-size: 13px !important; line-height: 1.65 !important;
}
.op-empty-enhanced > b { color: #f0f6ff !important; font-size: 15px !important; }
.op-empty-enhanced > a { font-size: 12px !important; font-weight: 750 !important; }
.op-mini-list time, .op-mini-list span, .op-install-details small, .op-install-time {
  color: #b3c4d7 !important; font-size: 12px !important; line-height: 1.5 !important;
}
.op-mini-list b, .op-install-details b { color: #f0f6ff !important; font-size: 13px !important; }
.op-workflow-card b { color: #eff7ff !important; font-size: 14px !important; }
.op-workflow-card a { font-size: 12px !important; }

/* Listas, estados y metadatos */
.op-record-head > b, .op-record h3, .op-record-foot strong,
.op-payment b, .op-inventory strong, .crm-customer-info > b,
.crm-report-card b, .lead-card h3 { color: #f0f6ff !important; }
.op-record > p, .op-record-foot small, .op-payment small,
.op-inventory > p, .op-details, .op-details p, .op-scheduled,
.crm-customer-info > span, .crm-customer-info > small, .crm-warranty > p,
.crm-warranty-meta, .crm-history-item span, .crm-report-card small,
.lead-meta time, .lead-contact, .lead-message {
  color: #b5c5d7 !important; font-size: 12px !important; line-height: 1.65 !important;
}
.op-state, .crm-warranty-state, .lead-status { font-size: 11px !important; font-weight: 750 !important; }
.op-record-head > b { font-size: 13px !important; }
.op-record h3 { font-size: 16px !important; }
.op-record-foot small { text-align: left; }
.op-actions .secondary, .op-actions .primary, .op-actions select,
.op-actions button, .op-order-update select, .op-stock-form input,
.crm-customer-actions a, .crm-report-actions a, .lead-actions button,
.lead-actions select, .lead-whatsapp { font-size: 12px !important; }

/* CRM y garantías */
.crm-customer-info > b { font-size: 14px !important; }
.crm-customer-info > span { font-size: 12px !important; }
.crm-customer-info > small { font-size: 12px !important; }
.crm-mini-stats span { color: #d0deeb !important; font-size: 11px !important; }
.crm-profile-grid small { color: #9edff2 !important; font-size: 11px !important; letter-spacing: .6px !important; }
.crm-profile-grid b { color: #edf5ff !important; font-size: 13px !important; line-height: 1.55 !important; }
.crm-history-item b { color: #f0f6ff !important; font-size: 13px !important; }
.crm-history-item a, .crm-whatsapp, .crm-claim-details summary { font-size: 12px !important; }
.crm-claim-details, .crm-claim p, .crm-claim span { color: #c0cede !important; font-size: 12px !important; line-height: 1.65 !important; }
.crm-warranty > p, .crm-report-card span { font-size: 12px !important; }
.crm-report-card b { font-size: 14px !important; }
.crm-report-card small { font-size: 12px !important; }

/* Formularios: etiquetas, campos, ayudas y placeholders */
.auth-card label, .admin-form label, .db-form label, .crm-report-form-grid > label {
  color: #d5e0ec !important; font-size: 13px !important; font-weight: 650 !important; line-height: 1.5 !important;
}
.auth-card input, .admin-form input:not([type=hidden]), .admin-form textarea,
.admin-form select, .admin-form input[type=date], .admin-form input[type=time],
.admin-form input[type=number], .crm-search input, .crm-claim-form textarea,
.crm-claim-form select, .crm-report-form-grid textarea, .crm-report-form-grid input,
.db-form input, .op-actions select, .op-order-update input, .op-order-update select {
  color: #f4f8ff !important; font-family: inherit !important; font-size: 14px !important; line-height: 1.5 !important;
}
input::placeholder, textarea::placeholder { color: #91a7bd !important; opacity: 1 !important; }
.auth-card small, .admin-form small, .db-form small, .form-note {
  color: #b1c1d2 !important; font-size: 12px !important; line-height: 1.6 !important;
}

/* Conexión a base de datos */
.db-head p, .db-state span, .db-card > p, .db-form label,
.db-note, .db-list div, .db-warning, .db-back {
  color: #c0cede !important; font-size: 13px !important; line-height: 1.7 !important;
}
.db-state b { color: #f4f8ff !important; font-size: 15px !important; }
.db-mono { color: #8de5ff !important; font-size: 13px !important; }

/* Proyectos, solicitudes y tablas */
.admin-project span { color: #8de5ff !important; font-size: 11px !important; }
.admin-project b, .lead-card h3 { font-size: 15px !important; }
.admin-project p, .lead-service, .lead-export { color: #bdccdc !important; font-size: 12px !important; line-height: 1.6 !important; }
.lead-status { padding: 5px 10px !important; }
table th { color: #cfe0ef !important; font-size: 13px !important; }
table td { color: #d8e3ef !important; font-size: 13px !important; }

/* Evitar microtexto en móvil: mantener los mínimos legibles */
@media (max-width: 720px) {
  body { font-size: 14px !important; }
  .op-title-block > p, .dashboard-head > div > p { font-size: 13px !important; }
  .op-tabs a, .crm-tabs a { font-size: 12px !important; }
  .op-kpi-label { font-size: 12px !important; }
  .op-kpi > small, .op-quick-main small { font-size: 11px !important; }
  .op-quick-main b { font-size: 12px !important; }
  .op-install-time, .op-install-details small { font-size: 11px !important; }
}
@media (max-width: 480px) {
  .op-title-block h1 { font-size: 27px !important; }
  .op-kpi-label, .op-kpi > small { font-size: 11px !important; }
  .op-quick-main b { font-size: 12px !important; }
  .op-quick-main small { font-size: 11px !important; }
  .op-dashboard-columns .panel-heading h2 { font-size: 16px !important; }
  .op-install-time { font-size: 11px !important; }
  .op-head-meta { font-size: 11px !important; }
  .crm-kpis small, .crm-kpis span { font-size: 11px !important; }
}

/* Pulido final de textos auxiliares y mensajes de estado */
.admin-wrap small, .db-wrap small { font-size: 12px !important; line-height: 1.55 !important; }
.crm-alert { font-size: 13px !important; line-height: 1.7 !important; }
.crm-cancel, .crm-search a, .crm-search button, .crm-whatsapp,
.crm-customer-actions a, .crm-report-actions a { font-size: 12px !important; }
.op-export, .lead-export, .op-converted, .op-details summary,
.op-scheduled, .op-note, .op-footer-note { font-size: 12px !important; }
.op-actions select, .op-order-update select, .op-stock-form input,
.crm-claim-form textarea, .crm-claim-form select { font-size: 13px !important; }
@media (max-width: 480px) {
  .admin-wrap small, .db-wrap small, .crm-alert, .op-export,
  .op-converted, .op-details summary, .op-scheduled { font-size: 11px !important; }
}
