/**
 * Estilos de Páginas Públicas
 */

/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #1a1a2e;
    --secondary-light: #16213e;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --text: #333;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: #f5f6fa;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.public-header {
    background: var(--secondary);
    padding: 15px 0;
}

.public-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--secondary);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--secondary);
}

.btn-block {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Main */
.public-main {
    padding: 40px 0;
}

/* Report Header */
.report-header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 40px;
}

.report-badge {
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-en_proceso { background: #ffeeba; color: #856404; }
.badge-completada { background: #c3e6cb; color: #155724; }
.badge-certificada { background: #b8daff; color: #004085; }
.badge-expirada { background: #f5c6cb; color: #721c24; }

.report-header h1 {
    font-size: 32px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.report-meta {
    font-size: 18px;
    color: var(--text-muted);
}

.report-meta strong {
    color: var(--secondary);
}

/* Report Grid */
.report-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.card h2 {
    font-size: 18px;
    color: var(--secondary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.card h3 {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 15px;
}

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: var(--text-muted);
}

.info-row .value {
    font-weight: 500;
    text-align: right;
}

/* Content Text */
.content-text {
    line-height: 1.8;
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 500;
}

/* Findings */
.findings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.finding-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.finding-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.severity-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
}

.finding-header h3 {
    margin: 0;
    font-size: 16px;
}

.finding-desc {
    color: var(--text);
    margin-bottom: 15px;
}

.finding-recommendation {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-size: 14px;
}

.finding-recommendation strong {
    color: var(--secondary);
}

.finding-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: #e9ecef;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.tag.status-remediado {
    background: #d4edda;
    color: #155724;
}

.tag.status-pendiente {
    background: #f8d7da;
    color: #721c24;
}

/* Score Card */
.score-card {
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--color, var(--success));
    margin: 0 auto 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.score-value {
    font-size: 36px;
    font-weight: bold;
    line-height: 1;
}

.score-max {
    font-size: 14px;
    opacity: 0.8;
}

.score-label {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.risk-level {
    font-size: 14px;
}

/* Vuln Summary */
.vuln-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vuln-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.vuln-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.vuln-label {
    flex: 1;
    font-size: 14px;
}

.vuln-count {
    font-weight: 600;
    font-size: 16px;
}

/* Verification Card */
.verification-card {
    text-align: center;
}

.verification-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.verification-card .token {
    display: block;
    background: #f8f9fa;
    padding: 12px;
    border-radius: var(--radius);
    font-size: 12px;
    margin-bottom: 15px;
    word-break: break-all;
}

/* Footer */
.public-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.7);
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
}

.public-footer p {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .report-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .report-header h1 {
        font-size: 24px;
    }

    .card {
        padding: 20px;
    }

    .finding-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
