.cdc-wrap { max-width: 1400px; }
#cdc-app * { box-sizing: border-box; }
#cdc-app { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1e1b2e; }

.cdc-loading { padding: 40px; font-size: 15px; color: #666; }

/* Layout */
.cdc-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 16px; flex-wrap: wrap; gap: 12px; }
.cdc-header h1 { margin: 0; font-size: 23px; }
.cdc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid #d6d3e8; background: #fff; color: #3d3a5c; font-weight: 600; font-size: 13px; cursor: pointer; transition: all .15s; }
.cdc-btn:hover { border-color: #6366f1; color: #6366f1; }
.cdc-btn-primary { background: linear-gradient(135deg,#6366f1,#8b5cf6); border: none; color: #fff; }
.cdc-btn-primary:hover { opacity: .9; color: #fff; }
.cdc-btn-danger { color: #dc2626; border-color: #fecaca; }
.cdc-btn-danger:hover { background: #fef2f2; border-color: #dc2626; }
.cdc-btn-sm { padding: 4px 10px; font-size: 12px; }
.cdc-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Stats cards */
.cdc-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 12px; margin-bottom: 20px; }
.cdc-stat-card { background: #fff; border: 1px solid #ece9f7; border-radius: 12px; padding: 14px 16px; }
.cdc-stat-card .num { font-size: 24px; font-weight: 700; color: #4338ca; }
.cdc-stat-card .label { font-size: 12px; color: #706c8a; text-transform: uppercase; letter-spacing: .03em; }

/* Panels */
.cdc-panel { background: #fff; border: 1px solid #ece9f7; border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.cdc-panel h2 { margin-top: 0; font-size: 15px; }
.cdc-import-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.cdc-import-row textarea { flex: 1 1 400px; min-height: 110px; font-family: monospace; font-size: 12.5px; padding: 10px; border-radius: 8px; border: 1px solid #d6d3e8; }
.cdc-import-side { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
.cdc-import-side label { font-size: 12.5px; font-weight: 600; color: #4b4870; display:block; margin-bottom:4px;}
.cdc-import-side select { width: 100%; }

/* Filters */
.cdc-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.cdc-filters select, .cdc-filters input[type=text] { border-radius: 8px; border: 1px solid #d6d3e8; padding: 6px 10px; font-size: 13px; }
.cdc-filters input[type=text] { min-width: 220px; }

/* Bulk bar */
.cdc-bulkbar { display: flex; align-items: center; gap: 8px; background: #f2f1fb; border: 1px solid #d9d6f2; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; flex-wrap: wrap; }
.cdc-bulkbar span { font-size: 13px; font-weight: 600; color: #4338ca; }

/* Table */
.cdc-table-wrap { overflow-x: auto; background:#fff; border:1px solid #ece9f7; border-radius: 12px; }
table.cdc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.cdc-table th { text-align: left; padding: 10px 12px; background: #f8f7fd; border-bottom: 1px solid #ece9f7; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: #6b6890; white-space: nowrap; }
table.cdc-table td { padding: 10px 12px; border-bottom: 1px solid #f1f0f9; vertical-align: middle; }
table.cdc-table tr:hover td { background: #fafaff; }
.cdc-url-cell { display: flex; flex-direction: column; }
.cdc-url-cell a { font-weight: 600; color: #3d3a5c; text-decoration: none; }
.cdc-url-cell a:hover { color: #6366f1; }
.cdc-url-cell .biz { font-size: 12px; color: #8b87a8; }

/* Badges */
.cdc-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.cdc-badge-online { background: #dcfce7; color: #15803d; }
.cdc-badge-offline { background: #fee2e2; color: #b91c1c; }
.cdc-badge-ssl_error { background: #fef3c7; color: #b45309; }
.cdc-badge-redirect_issue { background: #ffedd5; color: #c2410c; }
.cdc-badge-error { background: #f3e8ff; color: #7e22ce; }
.cdc-badge-timeout { background: #e0e7ff; color: #4338ca; }
.cdc-badge-pendiente { background: #f1f5f9; color: #475569; }

.cdc-crm-select { border-radius: 999px; border: none; font-weight: 700; font-size: 11px; padding: 4px 22px 4px 10px; cursor: pointer; text-transform: uppercase; }
.cdc-crm-pendiente { background: #f1f5f9; color: #475569; }
.cdc-crm-contactado { background: #dbeafe; color: #1d4ed8; }
.cdc-crm-en_proceso { background: #fef3c7; color: #b45309; }
.cdc-crm-aceptado { background: #dcfce7; color: #15803d; }
.cdc-crm-no_interesado { background: #fee2e2; color: #b91c1c; }

.cdc-cat-chip { display: inline-flex; align-items:center; gap:5px; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #f1f0f9; color: #3d3a5c; }
.cdc-cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

.cdc-score { font-weight: 800; font-size: 13px; }
.cdc-score-high { color: #15803d; }
.cdc-score-mid { color: #b45309; }
.cdc-score-low { color: #dc2626; }
.cdc-old-flag { font-size: 11px; background:#f3e8ff; color:#7e22ce; padding:2px 7px; border-radius:999px; margin-left:4px; }

.cdc-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Pagination */
.cdc-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 14px; font-size: 13px; }

/* Modal */
.cdc-modal-overlay { position: fixed; inset: 0; background: rgba(30,27,46,.5); z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cdc-modal { background: #fff; border-radius: 16px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 24px; position: relative; }
.cdc-modal h2 { margin-top: 0; }
.cdc-modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 20px; cursor: pointer; color: #999; }
.cdc-field { margin-bottom: 14px; }
.cdc-field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: #4b4870; }
.cdc-field input, .cdc-field select, .cdc-field textarea { width: 100%; border-radius: 8px; border: 1px solid #d6d3e8; padding: 8px 10px; font-size: 13px; }

/* Audit report */
.cdc-audit-score-big { font-size: 42px; font-weight: 800; }
.cdc-audit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.cdc-audit-item { background: #f8f7fd; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.cdc-audit-item b { display: block; font-size: 14px; }
.cdc-ok { color: #15803d; }
.cdc-bad { color: #dc2626; }
.cdc-signals { list-style: none; padding: 0; margin: 8px 0 0; }
.cdc-signals li { padding: 6px 10px; background: #fef2f2; color: #991b1b; border-radius: 8px; margin-bottom: 6px; font-size: 12.5px; }

/* Notes */
.cdc-notes-list { list-style: none; padding: 0; margin: 0 0 14px; max-height: 220px; overflow-y: auto; }
.cdc-notes-list li { padding: 10px; border-radius: 8px; background: #f8f7fd; margin-bottom: 8px; font-size: 13px; }
.cdc-notes-list .meta { font-size: 11px; color: #8b87a8; margin-top: 4px; }

.cdc-toast { position: fixed; bottom: 20px; right: 20px; background: #1e1b2e; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 100001; opacity: 0; transform: translateY(10px); transition: all .2s; }
.cdc-toast.show { opacity: 1; transform: translateY(0); }

/* Informe visual de auditoria (pantalla y PDF) */
.cdc-report { max-width: 640px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cdc-report-header { text-align: center; margin-bottom: 14px; }
.cdc-report-site { font-size: 15px; font-weight: 700; color: #1e1b2e; }
.cdc-report-date { font-size: 11.5px; color: #9c99b8; margin-top: 2px; }
.cdc-report-gauge { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #fff; font-size: 40px; font-weight: 800; }
.cdc-report-gauge-high { background: linear-gradient(135deg,#22c55e,#16a34a); }
.cdc-report-gauge-mid { background: linear-gradient(135deg,#f59e0b,#d97706); }
.cdc-report-gauge-low { background: linear-gradient(135deg,#f97316,#dc2626); }
.cdc-report-title { text-align: center; font-size: 19px; font-weight: 800; margin-bottom: 2px; color: #1e1b2e; }
.cdc-report-subtitle { text-align: center; color: #6b6890; margin-bottom: 22px; font-size: 13.5px; }
.cdc-report-section { background: #f8f7fd; border-left: 4px solid #ef4444; border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.cdc-report-section.tip { border-left-color: #0ea5e9; }
.cdc-report-section h3 { margin: 0 0 12px; font-size: 14.5px; }
.cdc-report-issue { background: #fff; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.cdc-report-issue:last-child { margin-bottom: 0; }
.cdc-report-issue b { display: block; font-size: 13px; margin-bottom: 3px; color: #1e1b2e; }
.cdc-report-issue p { margin: 0; font-size: 12px; color: #55526e; line-height: 1.4; }
.cdc-report-severity { font-size: 10.5px; font-weight: 700; white-space: nowrap; padding-top: 2px; }
.cdc-severity-alto { color: #dc2626; }
.cdc-severity-medio { color: #b45309; }
.cdc-report-footer { text-align: center; font-size: 10.5px; color: #b3b0c9; margin-top: 10px; }
