* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部导航 */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-menu a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 2px;
    transition: all 0.2s;
}

.navbar-menu a:hover {
    background: #3498db;
    color: white;
}

.navbar-menu .logout-btn {
    background: #e74c3c;
    color: white;
}

.navbar-menu .logout-btn:hover {
    background: #c0392b;
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
}

.footer-content {
    color: #666;
    line-height: 1.8;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* 卡片容器 */
.card {
    background: white;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
    font-family: 'Courier New', monospace;
}

select.form-control {
    cursor: pointer;
}

/* 按钮样式 */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #2c3e50;
    color: white;
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody td {
    padding: 15px;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

.badge-info {
    background: #3498db;
    color: white;
}

.badge-secondary {
    background: #95a5a6;
    color: white;
}

/* 证书卡片网格 */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.cert-card {
    background: white;
    border-radius: 3px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    border-left: 3px solid #3498db;
}

.cert-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cert-card-header {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    word-break: break-all;
}

.cert-info {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.cert-info strong {
    color: #333;
}

.cert-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cert-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* 消息提示 */
.alert {
    padding: 15px 20px;
    border-radius: 3px;
    margin-bottom: 20px;
    font-weight: 400;
    border-left: 3px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 3px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 3px solid #3498db;
}

.stat-info h3 {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

.stat-icon {
    font-size: 48px;
    opacity: 0.2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
    }

    .navbar-menu a {
        width: 100%;
        text-align: center;
    }

    .cert-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 14px;
    }

    thead th, tbody td {
        padding: 10px 5px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.modal-header {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}
