* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100vw; /* 限制最大宽度为视口宽度 */
    overflow-x: hidden; /* 防止水平滚动 */
    font-size: 16px; /* 基础字体大小 */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.6;
    position: relative;
    margin: 0;
    padding: 0;
    font-size: 1.1rem; /* 增大基础字体大小 */
}

/* 增大所有文本元素 */
p, span, div, td, th, li {
    font-size: 1.1rem;
}

/* 表单标签 - 粗体且更大 */
.form-label, label {
    font-weight: 700 !important; /* 粗体 */
    font-size: 1.15rem !important; /* 更大 */
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

/* 输入框字体 */
.form-control, .form-select, input, select, textarea {
    font-size: 1.1rem !important;
    padding: 0.75rem 1rem !important;
}

/* 按钮字体 */
.btn {
    font-size: 1.1rem !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem !important;
}

/* 表格字体 */
.table th, .table td {
    font-size: 1.05rem !important;
}

.table th {
    font-weight: 700 !important; /* 表头粗体 */
}

/* 标题字体 */
h1 {
    font-size: 2rem !important;
    font-weight: 700;
}

h2 {
    font-size: 1.75rem !important;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem !important;
    font-weight: 700;
}

h4 {
    font-size: 1.35rem !important;
    font-weight: 700;
}

h5 {
    font-size: 1.2rem !important;
    font-weight: 700;
}

h6 {
    font-size: 1.1rem !important;
    font-weight: 700;
}

/* header */
.navbar {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #00d4aa 100%);
    color: #2c3e50;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 0 0 20px 20px;
    position: relative;
    z-index: 1001;
    transition: margin-left 0.3s ease;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    overflow-y: visible; /* 允许下拉菜单溢出 */
}

/* 当侧边栏打开时，header 向右移动 */
/* 桌面端 navbar 默认内缩 */
body.sidebar-open .navbar {
    margin-left: 260px;
    width: calc(100% - 260px); /* 减去 sidebar 的宽度，避免超出视口 */
}

/* 桌面端默认内缩 navbar - 只在大于1024px时生效 */
@media (min-width: 1025px) {
    .navbar {
        margin-left: 260px;
        width: calc(100% - 260px); /* 减去 sidebar 的宽度，避免超出视口 */
        transition: margin-left 0.3s ease;
    }
}

/* iPad 和手机：navbar 不内缩 */
@media (max-width: 1024px) {
    .navbar {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    position: relative; /* 确保定位上下文正确 */
    overflow: visible; /* 允许下拉菜单溢出 */
    flex-wrap: nowrap; /* 防止换行 */
    z-index: 10001; /* 确保容器在最上层 */
}

.sidebar-toggle {
    display: none; /* 桌面端默认隐藏 */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #1a1a1a;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-brand a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1.75rem !important; /* 增大导航栏字体 */
    font-weight: 700 !important; /* 粗体 */
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: relative; /* 确保定位上下文正确 */
    overflow: visible; /* 允许下拉菜单溢出 */
    z-index: 10001; /* 确保菜单区域在最上层 */
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #1a1a1a;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-menu a i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.nav-menu a {
    color: #1a1a1a;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #000000;
}

/* 桌面版隐藏导航菜单项（侧边栏已包含） */
.nav-menu-item-mobile {
    display: none;
}

/* 用户菜单 */
.user-menu {
    position: relative; /* 为下拉菜单提供定位上下文 */
    margin-left: 1rem;
    z-index: 10002; /* 确保菜单在最上层 */
}

.user-menu-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #fb50fb 0%, #ff5af4 50%, #fe54a7 100%);
    border: 2px solid rgba(248, 77, 185, 0.3);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s;
    color: #1a1a1a;
    font-weight: 500;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00d4aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.avatar-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.user-avatar:hover .avatar-upload-overlay {
    opacity: 1;
}

.avatar-upload-overlay i {
    color: white;
    font-size: 1.1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 1.1rem !important; /* 增大用户名称字体 */
    font-weight: 700 !important; /* 粗体 */
}

.user-job-title {
    font-size: 0.85rem !important;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.1rem;
}

.user-menu-toggle .fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.user-menu-toggle.active .fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown {
    position: fixed; /* 使用fixed定位，不受父容器overflow影响 */
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 220px;
    display: none;
    z-index: 99999 !important; /* 使用非常高的z-index，确保在最上层 */
    overflow: hidden; /* 防止内容溢出 */
    /* top 和 right 由 JavaScript 动态设置 */
}

.user-dropdown.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #00d4aa 100%);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1003; /* 确保在dropdown内容之上 */
    border-radius: 16px 16px 0 0; /* 顶部圆角，与dropdown匹配 */
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.user-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-large:hover {
    transform: scale(1.05);
}

.avatar-upload-overlay-large {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.user-avatar-large:hover .avatar-upload-overlay-large {
    opacity: 1;
}

.avatar-upload-overlay-large i {
    color: white;
    font-size: 1.8rem;
}

.user-details {
    flex: 1;
    color: white;
}

.user-name-large {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-job-title-large {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.85rem;
    opacity: 0.9;
    text-transform: capitalize;
}

.user-dropdown-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #1a1a1a;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #7f8c8d;
}

.dropdown-item-danger {
    color: #e74c3c;
}

.dropdown-item-danger:hover {
    background: #fee;
    color: #c0392b;
}

.dropdown-item-danger i {
    color: #e74c3c;
}

/* 主布局 */
.main-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; /* 桌面端默认显示 */
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: left 0.3s ease;
}

.sidebar.active {
    left: 0;
}

/* 桌面端：当侧边栏被关闭时，隐藏它 */
@media (min-width: 1025px) {
    /* 桌面端默认显示侧边栏（有 .active 类时） */
    .sidebar.active {
        left: 0;
    }
    
    /* 桌面端关闭时隐藏侧边栏 */
    .sidebar:not(.active) {
        left: -260px;
    }
    
    /* 桌面端显示切换按钮，以便重新打开 */
    .sidebar-toggle {
        display: flex !important;
    }
    
    /* 当侧边栏打开时，主内容区域内缩 */
    body.sidebar-open .main-content {
        margin-left: 260px !important;
    }
    
    body.sidebar-open .navbar {
        width: calc(100% - 260px) !important;
        margin-left: 260px !important;
    }
    
    /* 当侧边栏关闭时，主内容区域不内缩 */
    body:not(.sidebar-open) .main-content {
        margin-left: 0 !important;
    }
    
    body:not(.sidebar-open) .navbar {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

/* 中等屏幕尺寸时，侧边栏默认隐藏，可通过按钮切换 */
@media (max-width: 1024px) {
    .sidebar {
        left: -260px; /* 默认隐藏 */
        z-index: 10002 !important; /* 确保在header之上 */
        top: 0 !important; /* 从最顶部开始 */
    }
    
    .sidebar.active {
        left: 0; /* 激活时显示 */
        z-index: 10002 !important; /* 确保在header之上 */
    }
    
    /* 显示侧边栏切换按钮 */
    .sidebar-toggle {
        display: flex !important;
    }
    
    /* 主内容区域不内缩 */
    .main-content {
        margin-left: 0 !important;
    }
    
    body.sidebar-open .main-content {
        margin-left: 0 !important;
    }
    
    /* 导航栏不移动 */
    body.sidebar-open .navbar {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        z-index: 10001 !important; /* 确保header在sidebar之下 */
    }
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-close {
    background: none;
    border: none;
    color: #7f8c8d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-close:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

/*logo跟仙杜瑞拉的位子*/
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0; /* 移除gap */
    color: #2c3e50;
}

.sidebar-logo .witch-icon {
    margin-right: -0.2rem; /* 使用负margin让图标和文字更贴近，甚至重叠 */
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-logo-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #1a4d7a; /* 深蓝色 */
    line-height: 1.2;
}

.sidebar-logo-slogan {
    font-size: 0.85rem;
    font-weight: normal;
    color: #4a7ba7; /* 比深蓝色浅一点的蓝色 */
    line-height: 1.2;
    font-style: italic;
    font-family: 'Comic Sans MS', 'Microsoft YaHei', '微软雅黑', 'Arial', sans-serif; /* 可爱字体 */
}

.sidebar-logo i {
    color: #4facfe;
    font-size: 1.5rem;
}

.witch-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
}

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

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-item:hover {
    background-color: #f8f9fa;
    border-left-color: #4facfe;
    color: #4facfe;
}

.sidebar-item {
    font-size: 1.1rem !important; /* 增大侧边栏字体 */
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    font-size: 1.2rem !important; /* 增大图标 */
}

.sidebar-item.active {
    background-color: #e8f4f8;
    border-left-color: #00d4aa;
    color: #00d4aa;
    font-weight: 600;
}

.sidebar-item-danger {
    color: #e74c3c;
}

.sidebar-item-danger:hover {
    background-color: #fee;
    border-left-color: #e74c3c;
    color: #c0392b;
}

.sidebar-divider {
    height: 1px;
    background: #ecf0f1;
    margin: 0.5rem 1.5rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #ecf0f1;
    background: #f8f9fa;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4facfe 0%, #00d4aa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 700 !important; /* 粗体 */
    color: #2c3e50;
    font-size: 1.1rem !important; /* 增大字体 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-transform: capitalize;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    margin-left: 260px; /* 桌面端默认内缩，为 sidebar 留出空间 */
    min-height: calc(100vh - 80px);
    background: transparent; /* 移除背景色，使用 body 的白色背景 */
    transition: margin-left 0.3s ease;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.sidebar.active ~ .main-content {
    margin-left: 260px;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    animation: fadeIn 0.5s ease-in;
    width: 100%;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录页面 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #8f6bd6 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.login-box h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-box h2 {
    color: #7f8c8d;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: normal;
}

.login-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 表单 */
.form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
    animation: fadeIn 0.5s ease-in;
}

.form-container h1 {
    color: #2c4e50;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-container h1 i {
    color: #66eadf;
    font-size: 1.5rem;
}

.form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700 !important; /* 粗体 */
    font-size: 1.15rem !important; /* 更大 */
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #2c3e50;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b8c5d1;
}

.form-group textarea {
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    cursor: pointer;
}

.checkbox-label span {
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* 按钮 */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn i {
    font-size: 0.9rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.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-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-cute-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-cute-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
}

.btn-cute-view {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.25);
    text-decoration: none;
}

.btn-cute-view:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.35);
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    color: white;
    text-decoration: none;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.page-header h1 {
    color: #2c3e50;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i {
    color: #3498db;
    font-size: 1.5rem;
}

/* 仪表板 */
.dashboard {
    padding-bottom: 2rem;
}

.welcome-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #d47fb0 0%, #a575c4 50%, #8f6bd6 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 24px rgba(212, 127, 176, 0.5);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.welcome-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.stat-card-handover::before {
    background: linear-gradient(180deg, #3498db 0%, #2980b9 100%);
}

.stat-card-appointment::before {
    background: linear-gradient(180deg, #27ae60 0%, #229954 100%);
}

.stat-card-assignment::before {
    background: linear-gradient(180deg, #f39c12 0%, #e67e22 100%);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.stat-card-handover .stat-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.stat-card-appointment .stat-icon {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.stat-card-assignment .stat-icon {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.stat-content {
    flex: 1;
}

.stat-card h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0.5rem 0;
}

.stat-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    transition: all 0.3s;
}

.stat-link:hover {
    color: #764ba2;
    gap: 0.5rem;
}

.stat-card-small {
    text-align: center;
    flex-direction: column;
    padding: 1.5rem;
}

.stat-card-small::before {
    width: 100%;
    height: 4px;
    top: 0;
}

.stat-icon-small {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card-small h4 {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-card-small .stat-number {
    font-size: 2rem;
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* 当天工作清单样式 */
.today-assignments-section {
    margin-bottom: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.today-assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.today-assignment-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
    position: relative;
}

.assignment-employee-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
    white-space: nowrap;
    max-width: calc(100% - 2rem);
    overflow: hidden;
    text-overflow: ellipsis;
}

.assignment-employee-badge i {
    font-size: 0.75rem;
    margin-right: 0.3rem;
}

.today-assignment-card.clickable-card {
    cursor: pointer;
}

.today-assignment-card.clickable-card:hover {
    transform: translateX(8px) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    border-left-width: 6px;
}

.today-assignment-card.clickable-card:active {
    transform: translateX(5px) translateY(0);
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.today-assignment-card[data-time-period="morning"] {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbf0 0%, #fef3c7 100%);
}

.today-assignment-card[data-time-period="afternoon"] {
    border-left-color: #06b6d4;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.today-assignment-card[data-time-period="evening"] {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, #f8f4ff 0%, #f3e8ff 100%);
}

.assignment-time-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.time-period-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

.time-period-badge.time-period-morning {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
}

.time-period-badge.time-period-afternoon {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.time-period-badge.time-period-evening {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.time-range {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.assignment-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.detail-item i {
    color: #6c757d;
    width: 20px;
    text-align: center;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

.detail-value {
    color: #2c3e50;
    flex: 1;
}

.view-detail-hint {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.today-assignment-card.clickable-card:hover .view-detail-hint {
    color: #5568d3;
    transform: translateX(5px);
}

.today-assignment-card.clickable-card:hover .view-detail-hint i {
    transform: translateX(3px);
    transition: transform 0.3s ease;
}

.section-header i {
    font-size: 1.5rem;
    color: #667eea;
}

.section-header h2,
.section-header h3 {
    color: #2c3e50;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-stats h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.recent-items {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item-list {
    margin-bottom: 1.5rem;
}

.item-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.item-card:hover {
    background: #fff;
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.item-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.item-content {
    flex: 1;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.item-card h4 {
    margin-bottom: 0.5rem;
}

.item-card h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.item-card h4 a:hover {
    color: #3498db;
}

.item-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 表格 */
.table-container {
    background: white;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

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

.data-table th,
.data-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid #f0f2f5;
    white-space: nowrap; /* 桌面端不换行 */
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.data-table th:first-child {
    border-top-left-radius: 16px;
    padding-left: 1.5rem;
}

.data-table th:last-child {
    border-top-right-radius: 16px;
    padding-right: 1.5rem;
}

.data-table td:first-child {
    padding-left: 1.5rem;
}

.data-table td:last-child {
    padding-right: 1.5rem;
}

.data-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th i {
    margin-right: 0.5rem;
    opacity: 0.9;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.data-table a:hover {
    color: #764ba2;
    text-decoration: none;
}

.assignment-title-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.assignment-title-link:hover {
    color: #764ba2;
    text-decoration: none;
}

.assignment-title-link i {
    opacity: 0.7;
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

/* 徽章 */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 1rem !important; /* 增大徽章字体 */
    font-weight: 700 !important; /* 粗体 */
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.badge i {
    font-size: 0.75rem;
}

.badge-pending {
    background: linear-gradient(135deg, #ffd89b 0%, #ff9a56 100%);
    color: #8b4513;
}

.badge-in_progress {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-completed {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    color: #0d5d2e;
}

.badge-confirmed {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #6b2c5e;
}

.badge-cancelled {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #8b1538;
}

.badge-company {
    background: linear-gradient(135deg, #a8caba 0%, #5d4e75 100%);
    color: white;
}

.badge-cleaning {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    color: #5a3d5c;
}

.badge-time {
    background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%);
    color: #6b4c5a;
}

.badge-low {
    background-color: #95a5a6;
    color: white;
}

.badge-normal {
    background-color: #3498db;
    color: white;
}

.badge-high {
    background-color: #f39c12;
    color: white;
}

.badge-urgent {
    background-color: #e74c3c;
    color: white;
}

/* 详情页面 */
.detail-container {
    background: #fffef0;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #ffeaa7;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ffeaa7;
}

.detail-header h1 {
    color: #2c3e50;
}

.detail-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.detail-info {
    margin-bottom: 2rem;
}

.info-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ffeaa7;
}

.info-label {
    font-weight: 700 !important; /* 粗体 */
    font-size: 1.1rem !important; /* 更大 */
    color: #7f8c8d;
    width: 150px;
    flex-shrink: 0;
}

.info-value {
    color: #2c3e50;
}

.detail-content {
    margin-top: 2rem;
}

.detail-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.content-box {
    background: #fffef0;
    padding: 1.5rem;
    border-radius: 16px;
    white-space: pre-wrap;
    line-height: 1.8;
    border: 1px solid #ffeaa7;
}

/* 回复区域样式 */
.detail-replies {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #ffeaa7;
}

.detail-replies h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.detail-replies h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.replies-list {
    margin-bottom: 2rem;
}

.reply-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 0.75rem;
}

.reply-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.reply-avatar .avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
}

.reply-avatar .avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 1.25rem;
}

.reply-content-wrapper {
    flex: 1;
    background: #fff9e6;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-width: 0;
    border: 1px solid #ffeaa7;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.reply-author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.reply-author {
    font-weight: 600;
    color: #0066cc;
    font-size: 0.95rem;
}

.reply-job-title {
    color: #666;
    font-size: 0.85rem;
    font-weight: normal;
}

.reply-time {
    color: #999;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.reply-content {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.reply-form {
    background: #fffef0;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #ffeaa7;
}

.reply-form textarea {
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    resize: vertical;
    background: #ffffff;
}

.reply-form textarea:focus {
    border-color: #fdcb6e;
    box-shadow: 0 0 0 0.2rem rgba(253, 203, 110, 0.25);
    background: #ffffff;
}

.reply-form .btn-primary {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.reply-form .btn-primary:hover {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* 金额和日期信息样式 */
.amount-date-info {
    background: #fffef0;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #ffeaa7;
    margin-bottom: 1.5rem;
}

.amount-date-info .info-label {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    width: auto;
    margin-right: 0.5rem;
}

.amount-date-info .info-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
}

.amount-date-info .info-value.text-success {
    color: #28a745 !important;
}

/* 消息提示 */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #4facfe 0%, #00f2fe 50%, #00d4aa 100%);
        flex-direction: column;
        width: 100%;
        padding: 1rem;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        display: none;
        gap: 0.5rem;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        width: 100%;
        padding: 0.75rem 1rem;
        text-align: left;
        border-radius: 12px;
    }
    
    /* 移动端显示导航菜单项 */
    .nav-menu-item-mobile {
        display: block;
    }
    
    .nav-menu .user-info {
        width: 100%;
        padding: 0.75rem 1rem;
        text-align: left;
        display: block;
    }
    
    /* 手机版容器减少上边距 */
    .container {
        margin-top: 0.5rem !important;
        margin-bottom: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* 移动端用户菜单 */
    .user-menu {
        width: 100%;
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .user-menu-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .user-dropdown {
        position: static;
        width: 100%;
        margin-top: 0.5rem;
        border-radius: 12px;
    }
    
    /* 移动端侧边栏可以显示（通过 active 类控制） */
    .sidebar {
        display: flex; /* 允许显示 */
        width: 280px; /* 手机端稍微宽一点 */
        left: -280px; /* 移动端默认隐藏 */
        z-index: 10002 !important; /* 确保在header之上 */
        top: 0 !important; /* 从最顶部开始 */
    }
    
    .sidebar.active {
        left: 0; /* 移动端激活时显示 */
        z-index: 10002 !important; /* 确保在header之上 */
    }
    
    /* 移动端 header 不移动 */
    body.sidebar-open .navbar {
        margin-left: 0;
        width: 100%;
        z-index: 10001 !important; /* 确保header在sidebar之下 */
    }
    
    /* 移动端显示侧边栏切换按钮 */
    .sidebar-toggle {
        display: flex !important;
    }
    
    /* 移动端主内容区域不内缩 */
    .main-content {
        margin-left: 0 !important;
    }
    
    body.sidebar-open .main-content {
        margin-left: 0 !important;
    }
    
    .main-content {
        margin-left: 0; /* 移动端不内缩 */
    }
    
    /* 移动端 navbar 不内缩 */
    .navbar {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .nav-container {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    .nav-brand {
        flex: 1;
        min-width: 0;
    }
    
    .nav-brand a {
        font-size: 1.3rem !important; /* 移动端稍微减小字体 */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .container {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .detail-actions {
        width: 100%;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    /* 手机端防止页面溢出 */
    html, body {
        overflow-x: hidden !important; /* 手机端防止水平滚动 */
        max-width: 100vw !important; /* 限制最大宽度 */
        width: 100% !important;
    }
    
    /* 手机端表格样式 */
    .table-container {
        padding: 0.5rem;
        overflow-x: auto; /* 只让表格容器内部可以横向滚动 */
        -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
        width: 100%; /* 确保容器宽度不超过父元素 */
        max-width: 100%; /* 防止溢出 */
        margin: 0; /* 移除可能的外边距 */
        box-sizing: border-box;
    }
    
    .data-table {
        min-width: 800px; /* 表格本身可以很宽，但被容器限制 */
        width: auto; /* 让表格根据内容自动调整宽度 */
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.4rem; /* 手机端减小内边距 */
        font-size: 0.85rem; /* 手机端稍微缩小字体 */
    }
    
    /* 确保主内容区域不会溢出 */
    .main-content {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important; /* 防止主内容区域溢出 */
        box-sizing: border-box;
    }
    
    /* 确保容器不会溢出 */
    .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 1rem; /* 手机端减小内边距 */
        overflow-x: hidden !important; /* 防止容器溢出 */
        box-sizing: border-box;
    }
    
    /* 确保navbar不会溢出 */
    .navbar {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    .nav-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 1rem;
        box-sizing: border-box;
    }
    
    /* 确保page-header不会溢出 */
    .page-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        padding: 1rem !important;
    }
}

/* 創建派單頁面 - 亮黃色系 */
.create-assignment-card {
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 30%, #fff59d 60%, #fff176 100%);
    border: 1px solid rgba(255, 235, 59, 0.4);
}

.create-assignment-header {
    background: linear-gradient(135deg, #fff176 0%, #ffeb3b 40%, #fdd835 70%, #fbc02d 100%);
    border: none;
}

.create-assignment-header h4 {
    color: #f57f17;
    font-weight: 700;
}

.create-assignment-body {
    background: linear-gradient(135deg, #fffef5 0%, #fffde7 50%, #fff9c4 100%);
}

/* 创建派单表单样式 - 亮黄色系 */
#assignmentForm .form-control,
#assignmentForm .form-select {
    background-color: #ffffff;
    border: 2px solid #fff59d;
}

#assignmentForm .form-control:focus,
#assignmentForm .form-select:focus {
    background-color: #ffffff;
    border-color: #ffeb3b;
    box-shadow: 0 0 0 0.25rem rgba(255, 235, 59, 0.3);
}

#assignmentForm .btn-primary {
    background: linear-gradient(135deg, #fff176 0%, #ffeb3b 50%, #fdd835 100%);
    border: 2px solid #fbc02d;
    color: #f57f17;
    font-weight: 700;
}

#assignmentForm .btn-primary:hover {
    background: linear-gradient(135deg, #ffeb3b 0%, #fdd835 50%, #fbc02d 100%);
    color: #e65100;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.5);
}

/* 多选下拉菜单 - 亮黄色主题 */
.multiselect-wrapper {
    position: relative;
    width: 100%;
}

.multiselect-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1050 !important;
    background-color: #ffffff !important;
    border: 2px solid #fff59d !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    margin-top: 0.25rem !important;
}

.multiselect-option {
    padding: 0.75rem 1rem !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.multiselect-option:hover {
    background-color: #fff9c4 !important;
}

.multiselect-option.bg-primary {
    background-color: #ffeb3b !important;
    color: #f57f17 !important;
}

.multiselect-option.bg-primary:hover {
    background-color: #fdd835 !important;
}

.multiselect-wrapper .form-control {
    border: 2px solid #fff59d !important;
    background-color: #ffffff !important;
}

.multiselect-wrapper .form-control:focus {
    border-color: #ffeb3b !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 235, 59, 0.3) !important;
}

/* 工作描述编辑器样式 */
#assignmentFormContainer [ref="descriptionEditor"],
#assignmentFormContainer .ql-container {
    background-color: #ffffff !important;
    border: 2px solid #fff59d !important;
    border-radius: 8px !important;
    min-height: 300px !important;
    display: block !important;
    visibility: visible !important;
}

#assignmentFormContainer .ql-container:focus-within {
    border-color: #ffeb3b !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 235, 59, 0.3) !important;
}

#assignmentFormContainer .ql-toolbar {
    background-color: #fffde7 !important;
    border: 2px solid #fff59d !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0 !important;
    display: flex !important;
    visibility: visible !important;
}

#assignmentFormContainer .ql-editor {
    min-height: 250px !important;
    color: #333 !important;
}

/* 确保工作描述标签和容器可见 */
#assignmentFormContainer label[for="description"] {
    display: block !important;
    visibility: visible !important;
}

#assignmentFormContainer .mb-3:has([ref="descriptionEditor"]) {
    display: block !important;
    visibility: visible !important;
}

/* 公司类别切换标签样式 */
.company-filter-tabs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.company-tab {
    padding: 0.3rem 0.8rem;
    border: 2px solid transparent;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
    color: #666;
}

.company-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.company-tab.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 豆媽标签 - 绿色 */
.company-tab-douma {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    color: #1b5e20;
}

.company-tab-douma.active {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
    color: #1b5e20;
    border-color: #4caf50;
}

/* 神奇美潔标签 - 桃红色 */
.company-tab-shenqi {
    background: linear-gradient(135deg, #f8bbd0 0%, #f48fb1 100%);
    color: #880e4f;
}

.company-tab-shenqi.active {
    background: linear-gradient(135deg, #f48fb1 0%, #ec407a 100%);
    color: #880e4f;
    border-color: #e91e63;
}

/* 房務部标签 - 黄色 */
.company-tab-fangwu {
    background: linear-gradient(135deg, #fffde7 0%, #fff9c4 100%);
    color: #f57f17;
}

.company-tab-fangwu:hover {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #f57f17;
}

.company-tab-fangwu.active {
    background: linear-gradient(135deg, #fff9c4 0%, #fff176 100%);
    color: #000;
    border-color: #fff176;
}

/* 全部标签 - 天空蓝色 */
.company-tab-all {
    background: linear-gradient(135deg, #81d4fa 0%, #4fc3f7 100%);
    color: #01579b;
}

.company-tab-all.active {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: #01579b;
    border-color: #0288d1;
}

/* 筛选按钮图标样式 */
.btn-filter-icon {
    padding: 0.5rem 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
}

.btn-filter-icon i {
    margin: 0;
}

/* 创建派单按钮 - 亮黄色 */
.btn-create-assignment {
    background: linear-gradient(135deg, #fff176 0%, #ffeb3b 100%);
    color: #f57f17;
    border: 2px solid #fbc02d;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-create-assignment:hover {
    background: linear-gradient(135deg, #ffeb3b 0%, #fdd835 100%);
    color: #e65100;
    border-color: #f9a825;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.4);
}

.btn-create-assignment:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(255, 235, 59, 0.3);
}

/* 页面底部图腾装饰 */
.page-footer-totem {
    width: 100%;
    padding: 2rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(232, 245, 233, 0.3) 50%, rgba(200, 230, 201, 0.5) 100%);
    margin-top: 3rem;
    border-top: 2px solid rgba(129, 199, 132, 0.2);
}

.totem-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.totem-pattern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    opacity: 0.6;
}

.totem-pattern i {
    font-size: 1.5rem;
    color: #66bb6a;
    animation: totemFloat 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.totem-pattern i:nth-child(1) { animation-delay: 0s; color: #81c784; }
.totem-pattern i:nth-child(2) { animation-delay: 0.3s; color: #a5d6a7; }
.totem-pattern i:nth-child(3) { animation-delay: 0.6s; color: #66bb6a; }
.totem-pattern i:nth-child(4) { animation-delay: 0.9s; color: #4caf50; }
.totem-pattern i:nth-child(5) { animation-delay: 1.2s; color: #81c784; }
.totem-pattern i:nth-child(6) { animation-delay: 1.5s; color: #a5d6a7; }
.totem-pattern i:nth-child(7) { animation-delay: 1.8s; color: #66bb6a; }
.totem-pattern i:nth-child(8) { animation-delay: 2.1s; color: #4caf50; }
.totem-pattern i:nth-child(9) { animation-delay: 2.4s; color: #81c784; }
.totem-pattern i:nth-child(10) { animation-delay: 2.7s; color: #a5d6a7; }

.totem-pattern i:hover {
    transform: scale(1.3) rotate(15deg);
    opacity: 1;
    color: #4caf50;
}

@keyframes totemFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* 移动端调整 */
@media (max-width: 768px) {
    .page-footer-totem {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .totem-pattern {
        gap: 1rem;
    }
    
    .totem-pattern i {
        font-size: 1.2rem;
    }
    
    /* 移动端负责人徽章样式 */
    .assignment-employee-badge {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }
    
    .assignment-employee-badge i {
        font-size: 0.7rem;
        margin-right: 0.25rem;
    }
    
    .today-assignment-card {
        padding: 1.25rem;
    }
}

/* 派单页面美化样式 - 统一绿色主题 */
/* 减少派单页面的上边距 */
.assignments-page {
    margin-top: -1rem; /* 减少上方空白 */
}

.assignments-page .container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-top: 0.5rem; /* 减少顶部内边距 */
}

.assignments-card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.1);
    margin-top: 0;
}

.assignments-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1100px; /* 确保表格有足够宽度显示所有列（包含已读状态列） */
    width: 100%;
}

.assignments-table-header {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 50%, #4caf50 100%);
    color: #000000; /* 黑色文字 */
}

.assignments-table-header th {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: none;
    border: none;
    color: #000000 !important; /* 黑色文字 */
    white-space: nowrap;
}

.assignments-table-header th i {
    opacity: 0.95;
    margin-right: 0.5rem;
}

.assignments-table tbody tr {
    border-bottom: 1px solid #e8f5e9;
    transition: all 0.2s ease;
    background: #ffffff;
}

.assignments-table tbody tr:hover {
    background: linear-gradient(90deg, #f1f8e9 0%, #ffffff 100%);
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.assignments-table tbody tr:last-child {
    border-bottom: none;
}

.assignments-table tbody td {
    padding: 1.25rem 1.5rem;
    vertical-align: middle;
    white-space: nowrap;
    color: #2c3e50 !important; /* 确保文字颜色为深灰色，不是白色 */
}

/* 统一 badge 样式 - 绿色主题 */
.badge-company-custom {
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-decoration: none !important;
}

.badge-company-custom:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* 根据公司名称动态设置颜色 */
.badge-company-custom[data-company="豆媽"] {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    color: #000000 !important; /* 黑色文字 */
}

.badge-company-custom[data-company="神奇美潔"] {
    background: linear-gradient(135deg, #f8bbd0 0%, #f48fb1 100%);
    color: #000000 !important; /* 黑色文字 */
}

.badge-company-custom[data-company="房務部"] {
    background: linear-gradient(135deg, #fff9c4 0%, #fff176 100%);
    color: #000000 !important; /* 黑色文字 */
}

/* 员工名字样式 - 大一点、粗体 */
.employee-name-large {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    transition: color 0.2s ease, opacity 0.2s ease;
    text-decoration: none !important;
}

.employee-name-large:hover {
    color: #007bff !important;
    opacity: 0.8;
}

.assignments-table .employee-name-large {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.assignments-table .employee-name-large:hover {
    color: #007bff !important;
}

.badge-cleaning-custom {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #2e7d32;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-time-custom {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #5d4037;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* 状态 badge - 统一配色 */
.badge-status-pending {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    color: #5d4037;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-status-progress {
    background: linear-gradient(135deg, #90caf9 0%, #64b5f6 100%);
    color: #0d47a1;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-status-completed {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
    color: #1b5e20;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-status-confirmed {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    color: #1b5e20;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-status-cancelled {
    background: linear-gradient(135deg, #ef9a9a 0%, #e57373 100%);
    color: #b71c1c;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-status-default {
    background: linear-gradient(135deg, #bdbdbd 0%, #9e9e9e 100%);
    color: #424242;
    font-weight: 500;
    padding: 0.4rem 0.9rem;
    border-radius: 12px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* 链接和图标样式 */
.assignment-title-link {
    color: #2e7d32;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.assignment-title-link:hover {
    color: #1b5e20;
    text-decoration: underline;
}

.assignment-icon {
    color: #66bb6a;
}

/* 工作日期链接样式 */
.work-date-link {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.work-date-link:hover {
    color: #66bb6a;
    text-decoration: underline;
    transform: translateX(2px);
}

/* 删除按钮样式 */
.btn-danger {
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* 删除按钮特殊样式，防止误按 */
.delete-btn {
    position: relative;
    border: 2px solid #c62828 !important;
    box-shadow: 0 2px 4px rgba(229, 57, 53, 0.3);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
    border-color: #b71c1c !important;
    box-shadow: 0 4px 8px rgba(229, 57, 53, 0.5);
    transform: translateY(-1px);
}

.delete-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(229, 57, 53, 0.3);
}

/* 圆形删除按钮样式 */
.circular-delete-btn {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #c62828 !important;
    background: linear-gradient(135deg, #ef5350 0%, #e53935 100%) !important;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.4) !important;
}

.circular-delete-btn i {
    font-size: 1.1rem;
    margin: 0 !important;
}

.circular-delete-btn:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
    border-color: #b71c1c !important;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.6) !important;
    transform: translateY(-2px) scale(1.05);
}

.circular-delete-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(229, 57, 53, 0.4) !important;
}

/* 未读标记样式 */
.unread-badge {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #0066cc;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 28px;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.4);
}

.unread-badge-stat {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #0066cc;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 32px;
    box-shadow: 0 3px 8px rgba(0, 102, 204, 0.5);
    border: 2px solid white;
    z-index: 10;
}

.stat-icon {
    position: relative;
}

/* 可点击的图标样式 */
.stat-icon-clickable {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stat-icon-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-icon-clickable:active {
    transform: scale(0.98);
}

/* 已读/未读状态徽章 */
.badge-read-status {
    background: #28a745;
    color: white;
    padding: 0.35rem 0.7rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-unread-status {
    background: #0066cc;
    color: white;
    padding: 0.35rem 0.7rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* 小尺寸已读/未读状态徽章（用于派单详情页） */
.badge-read-status-small {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.badge-unread-status-small {
    background: #0066cc;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* 超小尺寸已读/未读状态徽章（用于派单列表） */
.badge-read-status-tiny {
    background: #28a745 !important;
    color: white !important;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.3rem;
    white-space: nowrap;
}

.badge-read-status-tiny,
.badge-read-status-tiny *,
.badge-read-status-tiny i,
.badge-read-status-tiny span,
.assignments-table tbody td .badge-read-status-tiny,
.assignments-table tbody td .badge-read-status-tiny *,
.assignments-table tbody td .badge-read-status-tiny i,
.assignments-table tbody td .badge-read-status-tiny span {
    color: white !important;
}

.badge-unread-status-tiny {
    background: #0066cc !important;
    color: white !important;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.3rem;
    white-space: nowrap;
}

.badge-unread-status-tiny,
.badge-unread-status-tiny *,
.badge-unread-status-tiny i,
.badge-unread-status-tiny span,
.assignments-table tbody td .badge-unread-status-tiny,
.assignments-table tbody td .badge-unread-status-tiny *,
.assignments-table tbody td .badge-unread-status-tiny i,
.assignments-table tbody td .badge-unread-status-tiny span {
    color: white !important;
}

/* 负责人状态列表样式 */
.employee-list-with-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.employee-status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.read-time-small {
    font-size: 0.7rem;
    color: #6c757d;
    margin-left: 0.3rem;
}

/* 已读状态列表样式 */
.read-status-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.read-status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.read-status-name {
    font-weight: 500;
    color: #2c3e50;
    min-width: 80px;
}

.btn-danger.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 8px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

/* 删除按钮图标样式 - 白色Bootstrap图标 */
.btn-delete-icon {
    padding: 0.4rem 0.5rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.btn-delete-icon i,
.btn-delete-icon .bi {
    color: white !important;
    font-size: 1rem;
    line-height: 1;
}

.btn-delete-icon:hover i,
.btn-delete-icon:hover .bi {
    color: white !important;
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(229, 57, 53, 0.2);
}

/* 查看按钮样式 */
.btn-view-custom {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}

.btn-view-custom.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.btn-view-custom:hover {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #1b5e20;
    border-color: #81c784;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
    text-decoration: none;
}

/* 页面标题和按钮 */
.assignments-card + .card {
    margin-top: 2rem;
}

/* 创建派单按钮 */
.btn-primary {
    background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    color: white;
}

/* 派单页面移动端响应式样式 */
@media (max-width: 768px) {
    /* 派单页面头部区域 - 手机版 */
    .assignments-page {
        margin-top: 0.5rem; /* 增加上边距，避免被 navbar 覆盖 */
        padding: 0 0.5rem;
        padding-top: 0.5rem; /* 减少顶部内边距 */
    }
    
    .assignments-page .container {
        margin-top: 0 !important;
        margin-bottom: 1rem;
        padding-top: 0.25rem !important; /* 减少容器顶部内边距 */
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .assignments-page .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem; /* 减少间距 */
        margin-bottom: 0.5rem !important; /* 减少下边距 */
        width: 100%;
        padding: 0;
        margin-top: 0 !important; /* 使用容器的 padding */
        position: relative;
        z-index: 10; /* 提高层级 */
        min-height: auto; /* 移除最小高度限制 */
    }
    
    .assignments-page h1 {
        font-size: 1.1rem; /* 稍微减小字体 */
        margin-bottom: 0;
        width: 100%;
        margin-top: 0;
        padding-top: 0.25rem; /* 减少标题顶部内边距 */
        padding-bottom: 0; /* 移除底部内边距 */
        display: block !important; /* 确保显示 */
        visibility: visible !important; /* 确保可见 */
        opacity: 1 !important; /* 确保不透明 */
        color: #2c3e50 !important; /* 确保文字颜色可见 */
        font-weight: 600;
        position: relative;
        z-index: 10; /* 确保标题在最上层 */
        line-height: 1.3; /* 减少行高 */
    }
    
    .assignments-page h1 .text-primary {
        color: #007bff !important; /* 确保图标颜色可见 */
    }
    
    .assignments-page h1 i {
        display: inline-block !important; /* 确保图标显示 */
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 调整布局为垂直排列，标签在按钮下方 */
    .assignments-page .d-flex.flex-column.align-items-end {
        width: 100%;
        align-items: flex-end !important;
    }
    
    .assignments-page .d-flex.align-items-center.gap-3 {
        flex-direction: row; /* 按钮行水平排列 */
        width: 100%;
        gap: 0.5rem !important;
        align-items: center !important;
        flex-wrap: nowrap;
        justify-content: flex-end; /* 右对齐 */
    }
    
    /* 公司筛选标签 - 手机版 */
    .company-filter-tabs {
        display: flex;
        justify-content: flex-end;
        gap: 0.3rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
        width: 100%;
    }
    
    .company-tab {
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* 创建派单按钮 - 手机版 */
    .btn-create-assignment {
        flex-shrink: 0; /* 不允许缩小 */
        padding: 0.5rem 0.9rem;
        font-size: 0.75rem;
        white-space: nowrap;
        min-width: fit-content;
    }
    
    .btn-create-assignment i {
        margin-right: 0.3rem;
        font-size: 0.7rem;
    }
    
    .assignments-card {
        border-radius: 12px;
        margin: 0;
        box-shadow: 0 2px 10px rgba(76, 175, 80, 0.08);
    }
    
    .assignments-card .card-body {
        padding: 0;
    }
    
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .assignments-table {
        min-width: 1100px; /* 确保表格有足够宽度，允许横向滚动（包含已读状态列） */
        width: 100%;
    }
    
    .assignments-table-header th {
        padding: 0.875rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        color: #000000 !important; /* 手机版也确保是黑色 */
    }
    
    .assignments-table tbody td {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
        color: #2c3e50 !important; /* 确保文字颜色为深灰色，不是白色 */
    }
    
    .assignments-table tbody td * {
        color: #2c3e50 !important; /* 确保所有子元素文字颜色为深灰色 */
    }
    
    /* 移动端确保徽章文字为白色 */
    .assignments-table tbody td .badge-read-status-tiny,
    .assignments-table tbody td .badge-read-status-tiny *,
    .assignments-table tbody td .badge-read-status-tiny i,
    .assignments-table tbody td .badge-read-status-tiny span,
    .assignments-table tbody td .badge-unread-status-tiny,
    .assignments-table tbody td .badge-unread-status-tiny *,
    .assignments-table tbody td .badge-unread-status-tiny i,
    .assignments-table tbody td .badge-unread-status-tiny span {
        color: white !important;
    }
    
    .assignments-table tbody td a {
        color: #2c3e50 !important; /* 确保链接文字颜色为深灰色 */
    }
    
    .assignments-table tbody td .text-muted {
        color: #6c757d !important; /* 确保 muted 文字颜色可见 */
    }
    
    .badge-company-custom,
    .badge-cleaning-custom,
    .badge-time-custom,
    .badge-status-pending,
    .badge-status-progress,
    .badge-status-completed,
    .badge-status-confirmed,
    .badge-status-cancelled,
    .badge-status-default {
        padding: 0.3rem 0.7rem;
        font-size: 0.8rem;
    }
    
    .btn-view-custom {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
}

