/* ===================================================================
   PPG REFINISH CRM v2.0 - CERTIFICATIONS STYLES
   Certificate cards, filters, and certificate design template
   =================================================================== */

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Certificate Card */
.certificate-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.certificate-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.25);
}

/* Certificate Header */
.cert-header {
    padding: 16px 20px;
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cert-type-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Certificate Body */
.cert-body {
    padding: 24px 20px;
    text-align: center;
    flex-grow: 1;
}

/* Student Photo */
.cert-photo {
    width: 100px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #E9ECEF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cert-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-photo-placeholder {
    width: 100px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #E9ECEF, #DEE2E6);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #E9ECEF;
}

.cert-photo-placeholder i {
    font-size: 48px;
    color: #ADB5BD;
}

/* Student Name */
.cert-student-name {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Program Name */
.cert-program-name {
    font-size: 13px;
    color: #6C757D;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* Scores */
.cert-scores {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #E9ECEF;
    border-bottom: 1px solid #E9ECEF;
}

.score-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-label {
    font-size: 11px;
    color: #6C757D;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-value {
    font-size: 20px;
    font-weight: 700;
    color: #0066CC;
}

/* Grade */
.cert-grade {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #28A745;
    margin-bottom: 16px;
}

.cert-grade i {
    font-size: 18px;
    color: #FFC107;
}

/* Certificate Meta */
.cert-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cert-code {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.cert-date {
    font-size: 12px;
    color: #6C757D;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Certificate Footer */
.cert-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: #F8F9FA;
    border-top: 1px solid #E9ECEF;
}

.cert-footer button {
    flex: 1;
}

/* Filters Row */
.filters-row {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
}

.filter-group label {
    margin-bottom: 0;
    white-space: nowrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ADB5BD;
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    font-size: 22px;
    color: #495057;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 15px;
    color: #6C757D;
    margin-bottom: 24px;
}

/* Certificate Design Template (Full View) */
.certificate-template {
    background: #FFFFFF;
    width: 800px;
    padding: 60px;
    margin: 0 auto;
    border: 20px solid;
    border-image: linear-gradient(135deg, #0066CC, #00509E, #28A745) 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.cert-template-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #0066CC;
    padding-bottom: 20px;
}

.cert-template-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #0066CC, #00509E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 48px;
}

.cert-template-title {
    font-size: 36px;
    font-weight: 700;
    color: #0066CC;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.cert-template-subtitle {
    font-size: 18px;
    color: #6C757D;
    font-style: italic;
}

.cert-template-body {
    text-align: center;
    margin-bottom: 40px;
}

.cert-student-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.cert-student-photo-large {
    width: 120px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 4px solid #0066CC;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.cert-student-photo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cert-student-details {
    text-align: left;
}

.cert-declares {
    font-size: 16px;
    color: #495057;
    margin-bottom: 16px;
}

.cert-student-name-large {
    font-size: 32px;
    font-weight: 700;
    color: #212529;
    text-transform: uppercase;
    margin: 8px 0;
    border-bottom: 2px solid #0066CC;
    padding-bottom: 8px;
}

.cert-completion-text {
    font-size: 15px;
    color: #6C757D;
    margin-bottom: 24px;
}

.cert-program-name-large {
    font-size: 24px;
    font-weight: 700;
    color: #0066CC;
    text-transform: uppercase;
    margin: 16px 0;
}

.cert-scores-large {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin: 32px 0;
    padding: 24px;
    background: linear-gradient(135deg, #F8F9FA, #E9ECEF);
    border-radius: 8px;
}

.cert-score-large {
    text-align: center;
}

.cert-score-large-label {
    font-size: 14px;
    color: #6C757D;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.cert-score-large-value {
    font-size: 36px;
    font-weight: 700;
    color: #28A745;
}

.cert-template-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 2px solid #E9ECEF;
}

.cert-signature {
    text-align: center;
    flex: 1;
}

.cert-signature-line {
    width: 200px;
    height: 60px;
    border-bottom: 2px solid #212529;
    margin: 0 auto 8px;
}

.cert-signature-label {
    font-size: 13px;
    color: #495057;
    font-weight: 600;
}

.cert-qr-code {
    width: 100px;
    height: 100px;
    background: #F8F9FA;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #6C757D;
}

/* Responsive */
@media (max-width: 1200px) {
    .certificates-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group label {
        margin-bottom: 8px;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100% !important;
    }
    
    .cert-footer {
        flex-direction: column;
    }
    
    .cert-footer button {
        width: 100%;
    }
    
    .certificate-template {
        width: 100%;
        padding: 30px;
        border-width: 10px;
    }
    
    .cert-student-info {
        flex-direction: column;
    }
    
    .cert-student-details {
        text-align: center;
    }
    
    .cert-scores-large {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .cert-scores {
        flex-direction: column;
        gap: 12px;
    }
    
    .cert-template-title {
        font-size: 24px;
    }
    
    .cert-student-name-large {
        font-size: 24px;
    }
    
    .cert-program-name-large {
        font-size: 18px;
    }
}
