﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

header h1 {
    color: #2d3748;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #718096;
    font-size: 1.1em;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: none;
    font-size: 1em;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 8px;
}

.tab-btn:hover {
    color: #2d3748;
    background: #f7fafc;
}

.tab-btn.active {
    color: #667eea;
    background: #ebf4ff;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    padding: 12px 30px;
    background: #e2e8f0;
    color: #2d3748;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.btn-danger {
    padding: 5px 10px;
    background: #fc8181;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.upload-area {
    border: 3px dashed #e2e8f0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.upload-hint {
    color: #a0aec0;
    font-size: 0.9em;
    margin-top: 5px;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
}

.file-details span {
    font-weight: 500;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin: 15px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
}

.preview-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.preview-container {
    border-radius: 8px;
    overflow: hidden;
}

#historyList {
    max-height: 500px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item .cert-info {
    display: flex;
    flex-direction: column;
}

.history-item .cert-name {
    font-weight: 500;
    color: #2d3748;
}

.history-item .cert-date {
    font-size: 0.9em;
    color: #718096;
}

.loading {
    text-align: center;
    color: #718096;
    padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        text-align: center;
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .preview-actions {
        flex-direction: column;
    }
}
