.cig-wrap { max-width: 900px; }
#cig-app * { box-sizing: border-box; }
#cig-app { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #1e1b2e; }
.cig-loading { padding: 40px; font-size: 15px; color: #666; }

.cig-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 16px; flex-wrap: wrap; gap: 12px; }
.cig-header h1 { margin: 0; font-size: 23px; }

.cig-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; }
.cig-btn:hover { border-color: #4285F4; color: #4285F4; }
.cig-btn-primary { background: linear-gradient(135deg,#4285F4,#34A853); border: none; color: #fff; }
.cig-btn-primary:hover { opacity: .9; color: #fff; }
.cig-btn-danger { color: #dc2626; border-color: #fecaca; }
.cig-btn-danger:hover { background: #fef2f2; border-color: #dc2626; }
.cig-btn-sm { padding: 4px 10px; font-size: 12px; }
.cig-btn:disabled { opacity: .5; cursor: not-allowed; }

.cig-credits-badge { background: linear-gradient(135deg,#fef3c7,#fde68a); border-color: #fcd34d; color: #92400e; font-weight: 700; }
.cig-credits-badge:hover { color: #78350f; border-color: #f59e0b; }

.cig-panel { background: #fff; border: 1px solid #ece9f7; border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.cig-panel h2 { margin-top: 0; font-size: 15px; }

.cig-field { margin-bottom: 14px; }
.cig-field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: #4b4870; }
.cig-field input, .cig-field select, .cig-field textarea { width: 100%; border-radius: 8px; border: 1px solid #d6d3e8; padding: 8px 10px; font-size: 13px; }

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

.cig-table-wrap { overflow-x: auto; background:#fff; border:1px solid #ece9f7; border-radius: 12px; }
table.cig-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.cig-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.cig-table td { padding: 10px 12px; border-bottom: 1px solid #f1f0f9; vertical-align: middle; }
table.cig-table tr:hover td { background: #fafaff; }
.cig-name-cell { display: flex; flex-direction: column; }
.cig-name-cell b { font-size: 13.5px; }
.cig-name-cell span { font-size: 11.5px; color: #8b87a8; }
.cig-row-actions { display: flex; gap: 6px; flex-wrap: wrap; }

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

.cig-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; }
.cig-modal { background: #fff; border-radius: 16px; max-width: 640px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 24px; position: relative; }
.cig-modal h2 { margin-top: 0; }
.cig-modal-close { position: absolute; top: 16px; right: 18px; background: none; border: none; font-size: 20px; cursor: pointer; color: #999; }

.cig-ok { color: #15803d; }
.cig-bad { color: #dc2626; }
.cig-score { font-weight: 800; font-size: 13px; }
.cig-score-high { color: #15803d; }
.cig-score-mid { color: #b45309; }
.cig-score-low { color: #dc2626; }

.cig-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; }
.cig-toast.show { opacity: 1; transform: translateY(0); }

/* Informe visual (pantalla y HTML descargado) */
.cig-report { max-width: 640px; margin: 0 auto; }
.cig-report-header { text-align: center; margin-bottom: 14px; }
.cig-report-site { font-size: 15px; font-weight: 700; color: #1e1b2e; }
.cig-report-date { font-size: 11.5px; color: #9c99b8; margin-top: 2px; }
.cig-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; }
.cig-report-gauge-high { background: linear-gradient(135deg,#22c55e,#16a34a); }
.cig-report-gauge-mid { background: linear-gradient(135deg,#f59e0b,#d97706); }
.cig-report-gauge-low { background: linear-gradient(135deg,#f97316,#dc2626); }
.cig-report-title { text-align: center; font-size: 19px; font-weight: 800; margin-bottom: 2px; color: #1e1b2e; }
.cig-report-subtitle { text-align: center; color: #6b6890; margin-bottom: 22px; font-size: 13.5px; }
.cig-report-section { background: #f8f7fd; border-left: 4px solid #ef4444; border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.cig-report-section.tip { border-left-color: #0ea5e9; }
.cig-report-section h3 { margin: 0 0 12px; font-size: 14.5px; }
.cig-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; border: 1px solid #f1f0f9; }
.cig-report-issue:last-child { margin-bottom: 0; }
.cig-report-issue b { display: block; font-size: 13px; margin-bottom: 3px; color: #1e1b2e; }
.cig-report-issue p { margin: 0; font-size: 12px; color: #55526e; line-height: 1.4; }
.cig-report-severity { font-size: 10.5px; font-weight: 700; white-space: nowrap; padding-top: 2px; }
.cig-severity-alto { color: #dc2626; }
.cig-severity-medio { color: #b45309; }
.cig-swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.cig-swot-item { background: #f8f7fd; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.cig-swot-item b { display: block; font-size: 14px; margin-bottom: 6px; }
.cig-swot-item ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: #55526e; }
