/* 现代化侧边栏布局样式 - 完全静态无动画 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* 主布局容器 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 - 固定高度无滚动条设计 */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    flex-shrink: 0;
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.sidebar-header p {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 6px;
}

/* 导航菜单 - 可滚动区域 */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
}

/* 优化滚动条样式 */
.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-section {
    margin-bottom: 10px;
    position: relative;
}

/* 在每个分组前添加分割线 */
.nav-section:not(:first-child)::before {
    content: '';
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    margin: 15px 20px;
}

.nav-section-title {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: none !important;
    position: relative;
    line-height: 1.5;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    margin: 0 10px;
    transition: none !important;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
    border-radius: 8px;
    margin: 0 10px;
    transition: none !important;
}

/* 导航组样式 */
.nav-group {
    margin-bottom: 4px;
}

.nav-sub {
    margin-left: 12px;
    font-size: 11px;
    padding: 6px 15px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-sub:hover {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    margin: 2px 10px;
}

.nav-sub.active {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    margin: 2px 10px;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 套餐版本徽章 - 绝对定位到右侧 - 无动画 */
.package-badge {
    position: absolute;
    right: 12px;
    padding: 3px 10px;
    background: rgba(255, 215, 0, 0.9);
    color: #333;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    transition: none;
    animation: none;
    transform: none;
}

.nav-item.active .package-badge {
    background: #ffd700;
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    transition: none;
    animation: none;
    transform: none;
}

/* 侧边栏用户信息区 - 紧凑设计 */
.sidebar-user-info {
    padding: 8px 11px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.user-details-mini {
    flex: 1;
    min-width: 0;
}

.user-name-mini {
    color: white;
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-mini {
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
}

/* 退出登录区 - 固定在底部 */
.sidebar-logout {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    padding: 0;
}

.sidebar-logout .nav-item {
    padding: 14px 16px;
}

.sidebar-logout .nav-item:hover {
    background: rgba(231, 76, 60, 0.3);
}

/* 主内容区域 */
.main-content {
    margin-left: 260px;
    flex: 1;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 - 固定不滚动 */
.top-header {
    background: #6a73da;
    padding: 20px 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.top-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info-text {
    text-align: right;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-name {
    font-weight: 500;
    color: white;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.logout-btn {
    padding: 8px 16px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* 内容区域 */
.content-area {
    padding: 30px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    /* 移除了下边阴影 */
    box-shadow: none;
    margin-bottom: 25px;
    width: 1200px;
    min-width: 1200px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 智能排班页面例外 - 使用自己的宽度策略 */
.schedule-container {
    width: 1380px !important;
    min-width: 1380px !important;
    max-width: 1380px !important;
}

.schedule-container .card,
.schedule-container.card {
    width: 1380px !important;
    min-width: 1380px !important;
    max-width: 1380px !important;
}

/* 智能排班页面全宽模式 */
.schedule-container.full-width,
.schedule-container.full-width .card,
.schedule-container.full-width.card {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    /* 移除了蓝色线条 */
    border-bottom: none;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.stat-card.primary {
    background: rgba(102, 126, 234, 0.08);
}

.stat-card.success {
    background: rgba(39, 174, 96, 0.08);
}

.stat-card.warning {
    background: rgba(243, 156, 18, 0.08);
}

.stat-card.danger {
    background: rgba(231, 76, 60, 0.08);
}

.stat-card.secondary {
    background: rgba(149, 165, 166, 0.08);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0s ease;
    font-size: 14px;
    min-width: auto;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-info,
a.btn-info {
    background-color: #3498db !important;
    color: white !important;
    text-decoration: none;
}

.btn-info:hover,
a.btn-info:hover {
    background-color: #2980b9 !important;
    color: white !important;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-outline {
    background-color: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background-color: #667eea;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    min-width: auto;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.table {
    width: 100%;
    background: white;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border: none;
}

.table th {
    background-color: transparent;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tr:hover {
    background-color: #f8f9fa;
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0s ease;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* 状态徽章 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-primary {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 警告提示 */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: #27ae60;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: #f39c12;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: #e74c3c;
    color: #721c24;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.alert-error {
    background-color: #f8d7da;
    border-left-color: #e74c3c;
    color: #721c24;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2c3e50;
}

.pagination a:hover {
    background-color: #f8f9fa;
}

.pagination .current {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        padding: 20px 15px;
    }
    
    .table-container {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
}

/* 禁用所有transition动画 */
.no-transition {
    transition: none !important;
}

/* 确保所有元素都不会有动画效果 */
* {
    transition: none !important;
    animation: none !important;
}