* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
}
a { text-decoration: none; color: inherit; }

/* 顶部导航 */
.navbar {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .logo { font-size: 18px; font-weight: bold; }
.navbar .nav-right { display: flex; align-items: center; gap: 20px; }
.navbar .nav-right a {
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 14px;
}
.navbar .nav-right a:hover { background: rgba(255,255,255,0.2); }

/* 侧边栏 */
.layout { display: flex; min-height: calc(100vh - 60px); }
.sidebar {
    width: 220px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    padding: 20px 0;
}
.sidebar .menu-item {
    display: block;
    padding: 12px 24px;
    color: #555;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.sidebar .menu-item:hover, .sidebar .menu-item.active {
    background: #e8f0fe;
    color: #1a73e8;
    border-left-color: #1a73e8;
}
.sidebar .menu-group {
    padding: 8px 24px;
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* 主内容 */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-x: auto;
}
.page-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #1a1a1a;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    color: #1a1a1a;
}

/* 统计卡片 */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    flex: 1;
    min-width: 180px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.stat-card .stat-label { color: #888; font-size: 13px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 24px; font-weight: bold; color: #1a73e8; }
.stat-card.warning .stat-value { color: #f57c00; }
.stat-card.success .stat-value { color: #388e3c; }
.stat-card.danger .stat-value { color: #d32f2f; }

/* 按钮 */
.btn {
    display: inline-block;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-primary { background: #1a73e8; color: white; }
.btn-primary:hover { background: #1557b0; }
.btn-success { background: #43a047; color: white; }
.btn-success:hover { background: #2e7d32; }
.btn-danger { background: #e53935; color: white; }
.btn-danger:hover { background: #c62828; }
.btn-warning { background: #fb8c00; color: white; }
.btn-warning:hover { background: #ef6c00; }
.btn-default { background: #e0e0e0; color: #333; }
.btn-default:hover { background: #bdbdbd; }
.btn-sm { padding: 4px 12px; font-size: 12px; }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #555; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border 0.2s;
}
.form-control:focus { border-color: #1a73e8; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 13px;
}
.table th, .table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}
.table tr:hover { background: #f9f9f9; }

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
}
.tag-blue { background: #e3f2fd; color: #1565c0; }
.tag-green { background: #e8f5e9; color: #2e7d32; }
.tag-orange { background: #fff3e0; color: #ef6c00; }
.tag-red { background: #ffebee; color: #c62828; }
.tag-gray { background: #f5f5f5; color: #616161; }

/* Flash 消息 */
.flash-container { position: fixed; top: 70px; right: 20px; z-index: 1000; }
.flash {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 200px;
    animation: slideIn 0.3s;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.flash-success { background: #e8f5e9; color: #2e7d32; }
.flash-danger { background: #ffebee; color: #c62828; }
.flash-warning { background: #fff3e0; color: #ef6c00; }
.flash-info { background: #e3f2fd; color: #1565c0; }

/* 登录页 */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 400px;
}
.login-box h2 { text-align: center; margin-bottom: 30px; color: #1a73e8; }
.login-box .form-control { padding: 12px; }
.login-box .btn-primary { width: 100%; padding: 12px; font-size: 16px; }
.login-box .links { text-align: center; margin-top: 16px; }
.login-box .links a { color: #1a73e8; font-size: 13px; margin: 0 10px; }

/* 空状态 */
.empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 复选框列 */
.checkbox-cell { width: 40px; text-align: center; }

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 150px; }

/* 操作日志 */
.log-action { font-weight: 600; color: #1a73e8; }
.log-detail { color: #666; font-size: 12px; }
