 * 样式表与组件库
 */
:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --secondary: #64748b;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #06b6d4;
    --info-light: #ecfeff;

    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverted: #ffffff;

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}
.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
}
.brand-badge {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
    flex: 1;
}

.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.card-body {
    padding: 24px;
}
.card-footer {
    padding: 16px 24px;
    background: var(--bg-body);
    border-top: 1px solid var(--border-light);
}

.grid {
    display: grid;
    gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .navbar-container { flex-direction: column; gap: 12px; }
    .navbar-nav { flex-wrap: wrap; justify-content: center; gap: 8px; }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-control:disabled, .form-control[readonly] {
    background: #f1f5f9;
    color: var(--text-muted);
    cursor: not-allowed;
}
textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
}
.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}
.btn-block {
    width: 100%;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}
.badge-pending { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-approved { background: var(--success-light); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-rejected { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-updating { background: var(--info-light); color: var(--info); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-revoked  { background: #f1f5f9; color: var(--text-muted); border: 1px solid var(--border-color); }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}
.alert-info { background: var(--primary-light); color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }

.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}
.table th {
    background: var(--bg-body);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}
.table tr:hover td {
    background: #f8fafc;
}

.hero {
    text-align: center;
    padding: 48px 0 36px;
}
.hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}
.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 28px;
}

.search-box {
    max-width: 620px;
    margin: 0 auto 36px;
    display: flex;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--primary);
    background: #fff;
}
.search-input {
    flex: 1;
    border: none;
    padding: 16px 20px;
    font-size: 15px;
    outline: none;
}
.search-btn {
    border-radius: 0;
    padding: 0 28px;
    font-size: 15px;
    border: none;
}

.footer {
    background: #fff;
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: auto;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--text-muted); }


.no-scrollbar::-webkit-scrollbar,
.scrollbar-none::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.no-scrollbar,
.scrollbar-none {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.custom-scrollbar,
.table-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 0.2s ease;
}
.custom-scrollbar:hover,
.table-scrollbar:hover {
    scrollbar-color: #cbd5e1 transparent;
}

.custom-scrollbar::-webkit-scrollbar,
.table-scrollbar::-webkit-scrollbar {
    height: 5px;
    width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track,
.table-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb,
.table-scrollbar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}
.custom-scrollbar:hover::-webkit-scrollbar-thumb,
.table-scrollbar:hover::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover,
.table-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.scroll-fade-right {
    position: relative;
}
.scroll-fade-right::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 36px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95));
    pointer-events: none;
    border-top-right-radius: inherit;
    border-bottom-right-radius: inherit;
}

