
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f5f7fa;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }

        /* Header */
        .header {
            background: white;
            padding: 20px 30px;
            border-bottom: 1px solid #e9ecef;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .reca-logo {
            background: #28a745;
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 16px;
        }

        .contract-title {
            flex-grow: 1;
            text-align: center;
        }

        .contract-title h2 {
            color: #333;
            font-size: 18px;
            margin: 0;
        }

        .contract-title .product-name {
            color: #0066cc;
            font-weight: bold;
            font-size: 16px;
        }

        .close-btn {
            background: #dc3545;
            color: white;
            border: none;
            width: 30px;
            height: 30px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .close-btn:hover {
            background: #c82333;
        }

        /* Antecedentes section */
        .antecedentes {
            position: absolute;
            top: 20px;
            right: 30px;
            background: #f8f9fa;
            border: 1px solid #dee2e6;
            border-radius: 10px;
            padding: 15px;
            width: 200px;
        }

        .antecedentes h4 {
            color: #495057;
            font-size: 14px;
            margin-bottom: 10px;
        }

        .year-badge {
            background: #28a745;
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 12px;
            margin: 2px;
            cursor: pointer;
            display: inline-block;
        }

        .year-badge:hover {
            background: #218838;
        }

        .current-version {
            background: #28a745;
            color: white;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 12px;
            margin-bottom: 10px;
            text-align: center;
        }

        /* Main content */
        .main-content {
            padding: 30px;
            position: relative;
        }

        /* Institution logo */
        .institution-logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .institution-logo img {
            max-width: 300px;
            max-height: 120px;
            object-fit: contain;
        }

        /* Info grid */
        .info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            margin-bottom: 30px;
        }

        .info-item {
            display: flex;
            align-items: flex-start;
            gap: 15px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 10px;
        }

        .info-icon {
            width: 40px;
            height: 40px;
            background: #28a745;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 18px;
            flex-shrink: 0;
        }

        .info-content h5 {
            color: #495057;
            font-size: 14px;
            margin-bottom: 5px;
            font-weight: 600;
        }

        .info-content p {
            color: #6c757d;
            font-size: 16px;
            margin: 0;
            line-height: 1.4;
        }

        .status-vigente {
            color: #28a745;
            font-weight: bold;
        }

        .status-cancelado {
            color: #dc3545;
            font-weight: bold;
        }

        /* Documents section */
        .documents-section {
            margin: 30px 0;
        }

        .documents-section h3 {
            color: #333;
            font-size: 18px;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #28a745;
        }

        .documents-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        .documents-table thead {
            background: #e8f5e8;
        }

        .documents-table th,
        .documents-table td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid #dee2e6;
        }

        .documents-table th {
            font-weight: 600;
            color: #495057;
            font-size: 14px;
        }

        .documents-table tbody tr:hover {
            background: #f8f9fa;
        }

        .ver-btn {
            background: #007bff;
            color: white;
            padding: 5px 10px;
            border: none;
            border-radius: 15px;
            font-size: 12px;
            cursor: pointer;
            text-decoration: none;
            display: inline-block;
        }

        .ver-btn:hover {
            background: #0056b3;
        }

        /* Description section */
        .description-section {
            margin: 30px 0;
        }

        .description-section h3 {
            color: #333;
            font-size: 18px;
            margin-bottom: 15px;
        }

        .description-box {
            background: #e8f5e8;
            padding: 20px;
            border-radius: 10px;
            line-height: 1.6;
            color: #495057;
        }

        /* Actions */
        .actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #dee2e6;
        }

        .back-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #007bff;
            text-decoration: none;
            font-weight: 600;
        }

        .back-btn:hover {
            color: #0056b3;
        }

        .print-btn {
            background: #6c757d;
            color: white;
            padding: 8px 15px;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
        }

        .print-btn:hover {
            background: #545b62;
        }

        /* Alert messages */
        .alert {
            padding: 15px;
            border-radius: 10px;
            margin: 20px 0;
            font-size: 14px;
            line-height: 1.5;
        }

        .alert-danger {
            background: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

        .alert-warning {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }

        .special-message {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
            border-radius: 10px;
            padding: 15px;
            margin: 20px 0;
            font-size: 12px;
            line-height: 1.4;
            max-height: 200px;
            overflow-y: auto;
        }

        /* Tech sheet link */
        .tech-sheet-link {
            background: #ff6e00;
            color: white;
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            margin: 20px 0;
        }

        .tech-sheet-link a {
            color: #0078ae;
            font-size: 14pt;
            text-decoration: underline;
        }

        /* Product image */
        .product-image {
            text-align: center;
            margin: 20px 0;
        }

        .product-image img {
            max-width: 200px;
            max-height: 100px;
            object-fit: contain;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }

        /* Responsive */
        @media (max-width: 768px) {
            .container {
                margin: 0;
                border-radius: 0;
            }

            .info-grid {
                grid-template-columns: 1fr;
            }

            .antecedentes {
                position: static;
                width: 100%;
                margin-bottom: 20px;
            }

            .actions {
                flex-direction: column;
                gap: 15px;
                align-items: stretch;
            }
        }

        .year-badge {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 8px 12px;
    margin: 3px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    user-select: none;
    border: 2px solid transparent;
    position: relative;
}

.year-badge:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    border-color: #004494;
}

.year-badge:active {
    transform: scale(0.95);
    background: #004494;
}

/* Debug styles */
.year-badge::after {
    content: attr(data-id);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
    color: #666;
    white-space: nowrap;
}

.antecedentes {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007bff;
    border: 1px solid #ddd;
}

.current-version {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.antecedentes h4 {
    margin: 15px 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

#versionHistory {
    min-height: 40px;
    padding: 10px 0;
}