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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.nav-brand {
    font-size: 20px;
    font-weight: bold;
    color: #4a90e2;
}

.nav-menu a {
    margin-left: 20px;
    text-decoration: none;
    color: #666;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #4a90e2;
}

/* 登录页面 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 10px;
    color: #333;
}

.login-box .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

/* 表单样式 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

.btn-primary, .btn-login {
    width: 100%;
    padding: 12px;
    background: #4a90e2;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-primary:hover, .btn-login:hover {
    background: #3a7bc9;
}

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

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

.btn-small {
    display: inline-block;
    padding: 5px 12px;
    background: #4a90e2;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 12px;
    margin: 0 2px;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.card .number {
    font-size: 32px;
    font-weight: bold;
    color: #4a90e2;
}

/* 数据表格 */
.data-table {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    font-weight: 600;
    color: #555;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* 两栏布局 */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.create-user-form,
.users-list {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 15px 0;
}

.permissions label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* 消息提示 */
.error, .error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination a {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #4a90e2;
}

.pagination a.active {
    background: #4a90e2;
    color: #fff;
    border-color: #4a90e2;
}

/* 结果页面 */
.result-box {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.stats {
    margin: 30px 0;
}

.stat-item {
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
}

.stat-item.success {
    background: #d4edda;
    color: #155724;
}

.stat-item.warning {
    background: #fff3cd;
    color: #856404;
}

.stat-item.error {
    background: #f8d7da;
    color: #721c24;
}

.stat-item.info {
    background: #d1ecf1;
    color: #0c5460;
}

.invalid-list {
    text-align: left;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

.invalid-list ul {
    margin-left: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.actions .btn-primary,
.actions .btn-secondary {
    width: auto;
    padding: 10px 20px;
}

.info-box {
    background: #e7f3ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4a90e2;
}

.library-header {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.library-header h1 {
    margin-bottom: 10px;
}

.library-header .actions {
    justify-content: flex-start;
    margin-top: 20px;
}

.operator-panel h1 {
    margin-bottom: 20px;
}

.permission-info {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.permission-info ul {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
    list-style: none;
}

/* 响应式 */
@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
}