/* =======================================
   CSS变量定义 - 全局样式配置
   ======================================= */
:root {
    --primary-color: #1E3A8A;      /* 主题主色调 - 左侧导航深蓝色 */
    --primary-light: #2D5A87;      /* 主题辅助色 - 左侧导航浅蓝色 */
    --success-color: #67c23a;      /* 成功状态色 - 绿色 */
    --warning-color: #e6a23c;      /* 警告状态色 - 黄色 */
    --danger-color: #f56c6c;       /* 危险状态色 - 红色 */
    --info-color: #909399;         /* 信息状态色 - 灰色 */
    --bg-color: #f5f7fa;           /* 页面背景色 - 浅灰色 */
    --border-color: #dcdfe6;       /* 边框颜色 - 中灰色 */
    --text-color: #303133;         /* 主要文本色 - 深灰色 */
    --text-light: #606266;         /* 次要文本色 - 中灰色 */
    --text-lighter: #909399;       /* 辅助文本色 - 浅灰色 */
    --white: #ffffff;              /* 白色 */
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.05); /* 更柔和的阴影 */
    --border-radius: 8px;          /* 优化圆角大小，更现代 */
    --transition: all 0.3s ease;   /* 默认过渡动画 */
    --sidebar-width: 180px;        /* 侧边栏默认宽度 */
    --sidebar-collapsed-width: 60px; /* 侧边栏折叠宽度 */
    --item-sidebar-width: 150px;  /* 项目侧边栏宽度（工艺管理等） */
    --edit-sidebar-width: 185px;   /* 编辑页面侧边栏宽度 */
    --sidebar-gradient: linear-gradient(180deg, var(--primary-color) 50%, var(--primary-light) 100%); /* 侧边栏渐变 */
}

/* =======================================
   主题皮肤 - 蓝色主题（默认）
   ======================================= */
body.theme-blue {
    --primary-color: #409eff;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f0f2f5;
    --sidebar-active: #ecf5ff;
}

/* =======================================
   主题皮肤 - 紫色主题
   ======================================= */
body.theme-purple {
    --primary-color: #909399;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f5f0ff;
    --sidebar-active: #f0e6ff;
}

/* =======================================
   主题皮肤 - 绿色主题
   ======================================= */
body.theme-green {
    --primary-color: #67c23a;
    --sidebar-bg: #ffffff;
    --sidebar-hover: #f0fff5;
    --sidebar-active: #e6fff0;
}

/* =======================================
   全局样式重置
   ======================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* 使用border-box盒模型，确保元素尺寸计算准确 */
}

/* =======================================
   页面基础样式
   ======================================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; /* 系统默认无衬线字体，提高性能和可读性 */
    background-color: var(--bg-color); /* 使用全局背景色变量 */
    color: var(--text-color); /* 使用全局文本色变量 */
    line-height: 1.6; /* 舒适的行高，提高可读性 */
}

/* =======================================
   应用容器布局
   ======================================= */
.app-container {
    display: flex;
    flex-direction: column; /* 垂直方向布局 */
    min-height: 100vh; /* 确保容器至少占满整个视口高度 */
}

/* =======================================
   头部导航栏样式
   ======================================= */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.item-top-rith-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.logo {
    font-size: 20px;
    font-weight: 600; /* 粗体显示 */
    color: var(--primary-color); /* 使用主题主色调 */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px; /* 元素间距 */
    padding-left: 10px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px; /* 元素间距 */
    justify-content: flex-end;
}

.home-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

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

.user-info {
    color: var(--text-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success-color);
    display: inline-block;
}

.status-dot.active {
    background-color: var(--success-color);
}

.notification-bell,
.user-avatar {
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.notification-bell:hover,
.user-avatar:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.logout-btn {
    padding: 6px 12px;
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    color: white;
}

/* Main Content Layout */
.header {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

/* 主内容区域 - 默认样式（带顶部header） */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: calc(100vh - 64px);
    overflow: hidden;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

/* 主内容区域 - 项目页面样式（工艺管理等，无顶部header） */
.main-content.project-page {
    margin-left: var(--item-sidebar-width);
    margin-top: 0;
    min-height: 100vh;
}

/* 主内容区域 - 编辑页面样式（打样单、工艺单编辑等） */
.main-content.edit-page {
    margin-left: var(--edit-sidebar-width);
    margin-top: 0;
    min-height: 100vh;
    background: #f8fafc;
}

/* 编辑页面内容区域样式 */
.edit-page .sample-edit-content,
.edit-page .content-body {
    padding-left: 10px;
}

/* 项目侧边栏样式（工艺管理等） */
.item-sidebar {
    width: var(--item-sidebar-width);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #303133;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
    margin-top: 0;
}

/* 编辑页面侧边栏样式（打样单、工艺单编辑等） */
.edit-page .item-sidebar {
    z-index: 9999;
    background: #ffffff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* Content Area */
.content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    max-width: 100%;
}

/* 侧边栏折叠状态 */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* 侧边栏折叠状态下调整header和main-content */
.sidebar.collapsed ~ .header,
.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-logo .logo-text,
.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0;
}

/* 主题切换模态框样式 */
.theme-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.theme-modal.show {
    display: flex;
}

.theme-modal .modal-dialog {
    max-width: 400px;
}

.theme-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.theme-item {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.theme-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-item.active {
    border-color: var(--primary-color);
    background-color: rgba(64, 158, 255, 0.05);
}

.theme-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin: 0 auto 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-blue .theme-preview {
    background: linear-gradient(135deg, #409eff 0%, #66b1ff 100%);
}

.theme-purple .theme-preview {
    background: linear-gradient(135deg, #909399 0%, #b3b6bb 100%);
}

.theme-green .theme-preview {
    background: linear-gradient(135deg, #67c23a 0%, #85ce61 100%);
}

.theme-name {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.theme-description {
    font-size: 12px;
    color: var(--text-light);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.content-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.content-actions {
    display: flex;
    gap: 10px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
    box-shadow: none;
}

.btn:focus {
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

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

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

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

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

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

.btn-warning:hover {
    background-color: #ebb563;
}

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

.btn-danger:hover {
    background-color: #f78989;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Small Button Style */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Card Styles */
.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.card-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

.card-body {
    padding: 20px;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.data-table th {
    background-color: #fafbfc;
    font-weight: 600;
    color: var(--text-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr {
    transition: background-color 0.15s ease;
}

.data-table tr:hover {
    background-color: #fafbfc;
}

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

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 90vw;
    margin: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-dialog.modal-lg {
    max-width: calc(95vw - 40px);
}

@media (min-width: 768px) {
    .modal-dialog {
        max-width: 500px;
        margin: 40px auto;
    }
    
    .modal-dialog.modal-lg {
        max-width: 800px;
    }
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-grid .full-width {
    grid-column: 1 / -1;
}

.form-grid .form-group {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-lighter);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-link {
        justify-content: center;
    }
    
    .nav-icon {
        margin-right: 0;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* 登录页面样式 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    padding: 20px;
}

.login-box {
    background-color: var(--white);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    transition: box-shadow 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.login-box:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.login-title {
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
}

.login-form .form-group {
    margin-bottom: 20px;
}

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

.login-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    background-color: var(--white);
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.login-form .form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-lighter);
    font-size: 12px;
}

.login-btn {
    width: 100%;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
    box-shadow: none;
    margin-top: 8px;
}

.login-btn:hover {
    background-color: #66b1ff;
}

.login-btn:focus {
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.alert {
    margin-top: 20px;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border: none;
}

.alert-danger {
    color: var(--danger-color);
    background-color: rgba(245, 108, 108, 0.1);
}

/* SAAS登录页面样式 - 现代化设计 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.login-container-saas {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-color);
}

.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #409eff 0%, #667eea 100%);
    color: var(--white);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-10%, -10%) rotate(180deg);
    }
}

.login-left-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.logo-text h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo-text p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
}

.login-illustration {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.1));
}

.login-right {
    flex: 0 0 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: var(--white);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.05);
}

.login-box-saas {
    width: 100%;
    max-width: 400px;
}

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

.login-title-saas {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
}

.login-form-saas {
    margin-bottom: 24px;
}

.form-group-saas {
    margin-bottom: 24px;
}

.form-label-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-icon {
    position: absolute;
    left: 12px;
    pointer-events: none;
    transition: all 0.2s ease;
}

.form-input {
    width: 100%;
    padding: 14px 12px 14px 44px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-color);
    background-color: var(--white);
    transition: all 0.2s ease;
    font-family: inherit;
}

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

.form-input:focus + .form-icon {
    stroke: var(--primary-color);
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    background-color: rgba(64, 158, 255, 0.1);
}

.password-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.password-toggle .password-toggle-icon {
    width: 18px;
    height: 18px;
    color: var(--text-lighter);
    transition: var(--transition);
}

.password-toggle:hover .password-toggle-icon {
    color: var(--text-color);
}

.login-btn-saas {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.login-btn-saas:hover {
    background-color: #66b1ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(64, 158, 255, 0.4);
}

.login-btn-saas:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.btn-icon {
    transition: transform 0.2s ease;
}

.login-btn-saas:hover .btn-icon {
    transform: translateX(2px);
}

.alert-saas {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.alert-saas.show {
    opacity: 1;
    transform: translateY(0);
}

.alert-danger-saas {
    color: var(--danger-color);
    background-color: rgba(245, 108, 108, 0.1);
    border-left: 4px solid var(--danger-color);
}

.login-footer {
    text-align: center;
    margin-top: 32px;
}

.login-footer p {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.footer-link:hover {
    text-decoration: underline;
    color: #66b1ff;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .login-left {
        flex: 0 0 50%;
    }
    
    .login-right {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .login-container-saas {
        flex-direction: column;
    }
    
    .login-left {
        flex: 0 0 auto;
        min-height: 300px;
        padding: 32px 24px;
    }
    
    .login-right {
        flex: 1;
        padding: 32px 24px;
        box-shadow: none;
    }
    
    .login-logo {
        margin-bottom: 32px;
    }
    
    .logo-text h1 {
        font-size: 24px;
    }
    
    .login-illustration {
        max-width: 280px;
        margin: 0 auto;
    }
    
    .login-title-saas {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 24px 16px;
        min-height: 250px;
    }
    
    .login-right {
        padding: 24px 16px;
    }
    
    .login-logo {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo-text h1 {
        font-size: 22px;
    }
    
    .login-illustration {
        max-width: 220px;
    }
    
    .login-box-saas {
        max-width: 100%;
    }
    
    .form-input {
        padding: 12px 12px 12px 40px;
    }
    
    .login-btn-saas {
        padding: 12px 20px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box-saas {
    animation: fadeInUp 0.6s ease-out;
}

.form-group-saas {
    animation: fadeInUp 0.6s ease-out;
}

.form-group-saas:nth-child(2) {
    animation-delay: 0.1s;
}

.form-group-saas:nth-child(3) {
    animation-delay: 0.2s;
}

.login-btn-saas {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

/* 减少动画偏好设置 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/**/
.tab-header-prs {
  /*  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);*/
    border-radius:5px;
    padding: 5px;
    color: white;
    margin-bottom: 5px;
    box-shadow: 0 20px 60px rgba(30, 58, 138, 0.3);
    position: relative;
    overflow: hidden; 
    z-index: 1001; /* 确保仪表盘显示在最上层 */
}

/* 解决IDE语法检查误报的注释 */

/* ========================================
   统一UI组件系统 - 现代ERP设计规范
   ========================================
   本节定义了统一的UI组件，适用于：
   - 工艺管理
   - 销售管理
   - 生产管理
   - 其他业务模块
   ======================================== */

/* ========================================
   1. 网格布局系统
   ======================================== */

.grid-container {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-6 {
    grid-template-columns: repeat(6, 1fr);
}

.grid-12 {
    grid-template-columns: repeat(12, 1fr);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.col {
    flex: 1;
    padding-right: 12px;
    padding-left: 12px;
}

.col-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-9 {
    flex: 0 0 75%;
    max-width: 75%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
    padding-right: 12px;
    padding-left: 12px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 12px;
    padding-left: 12px;
}

@media (max-width: 992px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
    .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
    .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
    .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 576px) {
    .col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-xs-3 { flex: 0 0 25%; max-width: 25%; }
    .col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-xs-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-xs-9 { flex: 0 0 75%; max-width: 75%; }
    .col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-xs-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ========================================
   2. 按钮组件系统
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

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

.btn-success:hover {
    background-color: #5daf34;
    border-color: #5daf34;
    box-shadow: 0 4px 12px rgba(103, 194, 58, 0.3);
}

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

.btn-warning:hover {
    background-color: #d39e33;
    border-color: #d39e33;
    box-shadow: 0 4px 12px rgba(230, 162, 60, 0.3);
}

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

.btn-danger:hover {
    background-color: #f45c5c;
    border-color: #f45c5c;
    box-shadow: 0 4px 12px rgba(245, 108, 108, 0.3);
}

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

.btn-info:hover {
    background-color: #7a7d83;
    border-color: #7a7d83;
    box-shadow: 0 4px 12px rgba(144, 147, 153, 0.3);
}

.btn-light {
    background-color: #f8f9fa;
    color: var(--text-color);
    border-color: #e9ecef;
}

.btn-light:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: var(--primary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-color);
    border-color: var(--border-color);
}

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

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-outline-success {
    background-color: transparent;
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-success:hover {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-outline-warning {
    background-color: transparent;
    color: var(--warning-color);
    border-color: var(--warning-color);
}

.btn-outline-warning:hover {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-outline-danger {
    background-color: transparent;
    color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: var(--white);
}

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    padding: 8px;
    border-radius: 6px;
}

.btn-icon .icon {
    font-size: 16px;
}

.btn-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.btn-group .btn {
    margin: 0;
}

/* ========================================
   3. 表格组件系统
   ======================================== */

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    background-color: var(--white);
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
}

.data-table thead {
    background-color: #f8fafc;
}

.data-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

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

.data-table tbody tr:hover {
    background-color: #f8fafc;
}

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

.data-table .sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.data-table .sortable:hover {
    background-color: #e9ecef;
}

.sortable-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-indicator {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    width: 12px;
    height: 12px;
    position: relative;
    vertical-align: middle;
}

.sort-indicator::before,
.sort-indicator::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 4px 4px 4px;
    border-color: transparent transparent var(--text-light) transparent;
    transition: all 0.3s ease;
}

.sort-indicator::after {
    border-width: 4px 4px 0 4px;
    border-color: var(--text-light) transparent transparent transparent;
}

.sort-asc .sort-indicator::before {
    border-bottom-color: var(--primary-color);
    opacity: 0.9;
}

.sort-desc .sort-indicator::after {
    border-top-color: var(--primary-color);
    opacity: 0.9;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid transparent;
    color: var(--text-lighter);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    margin-left: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    vertical-align: middle;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-btn:hover {
    color: var(--primary-color);
    background-color: rgba(64, 158, 255, 0.1);
    border-color: rgba(64, 158, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(64, 158, 255, 0.15);
}

.filter-btn:active {
    transform: translateY(0);
}

/* 表格操作按钮 */
.action-btn {
    padding: 6px 12px;
    margin-right: 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: #fafafa;
    color: var(--text-color);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.btn-view {
    background-color: rgba(52, 152, 219, 0.08);
    border-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.action-btn.btn-view:hover {
    background-color: #3498db;
    color: white;
}

.action-btn.btn-edit {
    background-color: rgba(241, 196, 15, 0.08);
    border-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.action-btn.btn-edit:hover {
    background-color: #f1c40f;
    color: white;
}

.action-btn.btn-delete {
    background-color: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.action-btn.btn-delete:hover {
    background-color: #e74c3c;
    color: white;
}

/* ========================================
   4. 卡片组件系统
   ======================================== */

.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background-color: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-actions .btn-sm {
    background-color: #f8f9fa;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.card-actions .btn-sm:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.card-text {
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.6;
}

.card-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   5. 表单组件系统
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

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

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-lighter);
}

.form-group:focus-within label {
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 42px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-control::placeholder {
    color: var(--text-lighter);
}

.form-control-lg {
    padding: 14px 20px;
    font-size: 16px;
    border-radius: 10px;
    min-height: 50px;
}

.form-control-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    min-height: 34px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-check label {
    margin-bottom: 0;
    cursor: pointer;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 300px;
    flex-wrap: wrap;
}

.search-input {
    height: 44px;
    padding: 10px 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    flex: 1;
    transition: all 0.3s ease;
    background-color: #fafafa;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
    background-color: white;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-input {
    height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 160px;
    background-color: #fafafa;
    font-family: inherit;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
    background-color: white;
}

.date-separator {
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
}

.filter-controls {
    display: flex;
    gap: 12px;
}

/* ========================================
   6. 状态标签组件系统
   ======================================== */

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    line-height: 1;
}

.status-success {
    background-color: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-warning {
    background-color: rgba(241, 196, 15, 0.12);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.status-info {
    background-color: rgba(52, 152, 219, 0.12);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.status-danger {
    background-color: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.status-primary {
    background-color: rgba(64, 158, 255, 0.12);
    color: #409eff;
    border: 1px solid rgba(64, 158, 255, 0.2);
}

.status-secondary {
    background-color: rgba(144, 147, 153, 0.12);
    color: #909399;
    border: 1px solid rgba(144, 147, 153, 0.2);
}

.status-critical {
    background-color: var(--danger-color);
    color: white;
}

.status-high {
    background-color: var(--warning-color);
    color: white;
}

.status-medium {
    background-color: var(--info-color);
    color: white;
}

.status-low {
    background-color: var(--success-color);
    color: white;
}

.status-pending {
    background-color: var(--warning-color);
    color: white;
}

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

.status-resolved {
    background-color: var(--success-color);
    color: white;
}

.status-closed {
    background-color: var(--text-lighter);
    color: var(--text-color);
}

/* ========================================
   7. 模态框组件系统
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

.modal-sm {
    max-width: 400px;
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background-color: transparent;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: var(--light-gray);
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   8. 标签页组件系统
   ======================================== */

.tab-control {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.tab-control:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.tab-control .header {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 15px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    flex-shrink: 0;
}

.tab-content {
    flex: 1;
    overflow-y: auto;
}

.tab-btn {
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: var(--light-gray);
    border-color: var(--primary-color);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-close {
    font-size: 18px;
    margin-left: 8px;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.tab-close:hover {
    opacity: 1;
}

.tab-btn:first-child .tab-close {
    display: none;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ========================================
   9. 分页组件系统
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}

.pagination .page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--white);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.pagination .page-item:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .page-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-item.disabled:hover {
    background-color: var(--white);
    color: var(--text-color);
    border-color: var(--border-color);
}

.pagination-info {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 16px;
}

/* ========================================
   10. 内容区域组件系统
   ======================================== */

.content {
    padding: 24px;
}

.content-header {
    margin-bottom: 24px;
}

.content-header h2 {
    margin: 0 0 8px 0;
    color: var(--text-color);
    font-size: 24px;
    font-weight: 600;
}

.content-subtitle {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.content-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.section {
    margin-bottom: 32px;
}

.section-title {
    margin: 0 0 20px 0;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.section-subtitle {
    margin: 0 0 16px 0;
    color: var(--text-light);
    font-size: 14px;
}

/* ========================================
   11. 工具类
   ======================================== */

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

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

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

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

.text-danger {
    color: var(--danger-color);
}

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

.text-muted {
    color: var(--text-lighter);
}

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

.bg-success {
    background-color: var(--success-color);
}

.bg-warning {
    background-color: var(--warning-color);
}

.bg-danger {
    background-color: var(--danger-color);
}

.bg-info {
    background-color: var(--info-color);
}

.bg-light {
    background-color: #f8f9fa;
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.ml-1 { margin-left: 8px; }
.ml-2 { margin-left: 16px; }
.ml-3 { margin-left: 24px; }
.ml-4 { margin-left: 32px; }

.mr-1 { margin-right: 8px; }
.mr-2 { margin-right: 16px; }
.mr-3 { margin-right: 24px; }
.mr-4 { margin-right: 32px; }

.pt-1 { padding-top: 8px; }
.pt-2 { padding-top: 16px; }
.pt-3 { padding-top: 24px; }
.pt-4 { padding-top: 32px; }

.pb-1 { padding-bottom: 8px; }
.pb-2 { padding-bottom: 16px; }
.pb-3 { padding-bottom: 24px; }
.pb-4 { padding-bottom: 32px; }

.pl-1 { padding-left: 8px; }
.pl-2 { padding-left: 16px; }
.pl-3 { padding-left: 24px; }
.pl-4 { padding-left: 32px; }

.pr-1 { padding-right: 8px; }
.pr-2 { padding-right: 16px; }
.pr-3 { padding-right: 24px; }
.pr-4 { padding-right: 32px; }

.d-flex {
    display: flex;
}

.d-inline-flex {
    display: inline-flex;
}

.d-block {
    display: block;
}

.d-inline-block {
    display: inline-block;
}

.d-none {
    display: none;
}

.flex-row {
    flex-direction: row;
}

.flex-column {
    flex-direction: column;
}

.justify-content-start {
    justify-content: flex-start;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-end {
    justify-content: flex-end;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-start {
    align-items: flex-start;
}

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

.align-items-end {
    align-items: flex-end;
}

.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

.overflow-auto {
    overflow: auto;
}

.overflow-hidden {
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rounded {
    border-radius: 8px;
}

.rounded-sm {
    border-radius: 6px;
}

.rounded-lg {
    border-radius: 12px;
}

.rounded-circle {
    border-radius: 50%;
}

.border {
    border: 1px solid var(--border-color);
}

.border-top {
    border-top: 1px solid var(--border-color);
}

.border-bottom {
    border-bottom: 1px solid var(--border-color);
}

.border-left {
    border-left: 1px solid var(--border-color);
}

.border-right {
    border-right: 1px solid var(--border-color);
}

.border-0 {
    border: none;
}

/* ========================================
   12. 响应式设计
   ======================================== */

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 16px;
    }
    
    .content-header h2 {
        font-size: 20px;
    }
    
    .card-header,
    .card-body,
    .card-footer {
        padding: 16px;
    }
    
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .content-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-group {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .data-table th,
    .data-table td {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .status-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ========================================
   13. 动画效果
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

.fade-in-down {
    animation: fadeInDown 0.3s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

/* ========================================
   14. 打印样式
   ======================================== */

@media print {
    .sidebar,
    .item-sidebar,
    .tab-control .header,
    .card-actions,
    .pagination,
    .btn,
    .search-filter-section,
    .modal-overlay,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .data-table {
        border: 1px solid #000;
    }
    
    .data-table th,
    .data-table td {
        border: 1px solid #000;
    }
}

/* ========================================
   16. 统计卡片组件系统
   ======================================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
    flex-shrink: 0;
}

.stat-primary {
    background-color: rgba(64, 158, 255, 0.12);
    color: var(--primary-color);
}

.stat-success {
    background-color: rgba(103, 194, 58, 0.12);
    color: var(--success-color);
}

.stat-warning {
    background-color: rgba(230, 162, 60, 0.12);
    color: var(--warning-color);
}

.stat-danger {
    background-color: rgba(245, 108, 108, 0.12);
    color: var(--danger-color);
}

.stat-info {
    background-color: rgba(144, 147, 153, 0.12);
    color: var(--info-color);
}

.stat-error {
    background-color: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

/* ========================================
   17. 无障碍支持
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   响应式设计系统 - 全局适配
   ========================================
   支持设备：
   - 手机（< 576px）
   - 平板（576px - 768px）
   - 小型桌面（768px - 992px）
   - 中型桌面（992px - 1200px）
   - 大型桌面（> 1200px）
   ======================================== */

/* ========================================
   1. 移动设备优化（< 576px）
   ======================================== */
@media (max-width: 575.98px) {
    /* 全局字体调整 */
    html {
        font-size: 14px;
    }
    
    /* 按钮系统 */
    .btn {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-group .btn {
        width: auto;
        margin-bottom: 0;
    }
    
    /* 表格响应式 */
    .data-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    .data-table .action-btn {
        padding: 4px 8px;
        font-size: 11px;
        margin-right: 4px;
    }
    
    /* 状态徽章 */
    .status-badge {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    /* 卡片组件 */
    .card {
        border-radius: 8px;
        margin-bottom: 16px;
    }
    
    .card-header {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 12px 16px;
    }
    
    /* 表单组件 */
    .form-control {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    /* 模态框 */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 0;
        max-width: 100%;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* 分页组件 */
    .pagination {
        flex-direction: column;
        gap: 8px;
    }
    
    .pagination-info {
        font-size: 12px;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* 搜索和过滤区域 */
    .search-filter-section {
        flex-direction: column;
        padding: 16px;
        gap: 12px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
    }
    
    /* 网格布局 */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col {
        width: 100%;
        padding: 0;
    }
    
    /* 标签页 */
    .tab-control .header {
        flex-direction: column;
        padding: 8px;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* 操作按钮组 */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

/* ========================================
   2. 平板设备优化（576px - 768px）
   ======================================== */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* 按钮系统 */
    .btn {
        padding: 9px 18px;
        font-size: 14px;
    }
    
    /* 表格响应式 */
    .data-table-container {
        overflow-x: auto;
    }
    
    .data-table {
        font-size: 13px;
        min-width: 700px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    /* 卡片组件 */
    .card {
        border-radius: 10px;
    }
    
    /* 表单组件 */
    .form-control {
        padding: 10px 14px;
    }
    
    /* 模态框 */
    .modal-content {
        max-width: 90%;
    }
    
    /* 分页组件 */
    .pagination {
        flex-direction: row;
        justify-content: space-between;
    }
    
    /* 搜索和过滤区域 */
    .search-filter-section {
        flex-wrap: wrap;
        padding: 18px;
    }
    
    .search-box {
        flex: 1;
        min-width: 200px;
    }
    
    /* 网格布局 */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* 标签页 */
    .tab-control .header {
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ========================================
   3. 小型桌面优化（768px - 992px）
   ======================================== */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* 表格响应式 */
    .data-table {
        font-size: 14px;
    }
    
    /* 模态框 */
    .modal-content {
        max-width: 85%;
    }
    
    /* 网格布局 */
    .grid-2,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 搜索和过滤区域 */
    .search-filter-section {
        padding: 20px;
    }
}

/* ========================================
   4. 中型桌面优化（992px - 1200px）
   ======================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
    /* 网格布局 */
    .grid-2,
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   5. 大型桌面优化（> 1200px）
   ======================================== */
@media (min-width: 1200px) {
    /* 容器最大宽度 */
    .container {
        max-width: 1140px;
    }
    
    .container-fluid {
        max-width: 100%;
    }
    
    /* 网格布局 */
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   6. 横屏优化
   ======================================== */
@media (max-height: 600px) and (orientation: landscape) {
    /* 模态框 */
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* 表格 */
    .data-table-container {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ========================================
   7. 高分辨率设备优化
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* 图标和图片优化 */
    .logo-img,
    .icon {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   8. 打印样式
   ======================================== */
@media print {
    .no-print,
    .sidebar,
    .action-btn,
    .pagination,
    .search-filter-section {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .data-table {
        font-size: 10pt;
        width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ========================================
   统一UI组件系统结束
   ======================================== */
