/* 证书查询页面样式 */

.page-header {
    background: white;
    text-align: center;
    padding: 40px 20px;
    border-bottom: 2px solid #007bff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-logo {
    margin-bottom: 20px;
}

.school-logo {
    height: 60px;
    width: auto;
}

.page-header h1 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin: 15px 0;
}

.header-subtitle {
    color: #666;
    font-size: 16px;
}

.certificate-query-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.query-form-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.certificate-query-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

.error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.form-actions .btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.query-tips {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    border-left: 4px solid #007bff;
}

.query-tips h4 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 16px;
}

.query-tips ul {
    margin: 0;
    padding-left: 20px;
}

.query-tips li {
    margin-bottom: 8px;
    color: #666;
    line-height: 1.5;
}

.query-result-section {
    min-height: 200px;
}

.alert {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert i {
    margin-right: 10px;
    font-size: 18px;
}

.certificate-preview {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #007bff;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.preview-header h3 {
    margin: 0;
    color: #007bff;
    font-size: 18px;
}

.preview-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

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

.preview-row label {
    font-weight: 500;
    color: #666;
    width: 80px;
    flex-shrink: 0;
}

.preview-row span {
    color: #333;
    font-weight: 500;
}

.status-issued { color: #166534; font-weight: 600; }
.status-pending { color: #92400e; font-weight: 600; }
.status-revoked { color: #dc2626; font-weight: 600; }

/* 响应式设计 */
@media (max-width: 768px) {
    .certificate-query-container {
        padding: 10px;
    }

    .query-form-section {
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .preview-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .preview-content {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 20px 15px;
    }

    .query-form-section {
        padding: 15px;
    }

    .certificate-preview {
        padding: 15px;
    }
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.certificate-query-container {
    animation: fadeIn 0.6s ease-out;
}

/* 输入验证样式 */
.form-group.error input {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* 实时验证提示 */
.validation-tip {
    position: absolute;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 2px;
    display: none;
    z-index: 1000;
}

.validation-tip.show {
    display: block;
}

.validation-tip.error {
    background: #dc2626;
}

.validation-tip.success {
    background: #16a34a;
}
