/* ========================================
   运营管理后台样式
   ======================================== */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --success-color: #52c41a;
    --warning-color: #faad14;
    --error-color: #f5222d;
    --text-primary: #262626;
    --text-secondary: #595959;
    --text-tertiary: #8c8c8c;
    --border-color: #d9d9d9;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --sidebar-width: 240px;
    --header-height: 64px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.5;
}

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

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group label i {
    margin-right: 8px;
    color: var(--text-tertiary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-info {
    background: #e6f7ff;
    color: var(--primary-color);
}

.btn-info:hover {
    background: #bae7ff;
}

/* 提示框 */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 8px;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: var(--error-color);
}

/* 管理后台布局 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: #001529;
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
}

.logo i {
    margin-right: 12px;
    font-size: 24px;
    color: var(--primary-color);
}

.logo-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    margin-left: 36px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: white;
    background: var(--primary-color);
    border-left-color: #40a9ff;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-name {
    font-weight: 500;
}

.logout-btn {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
}

.logout-btn:hover {
    color: white;
}

/* 主内容区 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-header {
    background: var(--bg-primary);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.content-body {
    padding: 24px;
}

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

.stat-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 16px;
}

.stat-icon.users { background: #e6f7ff; color: var(--primary-color); }
.stat-icon.groups { background: #f6ffed; color: var(--success-color); }
.stat-icon.demands { background: #fff7e6; color: var(--warning-color); }
.stat-icon.orders { background: #f9f0ff; color: #722ed1; }
.stat-icon.work-orders { background: #fff0f6; color: #eb2f96; }

.stat-info h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-trend {
    font-size: 12px;
    display: flex;
    align-items: center;
}

.stat-trend.up {
    color: var(--success-color);
}

.stat-trend.warning {
    color: var(--warning-color);
}

.stat-trend i {
    margin-right: 4px;
}

/* 快捷操作 */
.quick-actions {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.action-card i {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.action-card:hover {
    background: #e6f7ff;
    transform: translateY(-2px);
}

/* 最近活动 */
.recent-activity {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.activity-item i {
    font-size: 20px;
    margin-right: 16px;
}

.activity-item i.success {
    color: var(--success-color);
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* 数据表格 */
.data-table-container {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.table-actions {
    display: flex;
    gap: 12px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 240px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    background: var(--bg-secondary);
}

.data-table tr:hover {
    background: var(--bg-secondary);
}

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-success {
    background: #f6ffed;
    color: var(--success-color);
    border: 1px solid #b7eb8f;
}

.badge-danger {
    background: #fff2f0;
    color: var(--error-color);
    border: 1px solid #ffccc7;
}

.badge-info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.page-link {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
}

.page-info {
    color: var(--text-secondary);
}

/* 登录页脚 */
.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 12px;
}
