﻿/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Primary palette */
  --primary: #0066cc;
  --primary-hover: #0052a3;
  --primary-light: #3b8cde;
  --primary-dark: #004080;
  --primary-ghost: #e8f2fc;

  /* Accent & semantic */
  --accent: #0ea5e9;
  --accent-light: #dbeafe;
  --success: #10b981;
  --success-light: #d1fae5;
  --success-bg: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --warning-bg: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --danger-bg: #fef2f2;
  --info: #6366f1;
  --info-light: #e0e7ff;
  --info-bg: #f5f3ff;

  /* Neutrals */
  --bg: #f1f5f9;
  --bg-alt: #f8fafc;
  --card: #ffffff;
  --text: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --divider: #e8ecf1;

  /* Layout */
  --sidebar-w: 230px;
  --topbar-h: 56px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);

  /* Transition */
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow: hidden;
}
.hidden { display: none !important; }

/* ===== 会话恢复遮罩（无感刷新）=====
   本地有未过期会话时，渲染前就把登录页藏掉、显示这个遮罩，
   等 restoreSession() 校验通过后直接进主界面，用户看不到登录页。 */
.boot-splash { display: none; }
html.session-resume .boot-splash {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 9999; gap: 18px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #1e4d8c 60%, #005bac 100%);
  color: #e2e8f0;
}
html.session-resume #loginPage { display: none !important; }
.boot-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.22);
  border-top-color: #7dd3fc;
  animation: bootSpin 0.9s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }
.boot-text { font-size: 14px; letter-spacing: 0.5px; opacity: 0.9; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 30%, #1e4d8c 60%, #005bac 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,102,204,0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(14,165,233,0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(99,102,241,0.15) 0%, transparent 50%);
  animation: loginBgPulse 8s ease-in-out infinite alternate;
}
@keyframes loginBgPulse {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}
.login-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 35%, rgba(255,255,255,0.03) 1px, transparent 1px),
    radial-gradient(circle at 85% 65%, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px, 100px 100px;
}
.login-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 48px 44px;
  width: 440px;
  max-width: 95vw;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.1);
  position: relative; z-index: 1;
  transition: transform var(--transition);
}
.login-card:hover { transform: translateY(-2px); }
.login-logo { text-align: center; margin-bottom: 36px; }
.logo-icon {
  font-size: 52px; margin-bottom: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px; border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-ghost), #e0f2fe);
  box-shadow: 0 8px 24px rgba(0,102,204,0.15);
}
.login-logo h1 { font-size: 21px; color: var(--primary-dark); font-weight: 700; letter-spacing: 0.5px; }
.login-logo p { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }
.login-form { margin-bottom: 8px; }
.login-form .form-group { margin-bottom: 22px; }
.login-form label {
  display: block; font-size: 13px; color: var(--text-secondary);
  margin-bottom: 8px; font-weight: 600; letter-spacing: 0.3px;
}
.login-form input {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border); border-radius: 10px;
  font-size: 15px; background: var(--bg-alt);
  transition: all var(--transition); outline: none;
}
.login-form input:hover { border-color: #cbd5e1; background: #fff; }
.login-form input:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(0,102,204,0.08);
}
.btn-login {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 700; cursor: pointer;
  letter-spacing: 6px;
  box-shadow: 0 4px 16px rgba(0,102,204,0.3);
  transition: all var(--transition);
}
.btn-login:hover {
  box-shadow: 0 6px 24px rgba(0,102,204,0.4);
  transform: translateY(-1px);
}
.btn-login:active { transform: translateY(0); }

/* 登录页响应式适配（网页版） */
@media (max-width: 480px) {
  .login-card {
    width: 100%;
    max-width: calc(100vw - 32px);
    padding: 32px 24px;
    border-radius: 16px;
  }
  .login-logo { margin-bottom: 28px; }
  .logo-icon { width: 64px; height: 64px; font-size: 40px; }
  .login-logo h1 { font-size: 18px; }
  .login-form .form-group { margin-bottom: 18px; }
  .login-form input { padding: 11px 14px; font-size: 14px; }
  .btn-login { padding: 12px; font-size: 15px; }
}

/* ===== Layout ===== */
.main-app { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar {
  height: var(--topbar-h);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, var(--primary-dark) 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  z-index: 100;
  position: relative;
}
.topbar::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 18px; cursor: pointer;
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.menu-toggle:hover { background: rgba(255,255,255,0.2); }
.brand {
  color: white; font-size: 17px; font-weight: 700;
  letter-spacing: 1px; display: flex; align-items: center; gap: 8px;
}
.topbar-right { display: flex; align-items: center; gap: 20px; }
.notify-bell {
  color: rgba(255,255,255,0.85); font-size: 20px; cursor: pointer; position: relative;
  padding: 6px; border-radius: 8px; transition: all var(--transition);
}
.notify-bell:hover { color: white; background: rgba(255,255,255,0.1); }
.badge {
  position: absolute; top: 0; right: 0;
  background: var(--danger); color: white; font-size: 10px;
  border-radius: 10px; padding: 0 5px; min-width: 18px; text-align: center;
  line-height: 18px; height: 18px; font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.user-info {
  color: rgba(255,255,255,0.9); font-size: 13px;
  padding: 6px 12px; background: rgba(255,255,255,0.08);
  border-radius: 8px; font-weight: 500;
}
.btn-logout {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9); padding: 7px 18px;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all var(--transition);
}
.btn-logout:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
}

/* ===== App Body ===== */
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0f172a 0%, #1a2744 40%, #0f172a 100%);
  flex-shrink: 0; overflow-y: auto;
  transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 10; border-right: 1px solid rgba(255,255,255,0.05);
}
.sidebar.collapsed { width: 60px; }
.nav-menu { list-style: none; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; margin: 2px 8px;
  color: rgba(255,255,255,0.6);
  cursor: pointer; border-radius: 8px;
  transition: all var(--transition);
  font-size: 14px; white-space: nowrap; overflow: hidden;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(0,102,204,0.4), rgba(14,165,233,0.25));
  color: white; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,102,204,0.2);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--accent), var(--primary));
}
.nav-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.nav-label { transition: opacity 0.2s; }

/* 侧边栏收起状态 */
.sidebar.collapsed .nav-item {
  padding: 11px 10px;
  justify-content: center;
}
.sidebar.collapsed .nav-icon { width: auto; }
.sidebar.collapsed .nav-label { display: none; }

/* 路径配置区域 */
.tf-path-config {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tf-path-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.tf-path-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 130px;
}
.tf-path-input {
  flex: 1;
  min-width: 200px;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text);
  font-family: inherit;
  transition: all var(--transition);
}
.tf-path-input:hover { border-color: #cbd5e1; }
.tf-path-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,102,204,0.06); outline: none; }
.tf-path-hint {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.content {
  flex: 1; overflow-y: auto; padding: 24px 24px 40px;
  background: var(--bg);
}

/* ===== Cards ===== */
.card {
  background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px;
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 16px; font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.card-title::before {
  content: '';
  display: block; width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  padding: 22px 20px; display: flex; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
  transition: all var(--transition);
  cursor: default;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
}
.stat-card:not(.success):not(.info):not(.danger):not(.warning)::before {
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.stat-card.success::before { background: linear-gradient(180deg, var(--success), #34d399); }
.stat-card.info::before { background: linear-gradient(180deg, var(--info), #818cf8); }
.stat-card.danger::before { background: linear-gradient(180deg, var(--danger), #f87171); }
.stat-card.warning::before { background: linear-gradient(180deg, var(--warning), #fbbf24); }
.stat-icon {
  font-size: 38px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}
.stat-info .stat-num {
  font-size: 30px; font-weight: 800; color: var(--text);
  line-height: 1; letter-spacing: -0.5px;
}
.stat-info .stat-label {
  font-size: 12px; color: var(--text-secondary); margin-top: 6px;
  font-weight: 500;
}

/* ===== Charts ===== */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px; margin-bottom: 24px;
}
.chart-card {
  background: var(--card); border-radius: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  padding: 24px; transition: box-shadow var(--transition);
}
.chart-card:hover { box-shadow: var(--shadow-md); }
.chart-card .card-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.chart-card .card-title::before {
  content: '';
  display: block; width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.chart-card canvas { max-height: 280px; }

/* ===== Table Toolbar ===== */
.table-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.table-toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table-toolbar-right { display: flex; align-items: center; gap: 8px; }
.table-search { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.table-search input, .table-search select {
  padding: 7px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 13px; outline: none;
  background: var(--bg-alt); color: var(--text);
  transition: all var(--transition);
}
.table-search input:hover, .table-search select:hover {
  border-color: #cbd5e1; background: #fff;
}
.table-search input:focus, .table-search select:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(0,102,204,0.06);
}
.table-search input::placeholder { color: var(--text-muted); }
#kwSearch { width: 140px; }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border-light); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead { position: sticky; top: 0; z-index: 2; }
thead tr { background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
th {
  padding: 12px 14px; text-align: left; font-weight: 700;
  color: var(--text-secondary); white-space: nowrap;
  border-bottom: 2px solid var(--border);
  font-size: 12px; letter-spacing: 0.3px;
  text-transform: uppercase;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle; color: var(--text);
}
tbody tr {
  transition: background var(--transition);
}
tbody tr:nth-child(even) { background: #fafbfc; }
tbody tr:hover { background: #eef5ff; }
.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; margin-top: 16px;
}
.pagination button {
  padding: 6px 14px; border: 1.5px solid var(--border);
  background: white; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  transition: all var(--transition);
}
.pagination button:hover:not(.active) {
  background: var(--bg-alt); border-color: var(--primary);
  color: var(--primary);
}
.pagination button.active {
  background: var(--primary); color: white; border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,102,204,0.25);
}
.page-info { font-size: 13px; color: var(--text-muted); padding: 0 4px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 16px; border-radius: 8px; border: none;
  cursor: pointer; font-size: 13px; font-weight: 600;
  transition: all var(--transition); white-space: nowrap;
  text-decoration: none; letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(0,102,204,0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 4px 14px rgba(0,102,204,0.3);
}
.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}
.btn-success:hover {
  box-shadow: 0 4px 14px rgba(16,185,129,0.3);
}
.btn-warning {
  background: linear-gradient(135deg, var(--warning), #d97706);
  color: white;
  box-shadow: 0 2px 8px rgba(245,158,11,0.2);
}
.btn-warning:hover {
  box-shadow: 0 4px 14px rgba(245,158,11,0.3);
}
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(239,68,68,0.2);
}
.btn-danger:hover {
  box-shadow: 0 4px 14px rgba(239,68,68,0.3);
}
.btn-info {
  background: linear-gradient(135deg, var(--info), #4f46e5);
  color: white;
  box-shadow: 0 2px 8px rgba(99,102,241,0.2);
}
.btn-info:hover {
  box-shadow: 0 4px 14px rgba(99,102,241,0.3);
}
.btn-outline {
  background: white; border: 1.5px solid var(--border); color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-ghost);
}
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 6px; }

/* ===== Status Tags ===== */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  letter-spacing: 0.2px;
}
.tag-todo { background: #f1f5f9; color: #64748b; }
.tag-doing { background: #eff6ff; color: #2563eb; }
.tag-done { background: #f0fdf4; color: #059669; }
.tag-overdue { background: #fef2f2; color: #dc2626; }
.tag-warn { background: #fffbeb; color: #d97706; }
.tag-pass { background: #f0fdf4; color: #059669; }
.tag-fail { background: #fef2f2; color: #dc2626; }
.tag-pending { background: #f5f3ff; color: #7c3aed; }

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative; z-index: 1; background: white;
  border-radius: 16px; padding: 32px 36px;
  width: 720px; max-width: 95vw; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.25s ease;
  border: 1px solid var(--border-light);
}
.modal-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--border-light);
  display: flex; align-items: center; gap: 10px;
}
.modal-title::before {
  content: ''; display: block; width: 4px; height: 20px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.modal-footer {
  margin-top: 28px; padding-top: 18px;
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: flex-end; gap: 12px;
}
.modal-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; font-size: 22px;
  color: var(--text-muted); cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg-alt); color: var(--text); }

/* ===== Forms ===== */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group label {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  display: flex; align-items: center; gap: 4px;
}
.form-group label .req { color: var(--danger); font-weight: 700; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px; border: 2px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none;
  transition: all var(--transition); font-family: inherit;
  background: var(--bg-alt); color: var(--text);
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #cbd5e1; background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(0,102,204,0.06);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-full { grid-column: 1 / -1; }
.form-section {
  grid-column: 1 / -1;
  font-size: 13px; font-weight: 700;
  color: var(--primary); padding: 10px 0 6px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 6px; letter-spacing: 0.3px;
  display: flex; align-items: center; gap: 6px;
}

/* ===== Flow Timeline ===== */
.flow-timeline {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0;
  padding: 16px 4px; overflow-x: auto;
}
.step-wrap { display: flex; align-items: center; }
.step-arrow {
  font-size: 16px; color: #cbd5e0; margin: 0 2px;
  line-height: 1; user-select: none; transition: color var(--transition);
}
.step-arrow.arrow-done { color: var(--success); }
.step-item {
  display: flex; flex-direction: column; align-items: center;
  min-width: 74px; max-width: 90px; cursor: default;
}
.step-circle {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; background: #f1f5f9;
  color: var(--text-muted); border: 2.5px solid var(--border);
  position: relative; z-index: 1; transition: all var(--transition);
}
.step-item.step-done .step-circle,
.step-item.done .step-circle {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white; border-color: var(--success);
  box-shadow: 0 4px 12px rgba(16,185,129,0.25);
}
.step-item.step-active .step-circle,
.step-item.active .step-circle {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,102,204,0.3);
  animation: stepPulse 2s infinite;
}
.step-item.step-todo .step-circle {
  background: white; color: var(--text-muted); border-color: var(--border);
}
.step-item.overdue .step-circle {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white; border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239,68,68,0.25);
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,102,204,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(0,102,204,0); }
}
.step-label {
  margin-top: 10px; font-size: 12px; text-align: center;
  color: var(--text-secondary); font-weight: 500; line-height: 1.4;
}
.step-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: center; }
.step-status { font-size: 11px; margin-top: 3px; font-weight: 500; }
.step-sub { font-size: 10px; color: var(--primary); margin-top: 2px; text-align: center; font-weight: 500; }

/* ===== Process Timeline (legacy) ===== */
.process-steps {
  display: flex; align-items: flex-start; overflow-x: auto;
  padding: 8px 0; gap: 0;
}

/* ===== Supervision ===== */
.supervision-list { display: flex; flex-direction: column; gap: 12px; }
.supervision-item {
  background: white; border-radius: 12px; padding: 16px 20px;
  border-left: 5px solid var(--warning);
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  transition: all var(--transition);
}
.supervision-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.supervision-item.danger { border-left-color: var(--danger); background: linear-gradient(90deg, #fef2f2 0%, white 10%); }
.supervision-item.info { border-left-color: var(--info); background: linear-gradient(90deg, #f5f3ff 0%, white 10%); }
.sup-content .sup-title { font-weight: 700; font-size: 14px; color: var(--text); }
.sup-content .sup-desc { font-size: 12px; color: var(--text-secondary); margin-top: 5px; line-height: 1.5; }
.sup-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ===== Assessment ===== */
.assessment-score {
  font-size: 54px; font-weight: 900; color: var(--primary);
  text-align: center; padding: 20px;
  letter-spacing: -1px;
}
.score-breakdown { display: flex; flex-direction: column; gap: 12px; }
.score-row { display: flex; align-items: center; gap: 14px; }
.score-row-label { min-width: 140px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.score-bar-bg {
  flex: 1; height: 10px; background: #e8ecf1;
  border-radius: 5px; overflow: hidden;
}
.score-bar {
  height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.score-bar.warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.score-bar.danger { background: linear-gradient(90deg, var(--danger), #f87171); }
.score-val { font-size: 14px; font-weight: 700; min-width: 50px; text-align: right; color: var(--text); }

/* ===== Assessment Tabs ===== */
.assess-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid var(--border);
  margin-bottom: 28px; flex-wrap: wrap;
  background: var(--card); border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-sm); padding: 6px 6px 0;
}
.assess-tab {
  padding: 11px 24px; font-size: 14px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer;
  border: none; background: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; border-radius: 10px 10px 0 0;
  position: relative;
}
.assess-tab:hover { color: var(--text); background: rgba(0,102,204,0.04); }
.assess-tab.active {
  color: var(--primary); border-bottom-color: var(--primary);
  background: linear-gradient(180deg, rgba(0,102,204,0.06), transparent);
}
.assess-tab .tab-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 10px;
  background: #e2e8f0; color: #64748b; margin-left: 4px;
  font-weight: 600; transition: all var(--transition);
}
.assess-tab.active .tab-badge {
  background: var(--primary); color: #fff;
}
.tab-panel { display: none; animation: fadeSlideIn 0.3s ease; }
.tab-panel.active { display: block; }
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Score Hero ===== */
.score-hero {
  display: grid; grid-template-columns: 220px 1fr;
  background: white; border-radius: 14px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  overflow: hidden; margin-bottom: 24px;
}
.score-hero-main {
  padding: 28px 20px; text-align: center;
  display: flex; flex-direction: column; justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
  border-right: 1px solid var(--border-light);
}
.score-hero-val {
  font-size: 56px; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.score-hero-sub { font-size: 13px; color: var(--text-secondary); margin-top: 6px; font-weight: 500; }
.score-hero-tag { margin-top: 12px; }
.score-hero-right {
  padding: 20px 24px; display: flex; flex-direction: column;
  gap: 16px; justify-content: space-between;
}
.score-hero-formula-area { display: flex; flex-direction: column; gap: 10px; }
.score-hero-formula {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.8; background: var(--bg-alt);
  padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--border-light);
}
.score-hero-formula b { color: var(--primary); }
.score-hero-meta {
  display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px;
}
.hero-meta-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 8px;
  background: var(--bg-alt); border: 1px solid var(--border-light);
  font-size: 11px; color: var(--text-secondary); font-weight: 500;
}
.hero-meta-item.ok { background: var(--success-bg); border-color: #a7f3d0; color: #065f46; }
.hero-meta-item.danger { background: var(--danger-bg); border-color: #fecaca; color: #991b1b; }

/* Units row in score hero */
.score-hero-units-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px; padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.sh-unit-card {
  background: var(--bg-alt); border-radius: 10px;
  padding: 12px 14px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.sh-unit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.sh-unit-card.sh-rank-1 {
  background: linear-gradient(135deg, #fffbeb, #fef3c7, #fff);
  border-color: #fbbf24;
  box-shadow: 0 2px 10px rgba(251,191,36,0.2);
}
.sh-unit-card.sh-rank-2 {
  background: linear-gradient(135deg, #f8fafc, #e8ecf1);
  border-color: #cbd5e1;
}
.sh-unit-card.sh-rank-3 {
  background: linear-gradient(135deg, #fff7ed, #fee2d5, #fff);
  border-color: #fb923c;
}
.sh-unit-rank { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.sh-unit-body { min-width: 0; flex: 1; }
.sh-unit-name {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sh-unit-combined {
  font-size: 22px; font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sh-unit-combined .sh-unit-unit { font-size: 11px; font-weight: 600; margin-left: 1px; }
.sh-unit-details { display: flex; gap: 8px; margin-top: 2px; }
.sh-unit-details span { font-size: 11px; font-weight: 600; }

/* ===== Assessment Tables ===== */
.assess-table {
  width: 100%; font-size: 13px; border-collapse: collapse;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border-light);
}
.assess-table th {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  padding: 11px 14px; text-align: left;
  border-bottom: 2px solid var(--border); font-size: 12px;
  font-weight: 700; color: var(--text-secondary); white-space: nowrap;
}
.assess-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); }
.assess-table tbody tr { transition: background var(--transition); }
.assess-table tbody tr:nth-child(even) { background: #fafbfc; }
.assess-table tbody tr:hover { background: #eef5ff; }
.assess-table tbody tr.row-warn { background: #fffdf5; }
.assess-table tbody tr.row-warn:hover { background: #fff9e6; }
.assess-table td[onclick] {
  cursor: pointer; transition: all var(--transition);
}
.assess-table td[onclick]:hover {
  background: #dbeafe !important; color: var(--primary);
  position: relative; z-index: 1;
  box-shadow: 0 2px 8px rgba(0,102,204,0.12);
}
.assess-table .tc { text-align: center; }
.assess-table .num-strong { font-weight: 700; color: #059669; }
.assess-table .num-strong.green { color: #059669; }

/* Mini bar */
.mini-bar {
  display: inline-flex; align-items: center; gap: 8px;
}
.mini-bar-fill {
  width: 60px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--success), #34d399);
  transition: width 0.6s ease;
}
.mini-bar-val { font-size: 12px; font-weight: 700; color: var(--text); }

/* ===== Process Detail ===== */
.process-stages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.stage-card {
  background: white; border-radius: 12px;
  box-shadow: var(--shadow); border: 1px solid var(--border-light);
  padding: 18px; border-top: 4px solid var(--border);
  display: flex; flex-direction: column; gap: 12px;
  transition: all var(--transition);
}
.stage-card:hover { box-shadow: var(--shadow-md); }
.stage-card.active {
  border-top-color: var(--primary);
  background: linear-gradient(180deg, rgba(0,102,204,0.02), white);
}
.stage-card.done { border-top-color: var(--success); }
.stage-card.overdue { border-top-color: var(--danger); background: linear-gradient(180deg, #fef2f2, white); }
.stage-card.warn { border-top-color: var(--warning); background: linear-gradient(180deg, #fffbeb, white); }
.stage-header { display: flex; justify-content: space-between; align-items: center; }
.stage-name { font-weight: 700; font-size: 15px; color: var(--text); }
.stage-fields { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.stage-fields .field-row { display: flex; gap: 8px; }
.stage-fields .field-label { min-width: 85px; color: var(--text-muted); font-weight: 500; }
.stage-fields .field-val { color: var(--text); font-weight: 500; }
.stage-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ===== Import Zone ===== */
.import-zone {
  border: 2.5px dashed var(--border); border-radius: 14px;
  padding: 48px; text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-alt);
}
.import-zone:hover {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(0,102,204,0.02), rgba(14,165,233,0.02));
}
.import-zone .upload-icon { font-size: 52px; margin-bottom: 16px; }
.import-zone p { color: var(--text-secondary); font-size: 15px; font-weight: 500; }
.import-zone .hint {
  font-size: 12px; color: var(--text-muted); margin-top: 10px;
  background: var(--card); padding: 8px 16px; border-radius: 8px;
  display: inline-block;
}

/* ===== Notify Drawer ===== */
.notify-drawer {
  position: fixed; right: 0; top: var(--topbar-h); bottom: 0;
  width: 380px; background: white; box-shadow: -8px 0 30px rgba(0,0,0,0.12);
  z-index: 500; display: flex; flex-direction: column;
  border-left: 1px solid var(--border-light);
  animation: drawerSlideIn 0.25s ease;
}
@keyframes drawerSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.notify-header {
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 15px; color: var(--text);
}
.notify-header button {
  background: none; border: none; font-size: 20px; cursor: pointer;
  color: var(--text-muted); width: 28px; height: 28px;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.notify-header button:hover { background: var(--bg-alt); color: var(--text); }
.notify-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.notify-card {
  background: var(--warning-bg); border-radius: 10px;
  padding: 14px 16px; border-left: 4px solid var(--warning);
  transition: all var(--transition);
}
.notify-card:hover { box-shadow: var(--shadow); }
.notify-card.danger { background: var(--danger-bg); border-left-color: var(--danger); }
.notify-card .nc-title { font-weight: 700; font-size: 13px; color: var(--text); }
.notify-card .nc-desc {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 5px; line-height: 1.6;
}

/* ===== Upload Zone ===== */
.upload-zone {
  border: 2.5px dashed #cbd5e1; border-radius: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  transition: all var(--transition);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(0,102,204,0.03), rgba(14,165,233,0.03));
}
.upload-zone-icon { font-size: 36px; margin-bottom: 6px; }
.upload-zone-text { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.upload-zone-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

/* ===== File Preview List ===== */
.file-preview-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.file-preview-item {
  position: relative; border: 1px solid var(--border-light);
  border-radius: 10px; overflow: hidden;
  width: 100px; height: 100px; flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.file-preview-item:hover { box-shadow: var(--shadow); }
.file-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.file-preview-item .file-preview-placeholder {
  width: 100%; height: 100%; display: flex;
  align-items: center; justify-content: center;
  background: var(--bg-alt); font-size: 28px;
}
.file-preview-item .file-preview-name {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: white; font-size: 10px;
  padding: 16px 6px 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.file-preview-item .file-preview-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(239,68,68,0.9); color: white;
  border: none; cursor: pointer; font-size: 13px;
  line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: all var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.file-preview-item .file-preview-del:hover {
  background: var(--danger); transform: scale(1.1);
}

/* ===== Attached Files ===== */
.attached-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attached-file-item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; background: var(--info-bg);
  border: 1px solid #c7d2fe; border-radius: 8px;
  font-size: 12px; color: #4338ca; cursor: pointer;
  max-width: 220px; text-decoration: none;
  transition: all var(--transition); font-weight: 500;
}
.attached-file-item:hover {
  background: var(--info-light); border-color: #a5b4fc;
}
.attached-file-thumb {
  width: 38px; height: 38px; border-radius: 6px;
  object-fit: cover; border: 1px solid var(--border-light);
  cursor: pointer; transition: all var(--transition);
}
.attached-file-thumb:hover { box-shadow: var(--shadow-md); }

/* ===== Unit Stats Table ===== */
.unit-stats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.unit-stats-table th {
  text-align: left; padding: 11px 16px;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  color: var(--text-secondary); font-weight: 700;
  border-bottom: 2px solid var(--border); font-size: 12px;
}
.unit-stats-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.unit-stats-table tbody tr:nth-child(even) { background: #fafbfc; }
.unit-stats-table tbody tr:hover td { background: #eef5ff; }

/* ===== Permission Grid ===== */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px; padding: 16px;
  background: var(--bg-alt); border-radius: 10px;
  border: 1px solid var(--border-light);
}
.perm-check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border-light);
  border-radius: 8px; cursor: pointer;
  transition: all var(--transition); user-select: none;
  background: white;
}
.perm-check-item:hover {
  background: var(--primary-ghost); border-color: #93c5fd;
}
.perm-check-item input[type=checkbox] {
  width: 16px; height: 16px; accent-color: var(--primary);
}
.perm-icon { font-size: 18px; }
.perm-label { font-size: 13px; font-weight: 600; color: var(--text); }
.perm-badge {
  display: inline-block; font-size: 11px; color: #1e40af;
  background: var(--info-light); padding: 3px 8px; border-radius: 6px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 500;
}

/* ===== Account Group ===== */
.account-group {
  margin-bottom: 14px; border: 1px solid var(--border-light);
  border-radius: 12px; overflow: hidden; background: #fff;
  box-shadow: var(--shadow-sm);
}
.group-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; cursor: pointer; user-select: none;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  transition: background var(--transition);
}
.group-header:hover { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
.group-icon { font-size: 18px; }
.group-name { font-weight: 700; color: var(--text); flex: 1; font-size: 14px; }
.group-count {
  font-size: 12px; color: var(--text-secondary);
  background: #e2e8f0; padding: 2px 12px; border-radius: 12px;
  font-weight: 600;
}
.group-arrow {
  font-size: 12px; color: var(--text-muted);
  transition: transform var(--transition);
  width: 22px; text-align: center;
}
.group-body { padding: 14px 18px; border-top: 1px solid var(--border-light); }

/* ===== Sub-stage rows ===== */
.sub-stages-wrap {
  margin-top: 10px; background: var(--bg-alt);
  border-radius: 10px; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  border-left: 3px solid var(--primary-light);
}
.sub-stage-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 14px; border-radius: 8px; background: white;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}
.sub-stage-row.sub-done {
  border-left: 3px solid var(--success);
  background: linear-gradient(90deg, #f0fdf4, white);
}
.sub-stage-row.sub-active {
  border-left: 3px solid var(--primary);
  background: linear-gradient(90deg, #eff6ff, white);
}
.sub-stage-row.sub-todo { opacity: 0.6; }
.sub-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.sub-content { flex: 1; }
.sub-label { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.sub-info {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 4px; line-height: 1.6;
}

/* ===== File tag ===== */
.file-tag {
  background: var(--info-bg); color: #3730a3;
  padding: 2px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 500;
}

/* ===== Progress Bar ===== */
.progress-bar-wrap {
  background: #e8ecf1; border-radius: 6px;
  height: 8px; overflow: hidden; min-width: 80px;
}
.progress-bar-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.6s ease;
}
.progress-bar-fill.warning { background: linear-gradient(90deg, var(--warning), #fbbf24); }
.progress-bar-fill.danger { background: linear-gradient(90deg, var(--danger), #f87171); }

/* ===== Spinner ===== */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid #e2e8f0; border-top-color: var(--primary);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}

/* ===== Process Stages Flow ===== */
.process-stages-flow { margin-bottom: 4px; }

/* ===== Tower Fee Specific Styles ===== */

/* 绱у噾绛涢€夋爮 - 涓€琛屾帓鍒?*/
.tf-filter-bar-compact {
  display: flex; align-items: center; gap: 10px;
  background: white; border: 1px solid var(--border-light);
  border-radius: 12px; padding: 14px 20px; margin-bottom: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.tf-filter-bar-compact input,
.tf-filter-bar-compact select {
  padding: 6px 10px; border: none !important;
  border-radius: 6px; font-size: 12.5px; outline: none;
  background: var(--bg-alt) !important; color: var(--text);
  transition: all var(--transition); font-family: inherit;
  min-width: 0; flex: 1; box-shadow: none !important;
}
.tf-filter-bar-compact input { min-width: 120px; max-width: 180px; }
.tf-filter-bar-compact select { min-width: 100px; max-width: 140px; }
.tf-filter-bar-compact input:hover,
.tf-filter-bar-compact select:hover { border-color: #cbd5e1; }
.tf-filter-bar-compact input:focus,
.tf-filter-bar-compact select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.06); }
.tf-filter-bar-compact input::placeholder { color: var(--text-muted); font-size: 11px; }
.tf-filter-count {
  font-size: 11px; color: var(--text-muted); margin-left: auto;
  white-space: nowrap; padding: 3px 8px; background: white;
  border-radius: 6px; border: 1px solid var(--border-light);
}

/* 濉旇垂琛ㄦ牸涓撶敤锛氱揣鍑戝竷灞€锛屾棤妯悜婊氬姩 */
.tf-table-wrap {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}
.tf-table-wrap table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.tf-table-wrap thead { position: sticky; top: 0; z-index: 2; }
.tf-table-wrap thead tr { background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
.tf-table-wrap th {
  padding: 8px 6px;
  text-align: left;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tf-table-wrap td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tf-table-wrap tbody tr { transition: background var(--transition); }
.tf-table-wrap tbody tr:nth-child(even) { background: #fafbfc; }
.tf-table-wrap tbody tr:hover { background: #eef5ff; }

/* 绱у噾鍚嶇О */
.tf-name {
  font-size: 12px; font-weight: 600; color: var(--text);
  display: block; max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 濉斿瀷鏍囩 */
.tf-tower-tag {
  display: inline-flex; align-items: center;
  padding: 1px 5px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
  background: var(--warning-light); color: #92400e;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

/* 浜у搧閰嶇疆绮剧畝鏄剧ず */
.tf-config-short {
  font-size: 11px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 85px;
}

/* 绱у噾鎸夐挳 */
.tf-btn-compact {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 500;
  border: 1px solid transparent; cursor: pointer; transition: all var(--transition);
  white-space: nowrap; background: var(--primary); color: white;
  line-height: 1.4;
}
.tf-btn-compact:hover { opacity: 0.85; }
.tf-btn-compact:active { transform: scale(0.97); }
.tf-btn-compact.outline {
  background: white; color: var(--text-secondary); border-color: var(--border);
}
.tf-btn-compact.outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ghost); }
.tf-btn-compact.primary { background: var(--primary); color: white; }

/* 鎻愮ず鏂囧瓧 */
.tf-hint-warn {
  font-size: 10px; color: var(--warning); font-weight: 500;
  display: block; white-space: nowrap;
}

/* 鍗犱綅绗︽枃鏈?*/
.tf-placeholder {
  font-size: 10px; color: var(--text-muted);
  display: block; white-space: nowrap;
}

/* 寰界珷 */
.tf-badge {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; white-space: nowrap;
  line-height: 1.4;
}
.tf-badge-green { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.tf-badge-blue { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.tf-badge-orange { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }

/* 鏂囦欢鍚?*/
.tf-file-name {
  display: block; font-size: 9px; color: var(--text-muted);
  margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 骞村害濉旇垂 */
.tf-annual-fee {
  font-size: 12px; font-weight: 700; color: var(--primary);
  white-space: nowrap;
}
.tf-annual-unit {
  font-size: 9px; color: var(--text-muted);
  white-space: nowrap;
}

/* 鐘舵€佹爣绛?*/
.tf-status-wrap {
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
}
.tf-status-tag {
  display: inline-flex; align-items: center;
  padding: 1px 5px; border-radius: 4px;
  font-size: 10px; font-weight: 600; white-space: nowrap;
  background: #f1f5f9; color: var(--text-muted); border: 1px solid #e2e8f0;
  line-height: 1.4;
}
.tf-status-tag.done { background: #f0fdf4; color: #065f46; border-color: #a7f3d0; }
.tf-status-tag.warn { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.tf-status-tag.err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.tf-calc-time {
  font-size: 9px; color: var(--text-muted);
  white-space: nowrap;
}

/* 杈撳叆妗?*/
.tf-input-sm {
  font-size: 11px; padding: 2px 5px; border: 1px solid var(--border);
  border-radius: 4px; width: 70px; text-align: right;
  outline: none; transition: all var(--transition); font-family: inherit;
}
.tf-input-sm:hover { border-color: #cbd5e1; }
.tf-input-sm:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,102,204,0.06); }

/* 璁＄畻鏃堕棿 */
.tf-calc-time {
  font-size: 9px; color: var(--text-muted); white-space: nowrap;
}

/* 鏌ョ湅閾炬帴 */
.tf-link {
  font-size: 10px; color: var(--primary); font-weight: 500;
  text-decoration: none; transition: all var(--transition);
  white-space: nowrap;
}
.tf-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* 鍏宠仈鍚堝悓涓嬫媺 */
#towerFeeTableBody select {
  padding: 2px 5px; border: 1px solid var(--border);
  border-radius: 4px; font-size: 11px; outline: none;
  background: white; max-width: 80px;
  transition: all var(--transition);
}
#towerFeeTableBody select:hover { border-color: #cbd5e1; }
#towerFeeTableBody select:focus { border-color: var(--primary); }

.tf-input-sm:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,102,204,0.06); }

/* ============================================================
   维护阶段考核页面样式（mt = maintenance）
   ============================================================ */
.mt-page {
  margin-bottom: 20px;
}

/* 顶部标题栏 */
.mt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 16px;
}
.mt-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt-header-icon { font-size: 20px; }
.mt-header-title {
  font-size: 17px; font-weight: 700; color: var(--text);
}
.mt-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 选择器 & 按钮 */
.mt-sel {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  background: white;
  outline: none;
  cursor: pointer;
  transition: all var(--transition);
}
.mt-sel:hover { border-color: #94a3b8; }
.mt-sel:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,102,204,0.08); }

.mt-btn-save {
  background: linear-gradient(135deg, #0070c0, #005a9e);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.mt-btn-save:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,112,192,0.25); }
.mt-btn-save:active { transform: scale(0.97); }

.mt-btn-del {
  color: #dc2626;
  background: white;
  border: 1.5px solid #fca5a5;
  border-radius: 8px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.mt-btn-del:hover { background: #fef2f2; border-color: #dc2626; }

.mt-no-perm {
  text-align: center;
  padding: 12px;
  margin-bottom: 10px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #92400e;
  font-size: 13px;
}
.mt-no-perm p { margin: 0; }

/* 两栏布局 */
.mt-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .mt-body { grid-template-columns: 1fr; }
}

/* 卡片容器 */
.mt-card {
  background: white;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mt-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid var(--border-light);
}
.mt-card-head--warn {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}
.mt-card-icon { font-size: 15px; flex-shrink: 0; }
.mt-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

/* 表格通用 */
.mt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.mt-table th {
  padding: 9px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border-bottom: 1.5px solid var(--border);
  color: var(--text-secondary);
  background: #fafbfc;
}
.mt-table td {
  padding: 9px 12px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text);
}
.mt-table tbody tr:hover { background: #fafbfc; }

/* 指标表格专用列 */
.mt-dim-row .mt-cell-label {
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  min-width: 110px;
}
.mt-cell-desc {
  color: var(--text-muted);
  font-size: 11.5px;
  min-width: 100px;
}
.mt-cell-score {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
  min-width: 45px;
}
.mt-cell-input { min-width: 80px; }

/* 扣分表格专用列 */
.mt-ded-row .mt-ded-label {
  font-weight: 650;
  color: #dc2626;
  white-space: nowrap;
  font-size: 12px;
  max-width: 150px;
  line-height: 1.4;
}
.mt-cell-cap {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
  text-align: center;
  min-width: 55px;
}
.mt-cell-rmk { min-width: 160px; }

/* 输入框样式 */
.mt-table input[type="number"] {
  width: 72px;
  padding: 5px 8px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  outline: none;
  transition: all var(--transition);
  font-family: inherit;
  background: white;
}
.mt-table input[type="number"]:hover { border-color: #cbd5e1; }
.mt-table input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.08);
}
.mt-table-deduct input[type="number"] {
  border-color: #fecaca;
}
.mt-table-deduct input[type="number"]:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.06);
}

.mt-table input[type="text"] {
  width: 100%;
  padding: 5px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
  transition: all var(--transition);
  font-family: inherit;
  background: white;
  box-sizing: border-box;
}
.mt-table input[type="text"]:hover { border-color: #cbd5e1; }
.mt-table input[type="text"]:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148,163,184,0.08);
}

/* 费用输入区 */
.mt-fee-group { padding: 14px 16px; }
.mt-fee-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.4;
}
.mt-fee-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: all var(--transition);
  font-family: inherit;
  box-sizing: border-box;
  background: #fafbfc;
}
.mt-fee-input:hover { border-color: #94a3b8; background: white; }
.mt-fee-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,204,0.08);
  background: white;
}

/* 得分预览卡片 */
.mt-preview-card {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.mt-preview-header {
  padding: 10px 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-bottom: 1px solid #bfdbfe;
}
.mt-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
}
.mt-preview-body { padding: 14px 16px; }

.mt-score-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mt-score-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 550;
}
.mt-score-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.mt-score-value small {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.mt-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.mt-detail-tag {
  display: inline-block;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 5px;
  font-size: 11px;
  color: #475569;
  font-weight: 500;
  white-space: nowrap;
}
.mt-detail-tag--deduct {
  background: #fef2f2;
  color: #991b1b;
}
.mt-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e2e8f0, transparent);
  margin: 12px 0;
}
.mt-rule-text {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.mt-penalty-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1.5px dashed #e2e8f0;
}
.mt-penalty-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}
.mt-penalty-amount {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.mt-empty-state {
  text-align: center;
  padding: 24px 16px;
  color: #94a3b8;
  font-size: 13px;
}
.mt-empty-state p { margin: 0; }

/* 罚金规则速查卡片 */
.mt-rule-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 12px 16px;
}
.mt-rule-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 8px;
}
.mt-rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.mt-rule-list li {
  font-size: 11px;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mt-rule-list li b {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 38px;
  text-align: center;
  flex-shrink: 0;
}
.mt-rule-ok { background: #bbf7d0; color: #166534; }
.mt-rule-mid { background: #fef9c3; color: #854d0e; }
.mt_rule-bad { background: #fed7aa; color: #9a3412; } /* 兼容下划线命名 */
.mt-rule-worst { background: #fecaca; color: #991b1b; }

/* ============================================================
   基站列表页面样式（stl = station list）
   ============================================================ */
.stl-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
/* 顶部标题栏 */
.stl-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  gap: 12px; flex-wrap: wrap;
}
.stl-header-left { display: flex; align-items: center; gap: 10px; }
.stl-title { font-size: 15px; font-weight: 700; color: var(--text); }
.stl-hint { font-size: 11px; color: var(--text-muted); background: white; padding: 2px 10px; border-radius: 10px; border: 1px solid var(--border-light); }
.stl-header-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 按钮统一样式 */
.stl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer;
  transition: all 0.2s ease; white-space: nowrap; gap: 4px;
}
.stl-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.stl-btn:active { transform: scale(0.97); }
.stl-btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.stl-btn-warn { background: linear-gradient(135deg, var(--warning), #d97706); color: white; }
.stl-btn-danger { background: linear-gradient(135deg, var(--danger), #dc2626); color: white; }
.stl-btn-outline { background: white; color: var(--text-secondary); border-color: var(--border); }
.stl-btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ghost); }
/* 筛选栏 */
.stl-filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; margin-bottom: 14px;
  background: white; border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.stl-filter-item {
  display: flex; align-items: center; gap: 5px;
  position: relative;
  background: var(--bg-alt);
  border-radius: 9px;
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.stl-filter-item:hover {
  background: white;
  border-color: #c7d9ef;
  box-shadow: 0 1px 4px rgba(0,102,204,0.06);
}
.stl-filter-icon { font-size: 13px; opacity: 0.55; }
.stl-filter-item input,
.stl-filter-item select {
  padding: 6px 10px; border: none !important;
  border-radius: 6px; font-size: 12.5px; outline: none;
  background: transparent !important; color: var(--text);
  transition: all 0.2s ease; min-width: 0;
  box-shadow: none !important;
}
.stl-filter-item input:focus,
.stl-filter-item select:focus {
  border-color: var(--primary); background: white !important;
}
.stl-filter-item input { width: 160px; }
.stl-filter-item select { min-width: 100px; cursor: pointer; }
/* 表格容器 */
.stl-table-wrap {
  overflow-x: auto;
}
/* 表格主体 */
.stl-table {
  width: 100%; border-collapse: collapse;
  font-size: 12px; table-layout: fixed;
}
.stl-table thead { position: sticky; top: 0; z-index: 3; }
.stl-table thead tr {
  background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
}
.stl-table th {
  padding: 11px 8px; text-align: center; font-weight: 700;
  font-size: 13px; color: #334155;
  letter-spacing: 0.5px; white-space: nowrap;
  border-bottom: 2px solid var(--primary);
}
.stl-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle; text-align: center; color: var(--text);
  transition: background 0.15s ease;
}
/* 基站名称列保持左对齐 */
.stl-td-name, .stl-table td:first-child { text-align: left !important; }
.stl-table tbody tr:nth-child(even) { background: #fafcfe; }
.stl-table tbody tr:hover { background: #eef4ff; }
/* 列宽定义 */
.stl-th-name  { width: 24%; text-align: left; }
.stl-th-district { width: 6%; }
.stl_th-type    { width: 11%; }
.stl_th-height   { width: 6%; }
.stl_th-unit     { width: 10%; }
.stl_th-stage    { width: 15%; }
.stl_th-status    { width: 9%; }
.stl_th-ops      { width: 13%; }
.stl_th-status    { width: 9%; text-align: center; }
.stl_th-ops      { width: 13%; text-align: center; }
/* 序号列：居中、窄列宽，覆盖 first-child 的左对齐 */
.stl_th-index { width: 48px; min-width: 48px; max-width: 60px; text-align: center; padding-left: 4px; padding-right: 4px; }
.stl-table td.stl_td-index { width: 48px; min-width: 48px; max-width: 60px; text-align: center !important; padding-left: 4px; padding-right: 4px; color: #64748b; font-weight: 600; }
/* 基站名称单元格 */
.stl-td-name { overflow: hidden; }
.stl-name-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.stl-name-text {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: calc(100% - 40px);
}
.stl-name-sub {
  font-size: 10.5px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 建设类型标签 */
.stl-tag {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 10px;
  font-size: 10px; font-weight: 700; white-space: nowrap;
  flex-shrink: 0;
}
.stl-tag-cosite { background: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; }
.stl-tag-newsite { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
/* 塔型显示 */
.stl-tower-main {
  display: inline-block; font-weight: 600; color: var(--text);
  font-size: 12px;
}
.stl-tower-sub {
  display: inline-block; margin-left: 4px;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
}
.stl-tower-only {
  display: inline-block; font-weight: 500; color: var(--text-muted);
  font-size: 12px;
}
/* 区县居中 */
.stl-td-district { text-align: center; font-weight: 500; }
/* 承建单位 */
.stl_td-unit { font-size: 11.5px; color: var(--text-secondary); }
/* 阶段 */
.stl_td-stage { font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 状态居中 */
.stl_td-status { text-align: center; }
/* 操作按钮组 */
.stl_td-ops { text-align: center; }
.stl-ops-group {
  display: inline-flex; align-items: center; gap: 4px;
  justify-content: center;
}
.stl-op-btn {
  padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer;
  transition: all 0.15s ease; white-space: nowrap;
  line-height: 1.6;
}
.stl-op-btn:hover { transform: translateY(-1px); }
.stl-op-info { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.stl-op-info:hover { background: #4338ca; color: white; }
.stl-op-edit { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.stl-op-edit:hover { background: #1d4ed8; color: white; }
.stl-op-del { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.stl-op-del:hover { background: #dc2626; color: white; }
/* 空状态 */
.stl-empty {
  text-align: center; padding: 50px 20px; color: var(--text-muted);
}
.stl-empty-icon { font-size: 40px; margin-bottom: 8px; display: block; }
.stl-empty p { font-size: 14px; margin: 0; }

/* ============================================================
   流程管理页面样式（prc = process）— v2 大气精致版
   ============================================================ */

/* 页面主容器 */
.prc-card {
  background: transparent;
  border-radius: 0;
  padding: 0; overflow: hidden;
}

/* ===== 顶部标题区域 ===== */
.prc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 16px 0;
  background: none; border-bottom: none;
  gap: 16px; flex-wrap: wrap;
}
.prc-header-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prc-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: 0.5px;
}
.prc-title::before {
  content: '';
  display: block; width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 3px;
}

/* 角色提示条 — 精致胶囊 */
.prc-role-hint {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 20px;
  font-size: 12px; border: 1px solid transparent;
  max-width: 600px;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.prc-role-icon { font-size: 14px; flex-shrink: 0; }
.prc-role-unit { background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #1e40af; border-color: #bfdbfe; }
.prc-role-district { background: linear-gradient(135deg, #faf5ff, #f3e8ff); color: #6b21a8; border-color: #ddd6fe; }
.prc-role-yd { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #166534; border-color: #bbf7d0; }
.prc-role-constructor { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #991b1b; border-color: #fecaca; }

/* ===== 筛选工具栏 — 毛玻璃效果 ===== */
.prc-filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; margin-bottom: 16px;
  background: white; border-radius: 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.prc-filter-bar .stl-filter-item {
  background: var(--bg-alt);
  border-radius: 10px;
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.prc-filter-bar .stl-filter-item:hover {
  background: white;
  border-color: var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.prc-filter-bar .stl-filter-item input,
.prc-filter-bar .stl-filter-item select {
  border: none !important;
  background: transparent !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  min-width: auto !important;
  box-shadow: none !important;
}
.prc-filter-bar .stl-filter-input { width: 160px !important; }

/* 列表容器 */
.prc-list-wrap {
  padding: 0;
}

/* ===== 站点卡片 — 大气卡片设计 ===== */
.prc-station-card {
  background: white; border-radius: 14px;
  border: 1px solid var(--border-light);
  padding: 12px 16px; margin-bottom: 10px;
  cursor: pointer; transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  position: relative; overflow: hidden;
  max-width: 100%;
}
.prc-station-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity var(--transition);
}
.prc-station-card:hover::before { opacity: 1; }
.prc-station-card:hover {
  border-color: #c7d9ef;
  box-shadow: 0 8px 28px rgba(0,102,204,0.10), 0 2px 8px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

/* 卡片顶部信息区 */
.prc-card-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 10px;
}
.prc-card-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; min-width: 0; }
.prc-card-name {
  font-size: 15px; font-weight: 700; color: var(--text);
  display: inline-block; max-width: 320px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.2px;
}

/* 标签组 */
.prc-card-tags {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.prc-tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  letter-spacing: 0.2px;
}
.prc-tag-dist { background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: #3730a3; border: 1px solid #c7d2fe; }
.prc-tag-type { background: linear-gradient(135deg, #faf5ff, #f3e8ff); color: #7c3aed; border: 1px solid #ddd6fe; }
.prc-tag-unit { background: linear-gradient(135deg, #ecfdf5, #d1fae5); color: #047857; border: 1px solid #a7f3d0; }
.prc-tag-overdue { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; border: 1px solid #fecaca; animation: prcBlink 1.5s infinite; }
.prc-tag-warn { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #b45309; border: 1px solid #fde68a; }
.prc-tag-pending { background: linear-gradient(135deg, #fff8e6, #fff3cd); color: #856404; border: 1px solid #ffe69c; }

@keyframes prcBlink {
  0%,100% { opacity: 1; } 50% { opacity: 0.65; }
}

/* 卡片右侧状态+按钮 */
.prc-card-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

/* ===== 时间线 — 连线式优雅设计（替代箭头） ===== */
.prc-timeline-wrap {
  overflow-x: auto; padding: 8px 4px;
  /* 隐藏滚动条但保留功能 */
  scrollbar-width: none; -ms-overflow-style: none;
}
.prc-timeline-wrap::-webkit-scrollbar { display: none; }

/* 时间线主容器 */
.flow-timeline {
  display: flex; align-items: flex-start; gap: 0;
  position: relative;
  padding: 4px 0;
}
/* 连接线背景层 */
.flow-timeline::before {
  content: '';
  position: absolute;
  top: 21px; left: 24px; right: 24px;
  height: 3px;
  background: linear-gradient(90deg, var(--border) 0%, var(--border-light) 100%);
  border-radius: 2px;
  z-index: 0;
}

.step-wrap { display: flex; align-items: center; position: relative; z-index: 1; }
.step-arrow { display: none; } /* 隐藏旧箭头 */

.step-item {
  display: flex; flex-direction: column; align-items: center;
  min-width: 50px; max-width: 66px; cursor: default;
  padding: 0 2px;
}
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  position: relative; z-index: 2;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  border: 2px solid var(--border);
  background: white;
  color: var(--text-muted);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
/* 已完成 — 柔和绿色（调淡） */
.step-item.step-done .step-circle,
.step-item.done .step-circle {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  color: #047857; border-color: #bbf7d0;
  box-shadow: 0 1px 4px rgba(16,185,129,0.08);
}
/* 进行中 — 柔和蓝色（调淡） */
.step-item.step-active .step-circle,
.step-item.active .step-circle {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1e40af; border-color: #93c5fd;
  box-shadow: 0 1px 6px rgba(59,130,246,0.10), 0 1px 3px rgba(59,130,246,0.06);
  animation: stepPulse 2.5s ease-in-out infinite;
}
/* 待做 */
.step-item.step-todo .step-circle {
  background: #f8fafc; color: #cbd5e1; border-color: #e2e8f0;
  box-shadow: none;
}
/* 超期 — 柔和红色（调淡） */
.step-item.overdue .step-circle {
  background: linear-gradient(145deg, #fee2e2, #fecaca);
  color: #b91c1c; border-color: #fecaca;
  box-shadow: 0 1px 4px rgba(239,68,68,0.08);
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.20), 0 2px 10px rgba(59,130,246,0.15); }
  50% { box-shadow: 0 0 0 10px rgba(59,130,246,0), 0 2px 10px rgba(59,130,246,0.10); }
}

.step-label {
  margin-top: 6px; font-size: 10.5px; text-align: center;
  color: var(--text-secondary); font-weight: 550;
  line-height: 1.35;
  white-space: nowrap;
}
.step-date { font-size: 10px; color: var(--text-muted); margin-top: 2px; text-align: center; }
.step-status { font-size: 10px; margin-top: 2px; font-weight: 500; }
.step-sub {
  font-size: 10px; color: var(--primary); margin-top: 3px;
  text-align: center; font-weight: 600;
  background: var(--primary-ghost);
  padding: 1px 6px; border-radius: 6px;
}

/* 备注文字 */
.prc-remark {
  margin-top: 10px; padding: 8px 14px; border-radius: 8px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  color: #dc2626; font-size: 11.5px;
  border-left: 3px solid #fca5a5;
  font-weight: 500;
}

/* ============================================================
   基站验收统计页面样式（acc = acceptance）
   ============================================================ */
.acc-card {
  background: var(--bg); border-radius: 12px;
  padding: 0; overflow: hidden;
}

/* 统计卡片网格 */
.acc-stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  padding: 20px; background: linear-gradient(180deg, #fafcff, #f5f7fb);
  border-bottom: 1px solid var(--border-light);
}
.acc-stat-card {
  display: flex; align-items: center; gap: 12px;
  background: white; border-radius: 10px; padding: 14px 16px;
  border: 1.5px solid var(--border-light);
  transition: all 0.2s ease;
}
.acc-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.acc-stat-icon { font-size: 28px; line-height: 1; }
.acc-stat-body { flex: 1; min-width: 0; }
.acc-stat-num {
  font-size: 30px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.5px;
}
.acc-stat-label {
  font-size: 11.5px; color: var(--text-muted); font-weight: 500; margin-top: 2px;
}
/* 统计卡片颜色 */
.acc-stat-blue .acc-stat-num { color: #2563eb; }
.acc-stat-green .acc-stat-num { color: #059669; }
.accstat-yellow .acc-stat-num { color: #d97706; }
.acc-stat-red .acc-stat-num { color: #dc2626; }
.acc-stat-danger .acc-stat-num { color: #b91c1c; }

/* 响应式：窄屏时统计卡片换行 */
@media (max-width: 1100px) {
  .acc-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  .acc-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 分区标题 */
.acc-section {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}
.acc-section-alert { background: linear-gradient(180deg, #fffbfa, #fff5f5); border-color: #fed7aa; }
.acc-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.acc-section-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.acc-section-alert .acc-section-title { color: #dc2626; }
.acc-title-icon { font-size: 16px; }
.acc-section-hint { font-size: 11.5px; color: var(--text-muted); font-weight: 400; }

/* 验收筛选栏 */
.acc-filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; margin-bottom: 14px;
  background: white; border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
/* 筛选栏输入项复用 stl 样式 */
.acc-filter-bar .stl-filter-item {
  background: var(--bg-alt);
  border-radius: 9px;
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: all var(--transition);
}
.acc-filter-bar .stl-filter-item:hover {
  background: white;
  border-color: #c7d9ef;
  box-shadow: 0 1px 4px rgba(0,102,204,0.06);
}
.acc-filter-bar .stl-filter-input { width: 160px !important; }

/* 表格容器 — 大气卡片式 */
.acc-table-wrap {
  overflow-x: auto; border-radius: 10px;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.acc-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.acc-table thead tr {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}
.acc-table th {
  padding: 11px 12px; text-align: center; font-weight: 700;
  font-size: 12.5px; color: #334155; letter-spacing: 0.3px;
  white-space: nowrap; border-bottom: 2.5px solid var(--primary-light);
}
.acc-table td {
  padding: 10px 12px; border-bottom: 1px solid #f1f5f9;
  vertical-align: middle; text-align: center;
  transition: background 0.15s ease;
  color: var(--text-secondary);
}
.acc-table tbody tr:nth-child(even) { background: #fafcff; }
.acc-table tbody tr:hover { background: #eef4ff; cursor: pointer; }

/* ===== 紧急行：左侧红色竖线标记（替代整行标红） ===== */
.acc-table tr.acc-urgent {
  position: relative;
  background: linear-gradient(90deg, #fef2f2 0%, white 30%) !important;
}
.acc-table tr.acc-urgent td:first-child::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3.5px;
  background: linear-gradient(180deg, #ef4444, #dc2626);
  border-radius: 0 2px 2px 0;
}

/* 站点名称列 */
.acc-station-name {
  font-size: 13px; text-align: left !important;
  color: var(--text); font-weight: 600;
  letter-spacing: 0.15px;
}
/* 次要信息 */
.acc-td-sub { color: var(--text-muted); font-size: 11.5px; }
/* 通过日期 */
.acc-td-pass { color: #059669; font-weight: 700; }

/* 验收状态标签 */
.acc-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 8px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  letter-spacing: 0.2px;
}
.acc-tag-over { background: linear-gradient(135deg, #fef2f2, #fee2e2); color: #dc2626; border: 1px solid #fecaca; }
.acc-tag-warn { background: linear-gradient(135deg, #fffbeb, #fef3c7); color: #b45309; border: 1px solid #fde68a; }
.acc-tag-ok { background: linear-gradient(135deg, #f0fdf4, #dcfce7); color: #166534; border: 1px solid #bbf7d0; }
.acc-tag-over-sm { background: linear-gradient(135deg, #fee2e2, #fef2f2); color: #dc2626; padding: 2px 8px; font-size: 10.5px; border-radius: 5px; font-weight: 700; }
.acc-tag-ok-sm { background: linear-gradient(135deg, #dcfce7, #f0fdf4); color: #166534; padding: 2px 8px; font-size: 10.5px; border-radius: 5px; font-weight: 600; }

/* 超时提醒区优化 */
.acc-section-alert {
  background: linear-gradient(180deg, #fffaf5, #fff7ed);
  border-color: #fed7aa;
}
.acc-section-alert .acc-section-title {
  color: #c2410c;
}

/* ===== ICP备案号（页脚，工信部要求悬挂） ===== */
.icp-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 28px; line-height: 28px;
  text-align: center; font-size: 12px;
  background: rgba(255,255,255,0.92);
  color: #555; border-top: 1px solid #e5e7eb;
  z-index: 9000;
}
.icp-footer a { color: #555; text-decoration: none; }
.icp-footer a:hover { color: #0066cc; text-decoration: underline; }
