/* 下载牛系统 - 后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 14px; color: #333; background: #f0f2f5; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* 登录页 */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.login-box { width: 400px; background: #fff; border-radius: 16px; padding: 40px 35px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo-icon { width: 70px; height: 70px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 36px; color: #fff; margin-bottom: 15px; }
.login-title { font-size: 24px; font-weight: bold; color: #333; }
.login-subtitle { color: #999; margin-top: 5px; font-size: 14px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; color: #555; }
.form-control { width: 100%; padding: 10px 15px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; outline: none; transition: all 0.3s; }
.form-control:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.btn { display: inline-block; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; transition: all 0.3s; font-weight: 500; }
.btn-primary { width: 100%; padding: 12px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; font-size: 16px; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(102,126,234,0.4); }
.btn-success { background: #52c41a; color: #fff; }
.btn-success:hover { background: #389e0d; }
.btn-warning { background: #faad14; color: #fff; }
.btn-warning:hover { background: #d48806; }
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #cf1322; }
.btn-default { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn-default:hover { border-color: #667eea; color: #667eea; }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }

/* 后台布局 */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: #001529; color: rgba(255,255,255,0.7); flex-shrink: 0; }
.sidebar-logo { height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; font-weight: bold; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-menu { padding: 15px 0; }
.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 12px 24px; cursor: pointer; transition: all 0.3s; color: rgba(255,255,255,0.7); }
.sidebar-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-item.active { background: #1890ff; color: #fff; }
.sidebar-icon { font-size: 16px; width: 20px; text-align: center; }

/* 主内容区 */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-header { height: 64px; background: #fff; box-shadow: 0 1px 4px rgba(0,21,41,0.08); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.header-title { font-size: 18px; font-weight: 600; color: #333; }
.header-right { display: flex; align-items: center; gap: 20px; }
.admin-info { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 10px; border-radius: 6px; transition: all 0.3s; }
.admin-info:hover { background: #f5f7fa; }
.admin-avatar { width: 32px; height: 32px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; }
.logout-btn { padding: 5px 15px; background: #fff; color: #ff4d4f; border: 1px solid #ffccc7; border-radius: 6px; cursor: pointer; transition: all 0.3s; }
.logout-btn:hover { background: #ff4d4f; color: #fff; }

.admin-content { flex: 1; padding: 24px; overflow: auto; }

/* 卡片 */
.card { background: #fff; border-radius: 10px; padding: 24px; margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.card-title { font-size: 18px; font-weight: 600; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 10px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; }
.stat-card.blue::before { background: #1890ff; }
.stat-card.green::before { background: #52c41a; }
.stat-card.orange::before { background: #faad14; }
.stat-card.purple::before { background: #722ed1; }
.stat-label { color: #999; font-size: 14px; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: bold; color: #333; }
.stat-icon { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 48px; opacity: 0.1; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.table th { background: #fafafa; font-weight: 600; color: #555; font-size: 13px; }
.table tr:hover { background: #fafafa; }
.table-actions { display: flex; gap: 8px; }

/* 标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.tag-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.tag-warning { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.tag-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.tag-info { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }

/* 表单 */
.form-row { display: flex; gap: 20px; margin-bottom: 15px; flex-wrap: wrap; }
.form-col { flex: 1; min-width: 250px; }
.form-textarea { width: 100%; padding: 10px 15px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; outline: none; resize: vertical; min-height: 100px; transition: all 0.3s; }
.form-textarea:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1); }
.form-select { width: 100%; padding: 10px 15px; border: 1px solid #d9d9d9; border-radius: 8px; font-size: 14px; outline: none; background: #fff; }
.form-select:focus { border-color: #667eea; }

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-bar .form-control, .filter-bar .form-select { width: 200px; }

/* 提示消息 */
.alert { padding: 12px 20px; border-radius: 8px; margin-bottom: 15px; }
.alert-success { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }
.alert-error { background: #fff2f0; border: 1px solid #ffccc7; color: #cf1322; }
.alert-info { background: #e6f7ff; border: 1px solid #91d5ff; color: #096dd9; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-icon { font-size: 64px; margin-bottom: 15px; opacity: 0.4; }
.empty-text { font-size: 16px; }

/* 响应式 */
@media (max-width: 992px) {
    .admin-sidebar { width: 70px; }
    .sidebar-logo span, .sidebar-item span:not(.sidebar-icon) { display: none; }
    .sidebar-item { justify-content: center; padding: 12px; }
}
