/* ============================================================
   员工报工系统 - 全局样式
   设计风格：现代企业级后台 / 支持深色浅色模式
   ============================================================ */

/* ---------- CSS变量（浅色模式） ---------- */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-hover: #f1f5f9;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  --border: #e2e8f0;
  --border-light: #f1f5f9;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: #334155;
  --sidebar-active: #4f46e5;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: all 0.2s ease;
}

/* ---------- 深色模式 ---------- */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-light: #312e81;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-hover: #334155;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #0f172a;

  --border: #334155;
  --border-light: #1e293b;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);

  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f1f5f9;
  --sidebar-hover: #1e293b;
  --sidebar-active: #4f46e5;
}

/* ---------- 全局重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ============================================================
   登录页面
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  top: -200px;
  right: -200px;
  animation: float 8s ease-in-out infinite;
}

.login-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  bottom: -150px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

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

.login-container {
  display: flex;
  width: 900px;
  max-width: 95%;
  min-height: 560px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.login-left {
  flex: 1;
  background: var(--primary-gradient);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
}

.login-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.login-logo-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(10px);
}

.login-logo-text {
  font-size: 20px;
  font-weight: 700;
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.login-subtitle {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.7;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.9;
}

.login-feature-icon {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.login-right {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-form-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .form-input {
  padding-left: 44px;
}

/* 日期选择框：文字显示（空态显示中文提示，选中显示"2026年9月14日"） */
.date-field {
  position: relative;
  display: block;
}

.date-field .date-field-display {
  padding-right: 40px;
}

.date-field .date-field-native {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
  z-index: 2;
}

.date-field .date-field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}

.date-field:focus-within .date-field-display {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 16px;
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 16px;
  background: none;
  border: none;
  padding: 4px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

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

.btn-success:hover:not(:disabled) {
  background: #059669;
}

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

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

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

.btn-warning:hover:not(:disabled) {
  background: #d97706;
}

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

.btn-info:hover:not(:disabled) {
  background: #2563eb;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

.login-btn {
  margin-top: 8px;
  height: 48px;
  font-size: 15px;
  background: var(--primary-gradient);
  border: none;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ============================================================
   主界面布局
   ============================================================ */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 240px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: 64px;
}

.sidebar-header {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-logo-icon svg {
  width: 19px;
  height: 19px;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logo-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sidebar-logo-sub {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.4);
}

.sidebar.collapsed .sidebar-header {
  padding: 0;
  justify-content: center;
}

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

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

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  white-space: nowrap;
}

.sidebar.collapsed .nav-section-title {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.nav-item.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.nav-item-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item-icon svg {
  width: 20px;
  height: 20px;
}

.nav-item-text {
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
}

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

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

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

/* ---------- 主内容区 ---------- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ---------- 顶栏 ---------- */
.header {
  height: 64px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  background: none;
  border: none;
  font-size: 18px;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-action {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
  background: none;
  border: none;
  font-size: 16px;
  position: relative;
}

.header-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

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

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ---------- 下拉菜单 ---------- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1000;
  display: none;
}

.dropdown-menu.show {
  display: block;
  animation: dropdownFadeIn 0.15s ease;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

/* ---------- 内容区 ---------- */
.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.page-content {
  max-width: 100%;
}

/* ============================================================
   卡片
   ============================================================ */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

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

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.stat-icon.info { background: rgba(59, 130, 246, 0.1); color: var(--info); }

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

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-left: 2px;
}

/* ============================================================
   表格
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table thead th {
  background: var(--bg-tertiary);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}

.table tbody tr {
  transition: var(--transition);
}

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

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

.table .text-center { text-align: center; }
.table .text-right { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .col-hours { text-align: center; }
.table .col-actions { white-space: nowrap; }

/* 标签 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.badge.primary { background: var(--primary-light); color: var(--primary); }
.badge.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge.info { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.badge.secondary { background: var(--bg-tertiary); color: var(--text-secondary); }

/* ============================================================
   筛选栏
   ============================================================ */
.filter-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.filter-item label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* ============================================================
   分页
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

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

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

.page-size-select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

/* ============================================================
   弹窗（Modal）
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: none;
  transition: opacity 0.18s ease;
}

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

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

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

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: var(--transition);
  background: none;
  border: none;
  font-size: 18px;
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

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

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

/* 表单行 */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

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

/* 表单行作为弹窗最后一块时不再额外留白 */
.modal-body > .form-row:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Toast 提示
   ============================================================ */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 480px;
  animation: toastSlideIn 0.3s ease;
  font-size: 14px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
  flex: 1;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
  white-space: normal;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 16px;
  padding: 2px;
  flex-shrink: 0;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.hide {
  animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ============================================================
   消息通知中心（铃铛）
   ============================================================ */
.notification-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notification-bell {
  position: relative;
}

.bell-icon {
  width: 20px;
  height: 20px;
}

/* 未读角标 */
.notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg-secondary);
  animation: badgePulse 2s ease infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* 通知下拉面板 */
.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.notification-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.notification-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.notification-clear-all {
  background: none;
  border: none;
  color: var(--info);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.notification-clear-all:hover {
  background: rgba(59, 130, 246, 0.1);
}

.notification-list {
  overflow-y: auto;
  max-height: 380px;
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* 单条通知 */
.notification-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
  cursor: default;
}

.notification-item:hover {
  background: var(--bg-hover);
}

.notification-item.unread {
  background: rgba(59, 130, 246, 0.04);
}

.notification-item.unread::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  margin-top: 8px;
  flex-shrink: 0;
}

.notif-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.notif-success { background: rgba(34,197,94,0.12); color: #16a34a; }
.notif-error { background: rgba(239,68,68,0.12); color: #dc2626; }
.notif-warning { background: rgba(245,158,11,0.12); color: #d97706; }
.notif-info { background: rgba(59,130,246,0.12); color: #2563eb; }

.notification-item-body {
  flex: 1;
  min-width: 0;
}

.notification-item-msg {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-word;
}

.notification-item-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .notification-panel {
    width: calc(100vw - 32px);
    right: -12px;
  }
}

/* ============================================================
   加载状态
   ============================================================ */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  border-radius: inherit;
}

[data-theme="dark"] .loading-overlay {
  background: rgba(15, 23, 42, 0.7);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-left: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-tertiary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* ============================================================
   图表容器
   ============================================================ */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ============================================================
   工具类
   ============================================================ */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ============================================================
   可搜索下拉选择组件
   ============================================================ */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.searchable-select-icon {
  position: absolute;
  left: 12px;
  font-size: 13px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.searchable-select-input {
  width: 100%;
  padding: 12px 34px 12px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: var(--transition);
  outline: none;
}

.searchable-select-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.searchable-select-input::placeholder {
  color: var(--text-tertiary);
}

.searchable-select-clear {
  position: absolute;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  cursor: pointer;
}

.searchable-select-input:not(:placeholder-shown) ~ .searchable-select-clear,
.searchable-select-input:focus ~ .searchable-select-clear {
  display: flex;
}

.searchable-select-clear:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.searchable-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  display: none;
}

.searchable-select-dropdown.show {
  display: block;
  animation: dropdownFadeIn 0.12s ease;
}

.searchable-select-option {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
}

.searchable-select-option:hover,
.searchable-select-option.highlight {
  background: var(--bg-hover);
}

.searchable-select-option.selected {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.searchable-select-option-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  white-space: normal;
}

.searchable-select-check {
  color: var(--primary);
  font-size: 12px;
  flex-shrink: 0;
}

.searchable-select-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ============================================================
   报工列表 - 同日多项目分组
   ============================================================ */
.report-group-row td {
  background: var(--primary-light);
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-light);
}

.report-group-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.report-group-avatar {
  font-size: 13px;
}

.report-group-user {
  font-weight: 700;
  color: var(--text-primary);
}

.report-group-date {
  font-weight: 600;
  color: var(--text-primary);
}

.report-group-hours {
  font-weight: 600;
  color: var(--warning);
}

.table tbody tr.row-grouped td {
  background: rgba(99, 102, 241, 0.04);
}

.table tbody tr.row-grouped:hover td {
  background: var(--bg-hover);
}

.day-seq-badge {
  margin-left: 6px;
  vertical-align: middle;
}

/* 借调跨班组报工标记 */
.transfer-badge {
  margin-left: 6px;
  vertical-align: middle;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(139, 92, 246, 0.3);
  white-space: nowrap;
}

/* ============================================================
   加载失败状态
   ============================================================ */
.error-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
}

.error-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.error-state-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ============================================================
   数据备份页 - 卡片网格（限制卡片宽度，避免单卡片撑满整行）
   ============================================================ */
.backup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 420px));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .backup-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   响应式 - 平板 (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    min-height: auto;
    width: 92%;
    max-width: 480px;
  }
  .login-left { padding: 32px 28px 24px; }
  .login-logo { margin-bottom: 20px; }
  .login-logo-icon { width: 40px; height: 40px; font-size: 20px; }
  .login-logo-text { font-size: 17px; }
  .login-title { font-size: 22px; margin-bottom: 0; }
  .login-right { padding: 28px; }
  .login-form-title { font-size: 20px; }
  .login-form-subtitle { margin-bottom: 24px; }

  .sidebar {
    position: fixed; left: -260px; top: 0; bottom: 0;
    z-index: 200; transition: left 0.3s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
  }
  .sidebar.mobile-open { left: 0; }
  .sidebar-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); z-index: 150;
  }
  .sidebar-overlay.show { display: block; }

  .header { padding: 0 16px; }
  .page-title { font-size: 16px; }
  .user-details { display: none; }
  .content-wrapper { padding: 16px; }

  .chart-row { grid-template-columns: 1fr; }
  .chart-container { height: 260px; }
  .form-row { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-icon { width: 42px; height: 42px; font-size: 20px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 12px; }

  .filter-bar { padding: 14px 16px; }
  .filter-item { min-width: calc(50% - 8px); flex: 1; }
  .filter-actions { margin-left: 0; width: 100%; justify-content: flex-end; }

  .table { font-size: 12px; }
  .table thead th { padding: 10px 12px; font-size: 11px; }
  .table tbody td { padding: 10px 12px; }

  .modal { width: 94%; max-width: 480px; max-height: 88vh; }
  .modal-header { padding: 16px 20px; }
  .modal-title { font-size: 16px; }
  .modal-body { padding: 18px 20px; }
  .modal-footer { padding: 14px 20px; }

  .pagination { padding: 12px 16px; justify-content: center; }
  .pagination-info { width: 100%; text-align: center; font-size: 12px; }

  .card-header { padding: 14px 16px; }
  .card-title { font-size: 15px; }
  .card-body { padding: 16px; }

  /* V4.6：移动端 toast 固定在屏幕底部居中，员工提交报工时错误提示始终可见，无需上拉找顶部 */
  .toast-container {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    align-items: center;
  }
  .toast { min-width: auto; max-width: 100%; width: 100%; }
}

/* ============================================================
   响应式 - 手机 (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .login-page { padding: 12px 0; }
  .login-container { width: 94%; border-radius: 16px; }
  .login-left { padding: 24px 20px 18px; }
  .login-logo-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
  .login-logo-text { font-size: 15px; }
  .login-title { font-size: 19px; line-height: 1.4; }
  .login-right { padding: 22px 20px; }
  .login-form-title { font-size: 18px; }
  .login-form-subtitle { font-size: 13px; margin-bottom: 20px; }
  .form-group { margin-bottom: 16px; }
  .form-label { font-size: 12px; margin-bottom: 6px; }
  .form-input, .form-select, .form-textarea { padding: 10px 14px; font-size: 14px; }
  .login-btn { height: 44px; font-size: 14px; }
  .login-footer { font-size: 11px; margin-top: 18px; }

  .header { height: 56px; padding: 0 12px; }
  .sidebar-toggle { width: 32px; height: 32px; font-size: 16px; }
  .page-title { font-size: 15px; }
  .header-action { width: 32px; height: 32px; font-size: 15px; }
  .user-avatar { width: 30px; height: 30px; font-size: 13px; }
  .content-wrapper { padding: 12px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card { padding: 12px; gap: 8px; }
  .stat-icon { width: 38px; height: 38px; font-size: 18px; border-radius: 8px; }
  .stat-value { font-size: 18px; }
  .stat-label { font-size: 11px; margin-bottom: 2px; }
  .stat-unit { font-size: 12px; }

  .filter-bar { padding: 12px 14px; margin-bottom: 14px; }
  .filter-row { gap: 10px; }
  .filter-item { min-width: 100%; flex: none; }
  .filter-item label { font-size: 11px; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }

  .table { font-size: 11px; }
  .table thead th { padding: 8px 10px; font-size: 10px; }
  .table tbody td { padding: 8px 10px; }
  .btn-sm { padding: 5px 8px; font-size: 11px; }

  .modal { width: 96%; border-radius: 14px; }
  .modal-header { padding: 14px 16px; }
  .modal-title { font-size: 15px; }
  .modal-body { padding: 16px; }
  .modal-footer { padding: 12px 16px; gap: 8px; }
  .modal-footer .btn { flex: 1; padding: 10px 16px; font-size: 13px; }

  .pagination { padding: 10px 12px; gap: 8px; }
  .pagination-info { font-size: 11px; }
  .page-btn { min-width: 28px; height: 28px; font-size: 12px; padding: 0 6px; }
  .page-size-select { height: 28px; font-size: 11px; }

  .card-header { padding: 12px 14px; }
  .card-title { font-size: 14px; }
  .card-body { padding: 14px; }

  .btn { padding: 8px 14px; font-size: 13px; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }

  .chart-container { height: 220px; }

  .empty-state { padding: 40px 16px; }
  .empty-state-icon { font-size: 36px; margin-bottom: 12px; }
  .empty-state-text { font-size: 13px; }

  .toast-container {
    top: auto;
    bottom: 16px;
    right: 10px;
    left: 10px;
    align-items: center;
  }
  .toast { padding: 12px 14px; font-size: 13px; width: 100%; }
}

/* ============================================================
   响应式 - 超小屏 (≤360px)
   ============================================================ */
@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-title { font-size: 17px; }
  .table { font-size: 10px; }
  .table thead th, .table tbody td { padding: 6px 8px; }
}

/* ============================================================
   请假/休息管理模块样式（V3 精致高级版）
   ============================================================ */

/* ---------- 今日请假概览卡片（高级版） ---------- */
.leave-overview {
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.leave-overview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6, #ec4899);
}
.leave-overview::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.leave-overview-empty {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
}
.leave-overview-empty::before {
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
}
[data-theme="dark"] .leave-overview-empty {
  background: linear-gradient(135deg, #052e16 0%, #14532d 100%);
  border-color: #166534;
}
.leave-overview-active {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%);
  border: 1px solid #fcd34d;
}
[data-theme="dark"] .leave-overview-active {
  background: linear-gradient(135deg, #451a03 0%, #78350f 50%, #92400e 100%);
  border-color: #b45309;
}
.leave-overview-icon {
  font-size: 48px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
}
.leave-overview-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.leave-overview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.leave-overview-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}
.leave-overview-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.7);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
[data-theme="dark"] .leave-overview-date-badge {
  background: rgba(0,0,0,0.25);
  color: var(--text-secondary);
}
.leave-overview-date-badge .date-icon { font-size: 14px; }
.leave-overview-sub {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.leave-overview-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 8px;
}
/* 人员列表滚动条美化 */
.leave-overview-people::-webkit-scrollbar {
  width: 6px;
}
.leave-overview-people::-webkit-scrollbar-track {
  background: transparent;
}
.leave-overview-people::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}
.leave-overview-people::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.28);
}
[data-theme="dark"] .leave-overview-people::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
}
.leave-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.85);
  padding: 5px 14px 5px 5px;
  border-radius: 20px;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: var(--transition);
}
.leave-person-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
[data-theme="dark"] .leave-person-chip { background: rgba(0,0,0,0.3); }
.leave-person-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.leave-person-name { font-weight: 600; }
.leave-person-time {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 1px 6px;
  border-radius: 8px;
}

/* 概览统计卡片 */
.leave-overview-stats {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  align-items: stretch;
  align-self: flex-start;
}
.leave-stat-card {
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  text-align: center;
  min-width: 70px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.5);
}
[data-theme="dark"] .leave-stat-card {
  background: rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.1);
}
.leave-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.leave-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.leave-stat-total .leave-stat-num {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.leave-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ---------- 请假类型标签 ---------- */
.leave-badge { font-weight: 500; padding: 2px 8px; }
.leave-primary { background: #eef2ff; color: #4f46e5; }
.leave-danger { background: #fef2f2; color: #dc2626; }
.leave-warning { background: #fffbeb; color: #d97706; }
.leave-info { background: #eff6ff; color: #2563eb; }
.leave-secondary { background: #f1f5f9; color: #64748b; }
[data-theme="dark"] .leave-primary { background: #312e81; color: #a5b4fc; }
[data-theme="dark"] .leave-danger { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .leave-warning { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .leave-info { background: #172554; color: #93c5fd; }
[data-theme="dark"] .leave-secondary { background: #1e293b; color: #94a3b8; }

/* ---------- 视图切换 ---------- */
.view-toggle {
  display: inline-flex;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.view-toggle-btn {
  padding: 7px 16px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
  font-weight: 500;
}
.view-toggle-btn:hover { color: var(--text-primary); }
.view-toggle-btn.active {
  background: var(--bg-secondary);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* ---------- 已取消行样式 ---------- */
.row-cancelled { opacity: 0.45; }
.row-cancelled td { text-decoration: line-through; }

/* ---------- 请假类型选择（单选胶囊式） ---------- */
.leave-type-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.leave-type-option { cursor: pointer; }
.leave-type-option input[type="radio"] { display: none; }
.leave-type-radio {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
  font-weight: 500;
}
.leave-type-option:hover .leave-type-radio {
  border-color: var(--primary);
  color: var(--primary);
}
.leave-type-option input[type="radio"]:checked + .leave-type-radio {
  border-color: transparent;
  font-weight: 600;
  color: #fff;
}
.leave-type-option input[type="radio"]:checked + .leave-type-radio.leave-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.leave-type-option input[type="radio"]:checked + .leave-type-radio.leave-danger { background: linear-gradient(135deg, #ef4444, #f87171); }
.leave-type-option input[type="radio"]:checked + .leave-type-radio.leave-warning { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.leave-type-option input[type="radio"]:checked + .leave-type-radio.leave-info { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.leave-type-option input[type="radio"]:checked + .leave-type-radio.leave-secondary { background: linear-gradient(135deg, #64748b, #94a3b8); }

/* ---------- 登记须知 ---------- */
.leave-notice {
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-left: 3px solid #3b82f6;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #0369a1;
  line-height: 1.7;
}
[data-theme="dark"] .leave-notice {
  background: linear-gradient(135deg, #0c4a6e, #075985);
  color: #7dd3fc;
}

/* ---------- 报工弹窗请假状态提示 ---------- */
.leave-status-alert { margin-top: 14px; }
.leave-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.leave-alert-icon { font-size: 20px; flex-shrink: 0; }
.leave-alert-content { flex: 1; }
.leave-alert-detail {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}
.leave-alert-hint {
  font-size: 12px;
  margin-top: 5px;
  opacity: 0.85;
  font-style: italic;
}
.leave-alert-danger {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
  color: #991b1b;
}
.leave-alert-warning {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  color: #92400e;
}
[data-theme="dark"] .leave-alert-danger { background: linear-gradient(135deg, #450a0a, #7f1d1d); border-color: #991b1b; color: #fca5a5; }
[data-theme="dark"] .leave-alert-warning { background: linear-gradient(135deg, #451a03, #78350f); border-color: #92400e; color: #fcd34d; }

/* ---------- 员工视角：我的请假横幅 ---------- */
.my-leave-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}
.my-leave-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  background: #f59e0b;
}
[data-theme="dark"] .my-leave-banner {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  border-color: #b45309;
}
.my-leave-icon { font-size: 32px; flex-shrink: 0; }
.my-leave-info { flex: 1; font-size: 13px; line-height: 1.7; }
.my-leave-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ---------- 请假日历视图（V3 修复版） ---------- */
.calendar-card {
  overflow: hidden;
}
.calendar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.calendar-title {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.calendar-title-icon { font-size: 22px; }
.calendar-title-text {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.calendar-nav-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.calendar-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.calendar-nav-btn:active { transform: translateY(0); }
.calendar-nav-today {
  width: auto;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.calendar-nav-today:hover {
  background: var(--primary-hover);
  color: #fff;
  border-color: var(--primary-hover);
}
/* 文字化月份切换按钮（"‹ 上月" / "下月 ›"） */
.calendar-nav-btn.calendar-nav-text {
  width: auto;
  min-width: 64px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.calendar-nav-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
}

/* 日历网格 - 关键修复：使用 display:contents 让子元素直接参与 grid */
.leave-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
}
/* 修复：calendarCells 包裹层不占格子，让内部日期格直接参与网格布局 */
#calendarCells {
  display: contents;
}
.calendar-weekday {
  background: var(--bg-tertiary);
  padding: 14px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}
.calendar-weekday.weekend { color: #ef4444; }
[data-theme="dark"] .calendar-weekday.weekend { color: #f87171; }

.calendar-cell {
  background: var(--bg-secondary);
  min-height: 100px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.calendar-cell:hover {
  background: var(--bg-hover);
  z-index: 1;
  box-shadow: inset 0 0 0 2px var(--primary);
}
.calendar-cell:hover .calendar-cell-add { opacity: 1; }
.calendar-empty {
  background: var(--bg-tertiary);
  cursor: default;
  opacity: 0.4;
}
.calendar-empty:hover {
  background: var(--bg-tertiary);
  box-shadow: none;
}
.calendar-weekend {
  background: rgba(239, 68, 68, 0.03);
}
[data-theme="dark"] .calendar-weekend { background: rgba(239, 68, 68, 0.05); }
.calendar-today {
  background: var(--primary-light) !important;
}
.calendar-has-leave {
  background: linear-gradient(180deg, #fffbeb 0%, var(--bg-secondary) 100%);
}
[data-theme="dark"] .calendar-has-leave {
  background: linear-gradient(180deg, #451a03 0%, var(--bg-secondary) 100%);
}

.calendar-cell-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.calendar-day-num {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}
.calendar-day-today {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}
.calendar-weekend .calendar-day-num { color: #ef4444; }
.calendar-weekend .calendar-day-today { color: #fff; }
.calendar-day-count {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.calendar-cell-add {
  margin-left: auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
  transition: var(--transition);
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
}
.calendar-cell-add:hover {
  background: var(--primary-hover);
  transform: scale(1.15);
}

.calendar-people {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow: hidden;
}
.calendar-person {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.75);
  overflow: hidden;
  transition: var(--transition);
}
.calendar-person:hover {
  background: rgba(255,255,255,0.95);
}
[data-theme="dark"] .calendar-person { background: rgba(0,0,0,0.3); }
.calendar-person-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.calendar-person-full .calendar-person-dot { background: #ef4444; }
.calendar-person-morning .calendar-person-dot { background: #f59e0b; }
.calendar-person-afternoon .calendar-person-dot { background: #3b82f6; }
.calendar-person-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-person-time {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-left: auto;
  flex-shrink: 0;
}
.calendar-person-more {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  padding: 3px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}
.calendar-person-more:hover {
  background: var(--bg-tertiary);
}

.calendar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}
.calendar-legend {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-full { background: #ef4444; }
.legend-morning { background: #f59e0b; }
.legend-afternoon { background: #3b82f6; }
.calendar-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .leave-overview {
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }
  .leave-overview-people {
    max-height: 100px;
  }
  .leave-overview-stats {
    width: 100%;
    justify-content: space-between;
    align-self: stretch;
  }
  .leave-stat-card {
    flex: 1;
    padding: 10px;
    min-width: 0;
  }
  .leave-stat-num { font-size: 22px; }

  /* 日历：防止横向溢出，收紧格子 */
  .leave-calendar {
    width: 100%;
    overflow-x: hidden;
  }
  .calendar-card-header {
    padding: 12px 14px;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .calendar-title { gap: 6px; min-width: 0; }
  .calendar-title-icon { font-size: 18px; }
  .calendar-title-text { font-size: 15px; white-space: nowrap; }
  .calendar-nav { flex-shrink: 0; }
  .calendar-weekday { padding: 8px 2px; font-size: 11px; }
  .calendar-cell { min-height: 70px; padding: 4px; }
  .calendar-cell-top { margin-bottom: 3px; gap: 3px; }
  .calendar-day-num { width: 20px; height: 20px; font-size: 11px; }
  .calendar-day-count { font-size: 9px; padding: 1px 5px; }
  .calendar-person { font-size: 10px; padding: 1px 3px; gap: 3px; }
  .calendar-person-time { display: none; }
  .calendar-cell-add { opacity: 1; width: 20px; height: 20px; font-size: 14px; }
  .calendar-card-header { padding: 14px 16px; }
  .calendar-footer {
    padding: 10px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .calendar-nav-btn { height: 32px; font-size: 13px; }
  .calendar-nav-btn.calendar-nav-text { min-width: 56px; padding: 0 10px; font-size: 12px; }
  .calendar-nav-today { padding: 0 12px; font-size: 12px; }
  /* 移动端滑动提示已废弃，不再显示 */
  .calendar-swipe-hint { display: none !important; }
}
/* 滑动提示：桌面端默认隐藏 */
.calendar-swipe-hint { display: none; }

/* ============================================================
   操作日志页面样式（V3 新增）
   ============================================================ */
.log-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.log-stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.log-stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.log-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.log-stat-card.primary::before { background: var(--primary); }
.log-stat-card.success::before { background: var(--success); }
.log-stat-card.warning::before { background: var(--warning); }
.log-stat-card.info::before { background: var(--info); }
.log-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.log-stat-card.primary .log-stat-icon { background: var(--primary-light); color: var(--primary); }
.log-stat-card.success .log-stat-icon { background: rgba(16,185,129,0.1); color: var(--success); }
.log-stat-card.warning .log-stat-icon { background: rgba(245,158,11,0.1); color: var(--warning); }
.log-stat-card.info .log-stat-icon { background: rgba(59,130,246,0.1); color: var(--info); }
.log-stat-info { flex: 1; }
.log-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}
.log-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

/* 日志时间线样式 */
.log-timeline {
  position: relative;
  padding-left: 28px;
}
.log-timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.log-timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.log-timeline-item:last-child { padding-bottom: 0; }
.log-timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.log-timeline-dot.create { border-color: var(--success); }
.log-timeline-dot.update { border-color: var(--warning); }
.log-timeline-dot.delete { border-color: var(--danger); }
.log-timeline-dot.cancel { border-color: var(--text-tertiary); }
.log-timeline-dot.login { border-color: var(--info); }
.log-timeline-dot.auto { border-color: var(--info); border-style: dashed; }
.log-timeline-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: var(--transition);
}
.log-timeline-content:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--primary-light);
}
.log-timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.log-timeline-user {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.log-timeline-role {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.log-timeline-action {
  font-size: 12px;
  font-weight: 600;
}
.log-timeline-time {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.log-timeline-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.log-timeline-detail {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'SF Mono', 'Consolas', monospace;
  word-break: break-all;
}
.log-timeline-ip {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 日志详情弹窗 */
.log-detail-section {
  margin-bottom: 16px;
}
.log-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.log-detail-value {
  font-size: 14px;
  color: var(--text-primary);
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  word-break: break-all;
}
.log-detail-json {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

/* ============================================================
   时间选择器样式（V3 新增）
   ============================================================ */
.time-range-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.time-range-group .form-input {
  flex: 1;
}
.time-range-separator {
  color: var(--text-tertiary);
  font-weight: 600;
  flex-shrink: 0;
}
.time-quick-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.time-quick-btn {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}
.time-quick-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.time-quick-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 自动恢复开关 */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.switch-label {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}
.switch-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { display: none; }
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .switch-slider {
  background: var(--primary);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* 已取消记录删除按钮 */
.btn-delete-perm {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 5px 10px;
  font-size: 12px;
}
.btn-delete-perm:hover {
  background: var(--danger);
  color: #fff;
}

/* 表格中时间段显示 */
.leave-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 2px;
}
.leave-time-badge .clock-icon { font-size: 11px; }

/* 快捷时间管理按钮 */
.time-quick-btn.time-quick-manage {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px dashed var(--border-color);
}
.time-quick-btn.time-quick-manage:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 预设时间段管理列表 */
.quick-time-list {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
}
.quick-time-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: var(--bg-secondary);
  transition: background 0.2s;
}
.quick-time-item:last-child { margin-bottom: 0; }
.quick-time-item:hover { background: var(--bg-tertiary); }
.quick-time-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quick-time-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}
.quick-time-range {
  font-size: 12px;
  color: var(--text-secondary);
}
.quick-time-delete {
  padding: 4px 10px;
  font-size: 12px;
  flex-shrink: 0;
}
.quick-time-add-form {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

/* 日历日期格点击手型 */
.calendar-cell[data-date] {
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s;
}
.calendar-cell[data-date]:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.calendar-cell[data-date]:active {
  transform: scale(0.98);
}

/* 请假记录行状态样式 */
.row-ended {
  opacity: 0.65;
}
.row-ended td {
  color: var(--text-secondary);
}
.row-pending {
  background: rgba(245, 158, 11, 0.05);
}

/* ============================================================
   V3.8 新增：可排序表头 / 批量操作 / 徽章 / ICP / 分组加深
   ============================================================ */

/* 可排序表头 */
.table thead th.th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.table thead th.th-sortable:hover {
  color: var(--primary);
}
.th-sortable-inner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sort-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-tertiary);
  background: var(--bg-tertiary, rgba(0,0,0,0.05));
  border: 1px solid transparent;
  transition: var(--transition);
}
th.th-sortable:hover .sort-arrow {
  color: var(--primary);
  border-color: var(--primary);
}
th.th-sortable.sort-asc .sort-arrow,
th.th-sortable.sort-desc .sort-arrow {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35);
}
th.th-sortable.sort-asc .sort-arrow::before { content: '↑'; }
th.th-sortable.sort-desc .sort-arrow::before { content: '↓'; }
th.th-sortable .sort-arrow::before { content: '↕'; }

/* 表单字段小字提示 */
.field-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-secondary, rgba(99,102,241,0.05));
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 6px 10px;
}

/* 工序多选标签（点选，可多选，彩色区分） */
.process-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.process-tag {
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border, #e5e7eb);
  background: #fff;
  color: var(--text-secondary);
  transition: all .18s ease;
  user-select: none;
}
.process-tag:hover { transform: translateY(-1px); }
.process-tag.p-jiexian, .process-tag.w-jiexian { color: #2563eb; border-color: #bfdbfe; background: #eff6ff; }
.process-tag.p-zhuangpei, .process-tag.w-zhuangpei { color: #059669; border-color: #bbf7d0; background: #ecfdf5; }
.process-tag.p-tongpai, .process-tag.w-tongpai { color: #d97706; border-color: #fde68a; background: #fffbeb; }
.process-tag.p-other, .process-tag.w-other { color: #64748b; border-color: #e2e8f0; background: #f8fafc; }
.process-tag.selected {
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}
.process-tag.p-jiexian.selected { background: #2563eb; }
.process-tag.p-zhuangpei.selected { background: #059669; }
.process-tag.p-tongpai.selected { background: #d97706; }
.process-tag.p-other.selected { background: #475569; }

/* 工种 / 工序 徽章（列表中彩色区分） */
.wt-badge, .proc-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  margin: 1px 2px;
}
.wt-badge.w-jiexian { background: #eff6ff; color: #2563eb; }
.wt-badge.w-zhuangpei { background: #ecfdf5; color: #059669; }
.wt-badge.w-tongpai { background: #fffbeb; color: #d97706; }
.wt-badge.w-other { background: #f1f5f9; color: #64748b; }
.proc-badge.p-jiexian { background: #eff6ff; color: #2563eb; }
.proc-badge.p-zhuangpei { background: #ecfdf5; color: #059669; }
.proc-badge.p-tongpai { background: #fffbeb; color: #d97706; }
.proc-badge.p-other { background: #f1f5f9; color: #64748b; }
[data-theme="dark"] .wt-badge.w-jiexian, [data-theme="dark"] .proc-badge.p-jiexian { background: rgba(37,99,235,0.18); color: #93c5fd; }
[data-theme="dark"] .wt-badge.w-zhuangpei, [data-theme="dark"] .proc-badge.p-zhuangpei { background: rgba(5,150,105,0.18); color: #6ee7b7; }
[data-theme="dark"] .wt-badge.w-tongpai, [data-theme="dark"] .proc-badge.p-tongpai { background: rgba(217,119,6,0.18); color: #fcd34d; }
[data-theme="dark"] .wt-badge.w-other, [data-theme="dark"] .proc-badge.p-other { background: rgba(100,116,139,0.18); color: #cbd5e1; }

/* 批量勾选 */
.th-checkbox, .td-checkbox {
  width: 40px;
  text-align: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
.row-check {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
  cursor: pointer;
}
tr.row-checked td {
  background: var(--primary-light) !important;
}

/* 批量操作浮动栏 */
.batch-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 13px;
}
.batch-bar.show { display: flex; }
.batch-bar .batch-count { font-weight: 600; }
.batch-bar .batch-actions { margin-left: auto; display: flex; gap: 8px; }
.batch-bar .btn-batch {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: var(--transition);
}
.batch-bar .btn-batch:hover { background: rgba(255,255,255,0.3); }
.batch-bar .btn-batch.danger { background: rgba(239,68,68,0.85); border-color: transparent; }
.batch-bar .btn-batch.danger:hover { background: #dc2626; }

/* 工种 / 更改单 徽章 */
.work-type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  white-space: nowrap;
}
[data-theme="dark"] .work-type-badge { color: #34d399; }
.change-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
  white-space: nowrap;
}
[data-theme="dark"] .change-badge { color: #a78bfa; }

/* 同日多项目分组行颜色加深（更突出） */
.report-group-row td {
  background: var(--primary-light) !important;
}
.table tbody tr.row-grouped td {
  background: rgba(99, 102, 241, 0.09) !important;
}
.table tbody tr.row-grouped:hover td {
  background: rgba(99, 102, 241, 0.14) !important;
}
[data-theme="dark"] .table tbody tr.row-grouped td {
  background: rgba(129, 140, 248, 0.14) !important;
}
[data-theme="dark"] .table tbody tr.row-grouped:hover td {
  background: rgba(129, 140, 248, 0.22) !important;
}

/* ICP 备案号 */
.icp-record {
  margin-top: 6px;
  font-size: 11px;
}
.icp-record a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: var(--transition);
}
.icp-record a:hover { color: var(--primary); }

/* 更改单/项目长名称完整显示不换行 */
.cell-ellipsis {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stat-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
}
.stat-name-full {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   V4.1 UI 重设计：排序表头 / 工序·工种标签 / 报工说明 / 表格呼吸感
   ============================================================ */

/* ---------- 排序表头：更精致的箭头 ---------- */
.table thead th.th-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  border-radius: 6px 6px 0 0;
  transition: background .18s ease, color .18s ease;
}
.table thead th.th-sortable:hover {
  color: var(--primary);
}
.th-sortable-inner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sort-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-tertiary);
  background: transparent;
  border: 1px solid var(--border, #e5e7eb);
  transition: all .18s ease;
  flex: 0 0 auto;
}
th.th-sortable:hover .sort-arrow {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light, rgba(99,102,241,0.08));
}
th.th-sortable.sort-asc .sort-arrow,
th.th-sortable.sort-desc .sort-arrow {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}
th.th-sortable.sort-asc .sort-arrow::before { content: '↑'; }
th.th-sortable.sort-desc .sort-arrow::before { content: '↓'; }
th.th-sortable:not(.sort-asc):not(.sort-desc) .sort-arrow::before { content: '↕'; opacity: .55; }

/* ---------- 工序 / 工种 多选标签：卡片式高级设计 ---------- */
.process-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.process-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border, #e5e7eb);
  background: var(--bg-secondary, #fff);
  color: var(--text-secondary);
  transition: all .18s ease;
  user-select: none;
  line-height: 1.2;
}
.process-tag .process-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
  flex: 0 0 auto;
}
.process-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.process-tag.p-jiexian, .process-tag.w-jiexian {
  color: #2563eb;
  border-color: #dbeafe;
  background: #f8fbff;
}
.process-tag.p-zhuangpei, .process-tag.w-zhuangpei {
  color: #059669;
  border-color: #d1fae5;
  background: #f6fefb;
}
.process-tag.p-tongpai, .process-tag.w-tongpai {
  color: #b45309;
  border-color: #fde9c8;
  background: #fffdf7;
}
.process-tag.p-other, .process-tag.w-other {
  color: #64748b;
  border-color: #e2e8f0;
  background: #f8fafc;
}
.process-tag.selected {
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
}
.process-tag.selected .process-tag-dot {
  background: #fff;
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
}
.process-tag.p-jiexian.selected, .process-tag.w-jiexian.selected {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.process-tag.p-zhuangpei.selected, .process-tag.w-zhuangpei.selected {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}
.process-tag.p-tongpai.selected, .process-tag.w-tongpai.selected {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}
.process-tag.p-other.selected, .process-tag.w-other.selected {
  background: linear-gradient(135deg, #64748b, #475569);
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.35);
}
[data-theme="dark"] .process-tag.p-jiexian { color: #93c5fd; border-color: rgba(37,99,235,.35); background: rgba(37,99,235,.08); }
[data-theme="dark"] .process-tag.p-zhuangpei { color: #6ee7b7; border-color: rgba(5,150,105,.35); background: rgba(5,150,105,.08); }
[data-theme="dark"] .process-tag.p-tongpai { color: #fcd34d; border-color: rgba(217,119,6,.35); background: rgba(217,119,6,.08); }
[data-theme="dark"] .process-tag.p-other { color: #cbd5e1; border-color: rgba(100,116,139,.35); background: rgba(100,116,139,.08); }

/* ---------- 表格呼吸感：行高宽松，长文本截断省略号（悬停/点击看全） ---------- */
.table tbody td {
  padding: 13px 20px;
  vertical-align: middle;
}
.table thead th {
  padding: 12px 20px;
}
/* 文本类列：单行截断，不再因长文本撑高行或挤竖排 */
.table .cell-content,
.table .cell-project,
.table .cell-ellipsis {
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
/* 工作内容列：整行点击看详情，这里不再额外加虚线/变色 */
.table .cell-content {
  cursor: default;
  color: var(--text-primary);
}
.table .cell-content:hover {
  color: var(--primary);
}
.table .cell-time {
  font-size: 12px;
  white-space: nowrap;
}
/* 所有文本单元格默认不换行，避免"成套一班"竖排 */
.table tbody td {
  white-space: nowrap;
}
/* 仅长文本列允许截断（上面已设 nowrap+ellipsis），其余列保持 nowrap */
.table .cell-allow-wrap {
  white-space: normal;
}

/* ---------- 报工说明弹窗 ---------- */
.guide-wrap { padding: 4px 0; }
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-item {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border-light, #eef2f7);
  border-radius: 12px;
  transition: box-shadow .18s ease;
}
.guide-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,0.05); }
.guide-item-index {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guide-item-field {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.guide-item-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.guide-tip {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.guide-edit-hint {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.guide-edit-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}
.guide-edit-item .gei-field { padding: 8px 10px; }
.guide-edit-item .gei-text { padding: 8px 10px; resize: vertical; }
.guide-edit-item .gei-del {
  align-self: start;
  padding: 6px 10px;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 768px) {
  .table thead th, .table tbody td { padding: 9px 10px; font-size: 12px; white-space: nowrap; }
  /* 移动端：表格设最小宽度，超出时横向滚动（右滑看完整内容和操作按钮） */
  .table { min-width: 720px; }
  .table-fixed, .table-auto { table-layout: auto; min-width: 720px; }
  .table-fixed thead th[data-col], .table-auto thead th { width: auto !important; min-width: 0 !important; }
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .table .cell-content, .table .cell-project { max-width: 160px; }
  .table .cell-time { font-size: 11px; }
  .process-picker { gap: 8px; }
  .process-tag { padding: 8px 12px; font-size: 13px; flex: 1 1 auto; justify-content: center; }
  .guide-item { padding: 12px; gap: 10px; }
  .guide-edit-item { grid-template-columns: 1fr; }
  .guide-edit-item .gei-del { width: 100%; }
}

/* ---------- V4.2 补充：登录页备案号移动端可见性 ---------- */
@media (max-width: 768px) {
  .login-right { padding-bottom: 28px; }
  .login-footer { margin-top: 20px; font-size: 11px; line-height: 1.8; }
  .icp-record { margin-top: 4px; font-size: 11px; }
  .icp-record a { color: var(--text-tertiary); }
}

/* ---------- V4.2 补充：长文本列省略号悬浮提示 ---------- */
.table .cell-ellipsis,
.table .cell-content,
.table .cell-project {
  text-overflow: ellipsis;
}

/* ---------- V4.2 补充：批量操作栏与卡片衔接 ---------- */
.table-wrapper {
  width: 100%;
}

/* ============================================================
   V4.3 报工列表固定列宽 + 详情弹窗
   ============================================================ */

/* 报工列表：固定布局，长文本不再撑开表格或行高 */
.table-fixed {
  table-layout: fixed;
}
.table-fixed thead th,
.table-fixed tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 12px 16px;
}
/* 报工列表各行可点击 */
.table-fixed tbody tr.report-row {
  transition: background 0.15s ease;
}
.table-fixed tbody tr.report-row:hover {
  background: var(--bg-hover);
}
/* V4.7：报工列表列宽改为「内联样式 + 超管可拖拽同步」。
   默认列宽由 JS defaultColWidths 控制；这里只保留弹性列与视觉细节。
   - 项目名称为弹性列，自动占满剩余空间
   - 工作内容列窄列显示（点击行看完整详情）
   - 排序表头不裁剪，避免「工作日期↕...」省略号 */
.table-fixed {
  font-size: 13px;
}
.table-fixed thead th,
.table-fixed tbody td {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
}
/* 弹性列：项目名称 */
.table-fixed .col-pname { min-width: 120px; }
/* 数字/时间列居中 */
.table-fixed .col-hours { text-align: center; }
.table-fixed .col-actions { text-align: center; }
.table-fixed .cell-time { font-size: 12px; }
/* 长文本列允许截断省略号 */
.table-fixed .cell-project,
.table-fixed .cell-content {
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 排序表头：不裁剪内容，箭头与标题完整显示 */
.table-fixed thead th.th-sortable {
  overflow: visible;
  text-overflow: clip;
}
.table-fixed thead th.th-sortable .th-sortable-inner {
  width: 100%;
  justify-content: flex-start;
}
/* 表格内徽标左对齐，与表头文字对齐（去掉左右外移） */
.table-fixed td .wt-badge,
.table-fixed td .proc-badge { margin: 1px 0; }
/* 批量勾选列宽度 */
.table-fixed .td-checkbox,
.table-fixed .th-checkbox { width: 38px; }

/* ============================================================
   V5.1 员工视图表格（table-auto）：自动布局，列宽按内容合理分配
   员工视图列：工作日期|项目编号|项目名称|更改单编号|工时|工序|工作内容|提交时间|操作
   ============================================================ */
.table-auto {
  table-layout: auto;
  width: 100%;
}
.table-auto thead th,
.table-auto tbody td {
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
/* 员工视图各列宽度比例：日期窄、编号中、项目名称宽、工时居中、操作列居中 */
.table-auto thead th:nth-child(1),
.table-auto tbody td:nth-child(1) { width: 100px; }  /* 工作日期 */
.table-auto thead th:nth-child(2),
.table-auto tbody td:nth-child(2) { width: 110px; }  /* 项目编号 */
.table-auto thead th:nth-child(3),
.table-auto tbody td:nth-child(3) { min-width: 120px; } /* 项目名称（弹性） */
.table-auto thead th:nth-child(4),
.table-auto tbody td:nth-child(4) { width: 120px; }  /* 更改单编号 */
.table-auto thead th:nth-child(5),
.table-auto tbody td:nth-child(5) { width: 70px; text-align: center; } /* 工时 */
.table-auto thead th:nth-child(6),
.table-auto tbody td:nth-child(6) { width: 110px; }  /* 当日工序 */
.table-auto thead th:nth-child(7),
.table-auto tbody td:nth-child(7) { min-width: 100px; } /* 工作内容 */
.table-auto thead th:nth-child(8),
.table-auto tbody td:nth-child(8) { width: 130px; font-size: 12px; color: var(--text-secondary); } /* 提交时间 */
.table-auto thead th:nth-child(9),
.table-auto tbody td:nth-child(9) { width: 110px; text-align: center; } /* 操作 */
/* 长文本列截断 */
.table-auto .cell-project,
.table-auto .cell-content {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
/* 汇总行不影响列宽 */
.table-auto .report-group-row td {
  background: var(--primary-light);
  padding: 8px 14px;
  white-space: normal;
}
.table-auto tbody tr.report-row {
  transition: background 0.15s ease;
}
.table-auto tbody tr.report-row:hover {
  background: var(--bg-hover);
}

/* ---------- 报工详情弹窗 ---------- */
.detail-wrap { padding: 4px 0; }
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: var(--primary-light);
  border-radius: 12px;
  margin-bottom: 16px;
}
.detail-header-date {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.detail-header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
}
.detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  word-break: break-all;
}
.detail-value-highlight {
  color: var(--primary);
}
.detail-value-mono {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-weight: 700;
}

/* 借调信息块（报工详情弹窗） */
.detail-transfer-block {
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.05));
}
.detail-transfer-title {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.12);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.detail-transfer-body {
  padding: 14px 16px;
}
.detail-transfer-flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.detail-transfer-flow .badge {
  font-size: 13px;
  padding: 4px 12px;
  font-weight: 600;
}
.detail-transfer-arrow {
  font-size: 18px;
  color: #7c3aed;
  font-weight: 700;
}
.detail-transfer-hint {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 高亮字段卡片 */
.detail-field-hours {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(99, 102, 241, 0.04));
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-left: 3px solid #4f46e5;
}
.detail-field-project-code {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.07), rgba(99, 102, 241, 0.02));
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-left: 3px solid #6366f1;
}
.detail-field-project-name {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.06), rgba(14, 165, 233, 0.02));
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-left: 3px solid #0ea5e9;
}
.detail-field-change {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-left: 3px solid #8b5cf6;
}
.detail-content-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.detail-content-title {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.detail-content-body {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
}
@media (max-width: 480px) {
  .detail-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   V4.6 新增样式：多天请假、借调管理、更改单详情
   ============================================================ */

/* 多天请假：天数选择器（紧凑，不占地方） */
.leave-days-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  margin-bottom: 18px;
  padding: 9px 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
}
/* 连续请假紧跟日期行时，日期行收起下边距，两者成为一个视觉组 */
.form-row:has(+ .leave-days-row) { margin-bottom: 6px; }
.leave-days-row .leave-days-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}
.leave-days-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
}
.leave-days-stepper button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.15s;
}
.leave-days-stepper button:hover { background: var(--bg-hover); }
.leave-days-stepper .leave-days-value {
  min-width: 44px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 32px;
}
.leave-days-preview {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-left: auto;
}
.leave-range-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
}

/* 借调管理 */
.transfer-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.transfer-banner.active {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--success);
}
.transfer-banner .transfer-arrow { font-size: 16px; font-weight: 700; }
.transfer-status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.transfer-status-dot.active { background: var(--success); }
.transfer-status-dot.expired { background: var(--text-tertiary); }
.transfer-status-dot.revoked { background: var(--danger); }

/* 更改单详情弹窗配色分区 */
.change-detail-section {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.change-detail-section.section-code {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
}
.change-detail-section.section-content {
  background: rgba(245, 158, 11, 0.08);
  border-left: 4px solid var(--warning);
}
.change-detail-section.section-meta {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--info);
}
.change-detail-section.section-remark {
  background: var(--bg-secondary);
  border-left: 4px solid var(--text-tertiary);
}
.change-detail-section .cds-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.change-detail-section .cds-value {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.change-detail-section .cds-value.big {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

/* 更改单详情：顶部头部（编号 + 状态 + 时间） */
.cd-detail-head {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--primary-light), rgba(99,102,241,0.04));
  border-radius: 12px;
  border: 1px solid rgba(99,102,241,0.15);
  margin-bottom: 14px;
}
.cd-detail-code {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: .3px;
  margin-bottom: 8px;
}
.cd-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cd-detail-time {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ============================================================
   V4.7 借调管理 UI
   ============================================================ */
.transfer-tip-banner {
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--primary-light);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  padding: 6px 12px;
  border-radius: 8px;
  align-self: center;
  line-height: 1.5;
}
.transfer-tip-banner b { color: var(--primary); font-weight: 700; }

/* 借调列表：移动端横向滚动 */
.transfer-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-transfer { min-width: 880px; }
.table-transfer td, .table-transfer th { white-space: nowrap; }
.table-transfer .transfer-reason-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.transfer-action-cell .btn { margin: 2px; }

/* 状态点 */
.transfer-status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.transfer-status-dot.active { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.transfer-status-dot.expired { background: #94a3b8; }
.transfer-status-dot.revoked { background: #ef4444; }

/* 只读显示原属班组 */
.form-selected-readonly {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.form-selected-readonly b { color: var(--primary); }

/* 借调详情弹窗 */
.transfer-detail-head { margin-bottom: 16px; }
.transfer-detail-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--primary-light);
  border-radius: 12px;
}
.transfer-detail-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.transfer-detail-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.transfer-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  transition: box-shadow 0.15s ease;
}
.detail-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.detail-item .detail-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-item .detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.detail-reason-box {
  background: rgba(99, 102, 241, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin-top: 8px;
}
.detail-reason-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.detail-reason-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
.transfer-detail-field {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light, var(--border));
  border-radius: 10px;
  padding: 10px 14px;
}
.tdf-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-tertiary);
  margin-bottom: 5px;
}
.tdf-value { font-size: 14px; color: var(--text-primary); }
.transfer-detail-reason {
  background: rgba(245,158,11,.08);
  border-left: 4px solid var(--warning);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
}
.tdf-reason {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 600px) {
  .transfer-detail-grid { grid-template-columns: 1fr; }
  .transfer-tip-banner {
    display: flex;
    align-items: flex-start;
    font-size: 12px;
    padding: 10px 14px;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
  }
}

/* ============================================
   统一详情弹窗样式标准 V6.0
   所有详情弹窗统一使用 dv-* 系列类
   ============================================ */

/* 弹窗头部：头像+姓名+状态 */
.dv-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
  border: 1px solid rgba(99,102,241,0.12);
  margin-bottom: 16px;
}
.dv-avatar {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(99,102,241,0.3);
}
.dv-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.dv-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 3px;
  font-weight: 500;
}
.dv-header-badges {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* 字段网格 */
.dv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 480px) {
  .dv-grid { grid-template-columns: 1fr; }
}

/* 单个字段卡片 */
.dv-field {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow 0.15s ease;
}
.dv-field:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.dv-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dv-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* 字段左边框语义色 */
.dv-blue    { border-left-color: #3b82f6; }
.dv-blue .dv-value { color: #2563eb; }
.dv-indigo  { border-left-color: #6366f1; }
.dv-indigo .dv-value { color: #4f46e5; font-family: 'SF Mono','Consolas',monospace; }
.dv-sky     { border-left-color: #0ea5e9; }
.dv-sky .dv-value { color: #0284c7; }
.dv-green   { border-left-color: #10b981; }
.dv-amber   { border-left-color: #f59e0b; }
.dv-purple  { border-left-color: #8b5cf6; }
.dv-purple .dv-value { color: #7c3aed; font-family: 'SF Mono','Consolas',monospace; }
.dv-violet  { border-left-color: #7c3aed; }
.dv-violet .dv-value { color: #6d28d9; font-size: 18px; font-weight: 700; }
.dv-slate   { border-left-color: #94a3b8; }
.dv-slate .dv-value { color: #64748b; font-weight: 500; }
.dv-rose    { border-left-color: #f43f5e; }
.dv-rose .dv-value { color: #e11d48; }

/* 整行字段（跨两列） */
.dv-field-full { grid-column: 1 / -1; }

/* 关键信息字段（项目编号/名称/更改单/工时等）：加粗 + 彩色左边框；
   颜色跟随各字段语义色（不强制黑字、不加紫色渐变底），保证一眼区分 */
.dv-grid .dv-field.dv-field-key > .dv-value {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.dv-grid .dv-field.dv-field-key {
  border-left-width: 4px;
}
.dv-grid .dv-field.dv-field-key > .dv-label {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 内容块（工作内容/事由等长文本） */
.dv-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.dv-block-label {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dv-block-body {
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* 借调信息块 */
.dv-transfer-block {
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(99, 102, 241, 0.05));
  margin-bottom: 16px;
}
.dv-transfer-title {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(139, 92, 246, 0.12);
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}
.dv-transfer-body { padding: 14px 16px; }
.dv-transfer-flow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.dv-transfer-arrow { font-size: 18px; color: #7c3aed; font-weight: 700; }
.dv-transfer-hint { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }

/* ============================================================
   小组管理卡片
   ============================================================ */
.group-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.group-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.group-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(139,92,246,0.06), rgba(99,102,241,0.04));
}
.group-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
.group-card-info { flex: 1; min-width: 0; }
.group-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.group-card-team {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.group-card-body { padding: 14px 16px; }
.group-stat-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.group-stat { text-align: center; }
.group-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}
.group-stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.group-stat-name {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-secondary);
}
.group-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}

/* ============================================================
   工时管理统计卡片
   ============================================================ */
.wh-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  text-align: center;
}
.wh-stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.wh-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}
.wh-back-bar { display: flex; align-items: center; }

/* ============================================================
   V6.4 新增样式：页面头部、小组卡片、班组树、统计卡片
   ============================================================ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header-left h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* 小组卡片网格 */
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.group-card-v2 {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.group-card-v2:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.group-card-v2-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(99,102,246,0.04));
}
.group-card-v2-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(139,92,246,0.35);
}
.group-card-v2-icon svg { width: 22px; height: 22px; }
.group-card-v2-info { flex: 1; min-width: 0; }
.group-card-v2-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.group-card-v2-team { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }
.group-card-v2-body { padding: 14px 16px; }
.group-stat-row { display: flex; align-items: center; gap: 20px; }
.group-stat-item { text-align: center; }
.group-stat-num { font-size: 24px; font-weight: 800; color: var(--text-primary); }
.group-stat-label { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.group-stat-divider { width: 1px; height: 30px; background: var(--border); }
.group-stat-leader { margin-left: auto; }
.group-stat-leader-label { font-size: 11px; color: var(--text-tertiary); }
.group-stat-leader-name { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-top: 2px; }
.group-card-v2-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
}

/* 班组树（V6.5 重设计：班组卡片 + 小组网格） */
.team-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.team-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.team-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.team-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(14,165,233,0.08));
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.team-card-icon svg { width: 21px; height: 21px; }
.team-card-info { flex: 1; min-width: 0; }
.team-card-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.team-card-count { font-size: 12px; color: var(--text-tertiary); margin-top: 3px; }
.team-card-count .count-num { color: #3b82f6; font-weight: 700; }
.team-card-actions { display: flex; gap: 8px; flex-shrink: 0; }
.team-card-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
  background: var(--bg-primary);
}
.group-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.group-chip:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}
.group-chip-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.group-chip-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 12px;
}
.group-chip-leader {
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-chip-leader::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}
.group-chip-leader.unset { color: var(--text-tertiary); }
.group-chip-leader.unset::before { background: #cbd5e1; }
.group-chip-members {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  padding: 1px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}
.group-chip-empty {
  grid-column: 1 / -1;
  padding: 22px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
@media (max-width: 640px) {
  .team-card-head { flex-wrap: wrap; }
  .team-card-actions { width: 100%; }
}

/* 统计卡片行 */
.stat-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.stat-card-label { font-size: 12px; color: var(--text-tertiary); margin-bottom: 6px; }
.stat-card-value { font-size: 28px; font-weight: 800; color: var(--text-primary); }
.stat-card-primary {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.06));
  border-color: rgba(99,102,241,0.2);
}
.stat-card-primary .stat-card-value { color: #6366f1; }

/* 状态 */
.loading-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 14px;
}
.error-state {
  padding: 40px 20px;
  text-align: center;
}
.error-icon { font-size: 36px; margin-bottom: 8px; }
.error-text { color: var(--text-secondary); font-size: 14px; }
.empty-state-large {
  padding: 60px 20px;
  text-align: center;
}
.empty-state-large .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-large .empty-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty-state-large .empty-desc { font-size: 13px; color: var(--text-tertiary); }

/* 表单提示 */
.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* 徽章补充 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.badge-success { background: rgba(16,185,129,0.12); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.12); color: #f59e0b; }
.badge-info { background: rgba(59,130,246,0.12); color: #3b82f6; }
.badge-secondary { background: rgba(100,116,139,0.12); color: #64748b; }

/* 危险描边按钮 */
.btn-danger-outline {
  border-color: rgba(239,68,68,0.3);
  color: #ef4444;
}
.btn-danger-outline:hover {
  background: rgba(239,68,68,0.08);
}

.mt-8 { margin-top: 8px; }
.text-primary { color: #6366f1; }

/* ============================================================
   V6.5 新增：工时管理页美化、卡片副标题、表格悬停
   ============================================================ */
.wh-placeholder {
  background: var(--bg-secondary);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
}
.wh-placeholder-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
  color: #6366f1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wh-placeholder-icon svg { width: 28px; height: 28px; }
.wh-placeholder-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.wh-placeholder-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

.stat-card-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-left: 3px;
}

.card-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.table-hover tbody tr {
  transition: background 0.12s ease;
}
.table-hover tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}
