/* 小米风格样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.5;
}

/* 登录页样式 */
.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: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 400px;
}

.login-box h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6700;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: #ff6700;
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background-color: #ff8533;
}

.btn-danger {
    background-color: #ff4757;
    color: #fff;
}

.btn-danger:hover {
    background-color: #ff6b7a;
}

.btn-success {
    background-color: #2ed573;
    color: #fff;
}

.btn-success:hover {
    background-color: #3ee680;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 顶部导航 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 0 20px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header h1 {
    font-size: 20px;
    font-weight: 500;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right span {
    color: #666;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background-color: #fff;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    min-height: calc(100vh - 60px);
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 60px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    border-bottom: 1px solid #f5f5f5;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #fff5f0;
    color: #ff6700;
    border-left: 3px solid #ff6700;
}

/* 主内容区 */
.main-content {
    margin-left: 200px;
    padding: 20px;
    min-height: calc(100vh - 60px);
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 10px;
}

/* 表格 */
.table-container {
    overflow-x: auto;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #f5f5f5;
}

table th {
    background-color: #fafafa;
    font-weight: 500;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

table tr:hover {
    background-color: #fafafa;
}

table img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
}

/* 表单 */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6700;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #ff6700;
    color: #fff;
    border-color: #ff6700;
}

.pagination .active {
    background-color: #ff6700;
    color: #fff;
    border-color: #ff6700;
}

.pagination-info {
    margin-right: 20px;
    color: #666;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-card.success {
    background: linear-gradient(135deg, #2ed573 0%, #1ecc5a 100%);
}

.stat-card.warning {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
}

.stat-card.danger {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 10px;
}

.stat-card .stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* 批量操作 */
.batch-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.batch-actions select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* 消息提示 */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
