html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* 导航栏菜单字体小一号 */
.navbar .nav-link,
.navbar .navbar-brand {
  font-size: 0.875em;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}

/* 通知系统样式 */
.notification-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
}

.notification-dropdown {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.notification-item {
    border-bottom: 1px solid #f8f9fa;
    padding: 0.75rem 1rem;
    transition: background-color 0.15s ease-in-out;
    white-space: normal;
}

.notification-item-body {
    min-width: 0;
    word-break: break-word;
}

.notification-item .notification-title,
.notification-item .notification-content {
    word-break: break-word;
    white-space: pre-wrap;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item .btn-link {
    text-decoration: none;
    color: #6c757d;
}

.notification-item .btn-link:hover {
    color: #495057;
}

/* 通知动画效果 */
@keyframes notification-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.notification-badge.has-new {
    animation: notification-pulse 1s infinite;
}

/* 响应式通知下拉菜单 */
@media (max-width: 576px) {
    .notification-dropdown {
        width: 300px !important;
        max-width: 90vw;
    }
}

/* 通知类型图标 */
.notification-type-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.notification-type-system {
    background-color: #007bff;
    color: white;
}

.notification-type-ticket {
    background-color: #28a745;
    color: white;
}

.notification-type-task {
    background-color: #ffc107;
    color: #212529;
}

.notification-type-warning {
    background-color: #dc3545;
    color: white;
}

.notification-type-info {
    background-color: #17a2b8;
    color: white;
}

/* 工序表格样式 - 减小行高 */
.table-sm td {
  padding: 0.25rem 0.5rem;
  vertical-align: middle;
  line-height: 1.2;
  height: 40px; /* 固定行高 */
}

.table-sm th {
  padding: 0.25rem 0.5rem;
  vertical-align: middle;
  line-height: 1.2;
  height: 35px; /* 表头固定高度 */
}

/* 按钮组样式优化 */
.btn-group-vertical .btn-xs {
  padding: 0.1rem 0.3rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

/* 徽章样式优化 */
.badge {
  line-height: 1;
}

/* 工序详情样式优化 */
.table-sm td div {
  margin: 0;
  line-height: 1.2;
}

.table-sm td small {
  line-height: 1.1;
}

/* 时间状态样式 */
.time-status-badge {
  font-size: 0.7rem;
  padding: 0.1rem 0.3rem;
  border-radius: 0.2rem;
}

.time-status-badge i {
  font-size: 0.6rem;
}

/* 时间状态颜色增强 */
.text-danger {
  font-weight: 600;
}

.text-warning {
  font-weight: 500;
}

.text-success {
  font-weight: 500;
}

.text-info {
  font-weight: 500;
}

/* 移动端时间状态样式 */
.mobile-task-card .meta-item .badge {
  font-size: 0.65rem;
  padding: 0.1rem 0.25rem;
}

/* 时间状态提示动画 */
@keyframes pulse-warning {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

@keyframes pulse-danger {
  0% { opacity: 1; }
  50% { opacity: 0.8; }
  100% { opacity: 1; }
}

.text-warning .badge {
  animation: pulse-warning 2s infinite;
}

.text-danger .badge {
  animation: pulse-danger 1.5s infinite;
}

/* ===== 任务显示美化样式 ===== */

/* 工单组样式优化 */
.ticket-group {
  margin-bottom: 2rem !important;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
}

.ticket-group::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #007bff 0%, #28a745 50%, #ffc107 100%);
}

/* 工单标题栏美化 */
.ticket-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  border-bottom: 2px solid #e9ecef !important;
  padding: 1.5rem !important;
  position: relative;
}

.ticket-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #dee2e6 50%, transparent 100%);
}

.ticket-header h6 {
  color: #495057;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.ticket-header .small {
  color: #6c757d;
  font-size: 0.875rem;
}

/* 任务表格美化 */
.table-responsive {
  background: #ffffff;
  border-radius: 0 0 0.75rem 0.75rem;
}

/* 表格行间距和分隔 */
.table-sm tbody tr {
  border-bottom: 1px solid #f1f3f4;
  transition: all 0.2s ease-in-out;
  position: relative;
  background: #ffffff;
}

/* 增加行间距 */
.table-sm tbody tr td {
  padding: 0.75rem 0.5rem !important;
  vertical-align: middle;
  line-height: 1.4;
  height: auto !important;
  min-height: 60px;
}

/* 表格行悬停效果 */
.table-sm tbody tr:hover {
  background-color: #f8f9fa !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  z-index: 1;
}

/* 不同状态行的背景色 */
.table-sm tbody tr.table-success {
  background-color: #d1edff !important;
  border-left: 4px solid #28a745;
}

.table-sm tbody tr.table-warning {
  background-color: #fff3cd !important;
  border-left: 4px solid #ffc107;
}

.table-sm tbody tr.table-info {
  background-color: #d1ecf1 !important;
  border-left: 4px solid #17a2b8;
}

.table-sm tbody tr.table-secondary {
  background-color: #f8f9fa !important;
  border-left: 4px solid #6c757d;
  opacity: 0.8;
}

/* 表格行悬停时的状态行样式 */
.table-sm tbody tr.table-success:hover {
  background-color: #b8daff !important;
}

.table-sm tbody tr.table-warning:hover {
  background-color: #ffeaa7 !important;
}

.table-sm tbody tr.table-info:hover {
  background-color: #bee5eb !important;
}

.table-sm tbody tr.table-secondary:hover {
  background-color: #e9ecef !important;
  opacity: 1;
}

/* 表格头部美化 */
.table-sm thead th {
  background: #f8f9fa !important;
  color: #495057 !important;
  font-weight: 600;
  padding: 0.75rem 0.5rem !important;
  border-bottom: 2px solid #dee2e6;
  text-align: center;
  vertical-align: middle;
  height: 50px !important;
}

/* 序号列样式 */
.table-sm tbody tr td:first-child {
  text-align: center;
  font-weight: 600;
}

.table-sm tbody tr td:first-child .badge {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  border: 1px solid #495057;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 任务名称列样式 */
.table-sm tbody tr td:nth-child(2) {
  font-weight: 500;
  color: #212529;
}

.table-sm tbody tr td:nth-child(2) strong {
  color: #495057;
  font-weight: 600;
}

.table-sm tbody tr td:nth-child(2) small {
  color: #6c757d;
  font-style: italic;
}

/* 状态徽章美化 */
.table-sm tbody tr .badge {
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 不同状态徽章的颜色 */
.badge.bg-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.badge.bg-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%) !important;
}

.badge.bg-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
  color: #212529 !important;
}

.badge.bg-info {
  background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%) !important;
}

.badge.bg-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%) !important;
}

.badge.bg-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.badge.bg-dark {
  background: linear-gradient(135deg, #343a40 0%, #212529 100%) !important;
}

/* 操作按钮组美化 */
.btn-group-vertical {
  gap: 0.25rem !important;
}

.btn-group-vertical .btn {
  border-radius: 0.25rem !important;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

/* 按钮颜色美化 */
.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  border: 1px solid #0056b3;
}

.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  border: 1px solid #1e7e34;
}

.btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  border: 1px solid #e0a800;
  color: #212529;
}

.btn-info {
  background: linear-gradient(135deg, #17a2b8 0%, #117a8b 100%);
  border: 1px solid #117a8b;
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
  border: 1px solid #545b62;
}

.btn-danger {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: 1px solid #c82333;
}

/* 时间列样式 */
.table-sm tbody tr td:nth-child(8),
.table-sm tbody tr td:nth-child(9) {
  font-size: 0.875rem;
  color: #495057;
}

.table-sm tbody tr td:nth-child(8) div,
.table-sm tbody tr td:nth-child(9) div {
  margin-bottom: 0.25rem;
}

/* 负责人列样式 */
.table-sm tbody tr td:nth-child(4) .fw-bold {
  color: #495057;
  font-weight: 600;
}

/* 部门徽章样式 */
.table-sm tbody tr td:nth-child(5) .badge {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  font-weight: 500;
}

/* 移动端卡片美化 */
.mobile-task-card {
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: all 0.2s ease-in-out;
  background: #fff;
}

.mobile-task-card:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.mobile-task-card.border-success {
  border-left: 4px solid #28a745;
  background: linear-gradient(135deg, #d1edff 0%, #f8f9fa 100%);
}

.mobile-task-card.border-warning {
  border-left: 4px solid #ffc107;
  background: linear-gradient(135deg, #fff3cd 0%, #f8f9fa 100%);
}

.mobile-task-card.border-info {
  border-left: 4px solid #17a2b8;
  background: linear-gradient(135deg, #d1ecf1 0%, #f8f9fa 100%);
}

.mobile-task-card.bg-light {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
  opacity: 0.8;
}

/* 移动端任务标题美化 */
.mobile-task-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.mobile-task-title .badge {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  border: 1px solid #495057;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* 移动端状态徽章美化 */
.mobile-status-badges .badge {
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* 移动端操作按钮美化 */
.mobile-task-actions .btn {
  font-weight: 500;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

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

/* 进度条美化 */
.progress {
  height: 10px !important;
  border-radius: 0.5rem;
  background-color: #e9ecef;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 表格容器美化 */
.table-responsive {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 空状态美化 */
.alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  border: 1px solid #bee5eb;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* 响应式优化 */
@media (max-width: 768px) {
  .ticket-group {
    margin-bottom: 1.5rem !important;
  }
  
  .mobile-task-card {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  .mobile-task-title {
    font-size: 1rem;
  }
}

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

.ticket-group {
  animation: fadeInUp 0.3s ease-out;
}

/* 加载状态美化 */
.loading-overlay {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
}

/* 消息提示美化 */
#messageAlert {
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
  backdrop-filter: blur(10px);
}

/* ===== 个人信息管理页面样式 ===== */

/* 个人信息管理页面容器 */
.profile-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  padding: 2rem 0;
}

/* 页面标题美化 */
.profile-container h1 {
  color: #495057;
  font-weight: 600;
  margin-bottom: 2rem;
}

.profile-container h1 i {
  color: #007bff;
  margin-right: 0.5rem;
}

/* 卡片美化 */
.profile-container .card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.profile-container .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.15);
}

/* 卡片头部美化 */
.profile-container .card-header {
  border-bottom: none;
  padding: 1.5rem;
  font-weight: 600;
}

.profile-container .card-header h5 {
  margin: 0;
  font-size: 1.1rem;
}

.profile-container .card-header i {
  margin-right: 0.5rem;
}

/* 卡片内容美化 */
.profile-container .card-body {
  padding: 2rem;
}

/* 表单组美化 */
.profile-container .form-group {
  margin-bottom: 1.5rem;
}

.profile-container .form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

.profile-container .form-label i {
  margin-right: 0.5rem;
  color: #6c757d;
}

.profile-container .form-control {
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.3s ease-in-out;
}

.profile-container .form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.profile-container .form-control:read-only {
  background-color: #f8f9fa;
  color: #6c757d;
}

/* 表单提示文本美化 */
.profile-container .form-text {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* 按钮美化 */
.profile-container .btn {
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
  border: none;
}

.profile-container .btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.3);
}

.profile-container .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 123, 255, 0.4);
}

.profile-container .btn-warning {
  background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
  box-shadow: 0 0.25rem 0.5rem rgba(255, 193, 7, 0.3);
  color: #212529;
}

.profile-container .btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(255, 193, 7, 0.4);
  color: #212529;
}

.profile-container .btn-outline-secondary {
  border: 2px solid #6c757d;
  color: #6c757d;
  background: transparent;
}

.profile-container .btn-outline-secondary:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
}

/* 密码强度指示器美化 */
.password-strength {
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

.password-strength.text-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-left: 3px solid #dc3545;
}

.password-strength.text-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-left: 3px solid #ffc107;
}

.password-strength.text-success {
  background-color: rgba(40, 167, 69, 0.1);
  border-left: 3px solid #28a745;
}

/* 安全提示框美化 */
.profile-container .alert-info {
  background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
  border: 1px solid #bee5eb;
  border-radius: 0.5rem;
  border-left: 4px solid #17a2b8;
}

.profile-container .alert-info i {
  color: #17a2b8;
  margin-right: 0.5rem;
}

/* 账户安全状态美化 */
.profile-container .text-center i {
  margin-bottom: 0.5rem;
}

.profile-container .badge {
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 500;
}

/* 响应式优化 */
@media (max-width: 768px) {
  .profile-container {
    padding: 1rem 0;
  }
  
  .profile-container .card-body {
    padding: 1.5rem;
  }
  
  .profile-container .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .profile-container .d-md-flex {
    flex-direction: column;
  }
}

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

.profile-container .card {
  animation: fadeInUp 0.5s ease-out;
}

.profile-container .card:nth-child(2) {
  animation-delay: 0.1s;
}

.profile-container .card:nth-child(3) {
  animation-delay: 0.2s;
}

/* 表单验证样式 */
.profile-container .field-validation-error {
  color: #dc3545;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

.profile-container .input-validation-error {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.profile-container .validation-summary-errors {
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  color: #dc3545;
}

.profile-container .validation-summary-errors ul {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

/* 加载状态美化 */
.profile-container .spinner-border {
  width: 1rem;
  height: 1rem;
}

/* 成功消息美化 */
.profile-container .alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 1px solid #c3e6cb;
  border-radius: 0.5rem;
  border-left: 4px solid #28a745;
}

.profile-container .alert-success i {
  color: #28a745;
  margin-right: 0.5rem;
}

/* 错误消息美化 */
.profile-container .alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border: 1px solid #f5c6cb;
  border-radius: 0.5rem;
  border-left: 4px solid #dc3545;
}

.profile-container .alert-danger i {
  color: #dc3545;
  margin-right: 0.5rem;
}

/* ===== 手机端导航抽屉样式 ===== */

@media (max-width: 767.98px) {
  .mobile-menu-button {
    padding: 0.35rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
  }

  .mobile-offcanvas-nav {
    --bs-offcanvas-width: 280px;
  }

  .mobile-offcanvas-login .navbar-nav {
    flex-direction: row;
    gap: 0.5rem;
  }

  .mobile-nav-list {
    margin: 0;
    padding: 0;
  }

  .mobile-nav-list li {
    margin-bottom: 0.25rem;
  }

  .mobile-nav-link {
    display: block;
    padding: 0.6rem 0.4rem;
    border-radius: 0.5rem;
    color: #212529;
    text-decoration: none;
    font-size: 0.95rem;
  }

  .mobile-nav-link i {
    font-size: 1.1rem;
    vertical-align: middle;
  }

  .mobile-nav-link:hover {
    background-color: #f1f3f5;
    text-decoration: none;
  }

  .mobile-nav-sublink {
    padding-left: 1.8rem;
    font-size: 0.9rem;
    color: #495057;
  }

  .mobile-nav-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    padding-top: 0.4rem;
  }

  .mobile-nav-section-title span {
    display: inline-flex;
    align-items: center;
  }
}