﻿:root {
    --primary: #1a73e8;
    --primary-light: #e8f0fe;
    --primary-dark: #1557b0;
    --success: #34a853;
    --warning: #f9ab00;
    --danger: #ea4335;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f4;
    --gray-200: #e8eaed;
    --gray-300: #dadce0;
    --gray-500: #9aa0a6;
    --gray-700: #5f6368;
    --gray-900: #202124;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.18), 0 6px 20px rgba(0,0,0,0.1);
    --radius: 10px;
    --radius-lg: 14px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: #e8ecf2;
    background-image:
      radial-gradient(ellipse at 20% 0%, rgba(26,115,232,0.06) 0%, transparent 50%),
      radial-gradient(ellipse at 80% 100%, rgba(52,168,83,0.04) 0%, transparent 50%),
      radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.3) 0%, transparent 70%);
    background-attachment: fixed;
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
  }

  /* Header */
  .header {
    background: linear-gradient(135deg, #062654 0%, #0a3d8f 15%, #1557b0 30%, #1a6fd4 50%, #2085e8 70%, #2b94f0 85%, #45a5f5 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 8px 32px rgba(6,38,84,0.4), 0 2px 8px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }
  .header-top {
    padding: 42px 48px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  .header-top::before {
    content: '';
    position: absolute;
    top: -60%; left: -60%;
    width: 220%; height: 220%;
    background: radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.1) 0%, transparent 55%),
                radial-gradient(ellipse at 75% 25%, rgba(255,255,255,0.06) 0%, transparent 45%),
                radial-gradient(ellipse at 50% 80%, rgba(107,161,255,0.12) 0%, transparent 50%);
    pointer-events: none;
  }
  .header-top::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
  }
  .header h1 {
    font-size: 36px; font-weight: 800; letter-spacing: 10px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.25), 0 0 40px rgba(45,149,240,0.3);
    position: relative; cursor: pointer;
    background: linear-gradient(180deg, #ffffff 0%, #e0ecff 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .header h1:hover::after {
    content: '✏️ 点击修改';
    position: absolute; bottom: -24px; left: 50%; transform: translateX(-50%);
    font-size: 12px; font-weight: 400; letter-spacing: 1px; opacity: 0.7;
    -webkit-text-fill-color: rgba(255,255,255,0.8);
  }
  .title-edit-input {
    font-size: 32px; font-weight: 800; letter-spacing: 8px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.25);
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.35);
    color: #fff; border-radius: 10px; padding: 6px 16px; text-align: center;
    outline: none; width: 80%; max-width: 600px; font-family: inherit;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.15);
  }
  .title-edit-input::placeholder { color: rgba(255,255,255,0.5); }
  .title-edit-input:focus { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.2); box-shadow: 0 0 0 3px rgba(255,255,255,0.12), 0 4px 20px rgba(0,0,0,0.15); }
  .header p {
    font-size: 14px; opacity: 0.9; margin-top: 10px; letter-spacing: 3px; position: relative;
    text-shadow: 0 1px 8px rgba(0,0,0,0.15);
  }
  .header-actions {
    display: flex; gap: 12px; flex-wrap: wrap;
    justify-content: center;
    padding: 18px 48px 26px;
    background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 100%);
    position: relative;
  }
  .header-actions::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 20px; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap;
    position: relative;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  }
  .btn:active { transform: translateY(1px); }
  .btn-white {
    background: linear-gradient(180deg, #ffffff 0%, #f0f4fa 100%);
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    border: 1px solid rgba(26,115,232,0.2);
  }
  .btn-white:hover { 
    background: linear-gradient(180deg, #f0f4ff 0%, #e0e8f8 100%);
    box-shadow: 0 4px 12px rgba(26,115,232,0.2), inset 0 1px 0 rgba(255,255,255,0.9);
    transform: translateY(-1px);
  }
  .btn-primary {
    background: linear-gradient(180deg, #4a9af5 0%, var(--primary) 50%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 3px 8px rgba(26,115,232,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  .btn-primary:hover { box-shadow: 0 5px 16px rgba(26,115,232,0.4), inset 0 1px 0 rgba(255,255,255,0.25); transform: translateY(-1px); }
  .btn-success {
    background: linear-gradient(180deg, #5cc472 0%, var(--success) 50%, #2d9249 100%);
    color: #fff;
    box-shadow: 0 3px 8px rgba(52,168,83,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  .btn-success:hover { box-shadow: 0 5px 16px rgba(52,168,83,0.4), inset 0 1px 0 rgba(255,255,255,0.25); transform: translateY(-1px); }
  .btn-warning {
    background: linear-gradient(180deg, #fbbd3a 0%, var(--warning) 50%, #e09900 100%);
    color: #fff;
    box-shadow: 0 3px 8px rgba(249,171,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  }
  .btn-warning:hover { box-shadow: 0 5px 16px rgba(249,171,0,0.4), inset 0 1px 0 rgba(255,255,255,0.25); transform: translateY(-1px); }
  .btn-danger {
    background: linear-gradient(180deg, #f06058 0%, var(--danger) 50%, #d33426 100%);
    color: #fff;
    box-shadow: 0 3px 8px rgba(234,67,53,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  }
  .btn-danger:hover { box-shadow: 0 5px 16px rgba(234,67,53,0.4), inset 0 1px 0 rgba(255,255,255,0.2); transform: translateY(-1px); }
  .btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }
  .btn-ghost { 
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
    color: var(--gray-700); border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.8);
  }
  .btn-ghost:hover { background: linear-gradient(180deg, #f8f9fa 0%, #eef0f2 100%); transform: translateY(-1px); box-shadow: var(--shadow); }
  .btn-ghost.active { 
    background: linear-gradient(180deg, #e8f0fe 0%, var(--primary-light) 100%);
    color: var(--primary); border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(26,115,232,0.2), inset 0 1px 0 rgba(255,255,255,0.6);
  }

  /* Stats */
  .stats-bar { display: flex; gap: 20px; padding: 28px 48px; flex-wrap: wrap; max-width: 1600px; margin: 0 auto; }
  .stat-card {
    flex: 1; min-width: 160px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 14px;
    padding: 20px 22px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.95);
    display: flex; align-items: flex-start; gap: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid rgba(255,255,255,0.85);
    position: relative; overflow: hidden;
  }
  .stat-card::before {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    border-radius: 14px 14px 0 0;
  }
  .stat-card:nth-child(1)::before { background: linear-gradient(90deg, #1a73e8, #4a9af5, #70b5ff); }
  .stat-card:nth-child(2)::before { background: linear-gradient(90deg, #f9ab00, #fbbd3a, #fdd56e); }
  .stat-card:nth-child(3)::before { background: linear-gradient(90deg, #34a853, #5cc472, #85dba0); }
  .stat-card:nth-child(4)::before { background: linear-gradient(90deg, #ea4335, #f06058, #f58a84); }
  .stat-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.95); }
  .stat-icon {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1), inset 0 2px 4px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.9);
  }
  .stat-icon.blue { background: linear-gradient(145deg, #e8f0fe, #c5d9fc); }
  .stat-icon.orange { background: linear-gradient(145deg, #fef3e0, #fde4b5); }
  .stat-icon.green { background: linear-gradient(145deg, #e6f4ea, #b8dfbe); }
  .stat-icon.red { background: linear-gradient(145deg, #fce8e6, #f5b8b2); }
  .stat-number { font-size: 34px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; }
  .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 2px; font-weight: 500; }
  .stat-detail {
    margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gray-200);
    font-size: 12px; color: var(--gray-700); line-height: 1.9;
  }
  .stat-detail-item { display: inline-block; margin-right: 12px; white-space: nowrap; }
  .stat-detail-item .name { color: var(--gray-700); }
  .stat-detail-item .count { font-weight: 700; margin-left: 2px; }
  .stat-detail-item .count.pending-count { color: #e37400; }
  .stat-detail-item .count.overdue-count { color: var(--danger); }
  .stat-detail-item .count.done-count { color: var(--success); }

  /* Main Container */
  .container { padding: 0 48px 56px; max-width: 1600px; margin: 0 auto; }
  .tab-bar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
  .search-box {
    display: flex; align-items: center;
    background: linear-gradient(180deg, #fff 0%, #f8f9fc 100%);
    border: 1px solid var(--gray-300); border-radius: 12px;
    padding: 0 16px; margin-left: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), inset 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.25s;
  }
  .search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,115,232,0.1), 0 3px 12px rgba(26,115,232,0.12); }
  .search-box input { border: none; outline: none; padding: 9px 8px; font-size: 14px; width: 200px; background: transparent; }
  .search-box span { color: var(--gray-500); }

  /* Filter Row */
  .filter-row {
    display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap;
    padding: 16px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.85);
  }
  .filter-row label { font-size: 13px; color: var(--gray-700); font-weight: 600; }
  .filter-row select, .filter-row input[type="date"], .filter-row input[type="text"] {
    padding: 9px 14px; border: 1px solid var(--gray-300); border-radius: 9px;
    font-size: 13px; outline: none;
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05), inset 0 1px 2px rgba(0,0,0,0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .filter-row select:focus, .filter-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.12); }

  /* Table Card */
  .table-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfe 100%);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.95);
    overflow: hidden; border: 1px solid rgba(255,255,255,0.85);
  }
  .table-wrapper { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  thead { background: linear-gradient(180deg, #f5f7fa 0%, #ebeef3 100%); box-shadow: inset 0 -1px 0 var(--gray-200), inset 0 1px 0 rgba(255,255,255,0.8); }
  th { padding: 14px 16px; text-align: left; font-weight: 700; color: var(--gray-700); border-bottom: 2px solid var(--gray-200); white-space: nowrap; font-size: 13px; letter-spacing: 0.3px; text-transform: uppercase; }
  td { padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.04); vertical-align: middle; }
  tbody tr { transition: all 0.2s ease; }
  tbody tr:nth-child(even) { background: rgba(248,249,252,0.5); }
  tbody tr:hover { background: linear-gradient(90deg, rgba(26,115,232,0.04) 0%, rgba(26,115,232,0.07) 100%); box-shadow: 0 2px 8px rgba(26,115,232,0.06); }
  tbody tr.editing-row { background: linear-gradient(90deg, rgba(26,115,232,0.06) 0%, rgba(26,115,232,0.12) 100%); box-shadow: inset 3px 0 0 var(--primary), 0 2px 8px rgba(26,115,232,0.08); }
  .task-content { max-width: 320px; word-break: break-all; }
  .task-content.done { text-decoration: line-through; color: var(--gray-500); }

  /* Inline Edit Styles */
  .inline-edit { padding: 6px 10px; border: 1.5px solid var(--primary); border-radius: 7px; font-size: 13px; outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); font-family: inherit; width: 100%; transition: all 0.2s; }
  .inline-edit:focus { border-color: var(--primary-dark); box-shadow: 0 0 0 4px rgba(26,115,232,0.15); }
  .inline-edit-textarea { padding: 6px 10px; border: 1.5px solid var(--primary); border-radius: 7px; font-size: 13px; outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); font-family: inherit; width: 100%; min-height: 36px; resize: vertical; transition: all 0.2s; }

  /* Status Badge */
  .badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; box-shadow: 0 2px 6px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.5); letter-spacing: 0.3px; }
  .badge-pending { background: linear-gradient(180deg, #fef3e0, #fde4b5); color: #e37400; }
  .badge-progress { background: linear-gradient(180deg, var(--primary-light), #d4e3fc); color: var(--primary); }
  .badge-done { background: linear-gradient(180deg, #e6f4ea, #c8e6c9); color: var(--success); }
  .badge-overdue { background: linear-gradient(180deg, #fce8e6, #f9c4bf); color: var(--danger); }
  .badge-dj { background: linear-gradient(180deg, #fce8e6, #f9c4bf); color: #c5221f; }
  .badge-mz { background: linear-gradient(180deg, #fef3e0, #fde4b5); color: #e37400; }
  .badge-xc { background: linear-gradient(180deg, #e6f4ea, #c8e6c9); color: #137333; }
  .badge-hj { background: linear-gradient(180deg, #e8f0fe, #d4e3fc); color: #185abc; }
  .badge-aq { background: linear-gradient(180deg, #fce8e6, #f9c4bf); color: #c5221f; }
  .badge-sh { background: linear-gradient(180deg, #f3e8fd, #e4ccfb); color: #7627bb; }
  .badge-cw { background: linear-gradient(180deg, #e8eaed, #d5d8dc); color: #5f6368; }
  .badge-hy { background: linear-gradient(180deg, #e0f7fa, #b2ebf2); color: #00838f; }

  .task-check { width: 20px; height: 20px; cursor: pointer; accent-color: var(--success); }
  .priority-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; box-shadow: inset 0 1px 1px rgba(0,0,0,0.15); }
  .priority-high { background: radial-gradient(circle at 35% 35%, #ff6b6b, var(--danger)); }
  .priority-medium { background: radial-gradient(circle at 35% 35%, #ffc44d, var(--warning)); }
  .priority-low { background: radial-gradient(circle at 35% 35%, #5dd87e, var(--success)); }
  .action-btns { display: flex; gap: 5px; flex-wrap: nowrap; white-space: nowrap; }
  .action-btns .btn { padding: 4px 8px; font-size: 12px; min-width: auto; }

  /* ===== Website Navigation Section ===== */
  .nav-section {
    margin-bottom: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.85);
    overflow: visible;
    position: relative;
    padding: 10px 14px;
  }
  .nav-grid { display: flex; gap: 0; flex-wrap: wrap; align-items: center; }
  .nav-label {
    font-size: 13px; font-weight: 600; color: var(--gray-700);
    margin-right: 6px; white-space: nowrap;
    display: flex; align-items: center; gap: 4px;
  }
  .nav-label .icon { font-size: 16px; }
  .nav-card {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 16px; margin: 3px;
    border-radius: 22px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.35);
    text-decoration: none; color: #fff;
    transition: all 0.25s ease;
    cursor: pointer; white-space: nowrap;
    font-size: 13px; font-weight: 500;
  }
  .nav-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.25); }
  .nav-card-icon { font-size: 14px; line-height: 1; }
  .nav-card-name { line-height: 1.3; }
  .nav-card-actions { display: none; }
  .nav-empty { text-align: center; padding: 6px 20px; color: var(--gray-500); font-size: 13px; width: 100%; }
  .nav-float-actions {
    position: absolute; top: 6px; right: 10px;
    display: flex; gap: 4px; z-index: 2;
  }
  .nav-float-actions .btn-icon {
    width: 26px; height: 26px; border: none; background: none;
    border-radius: 50%; cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; color: var(--gray-500);
  }
  .nav-float-actions .btn-icon:hover { background: var(--gray-100); color: var(--gray-700); }

  /* Nav Color Palette */
  .nav-c0 { background: linear-gradient(135deg, #1a73e8, #1557b0); }
  .nav-c1 { background: linear-gradient(135deg, #ea4335, #c5221f); }
  .nav-c2 { background: linear-gradient(135deg, #34a853, #1e8e3e); }
  .nav-c3 { background: linear-gradient(135deg, #f9ab00, #e37400); }
  .nav-c4 { background: linear-gradient(135deg, #7b1fa2, #6a1b9a); }
  .nav-c5 { background: linear-gradient(135deg, #00838f, #006064); }
  .nav-c6 { background: linear-gradient(135deg, #c2185b, #ad1457); }
  .nav-c7 { background: linear-gradient(135deg, #455a64, #37474f); }

  /* ===== Cadre Panel ===== */
  .cadre-panel-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.55); z-index: 1000;
    backdrop-filter: blur(8px);
  }
  .cadre-panel-overlay.active { display: flex; align-items: center; justify-content: center; }
  .cadre-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    border-radius: 20px; width: 1300px; max-width: 98vw;
    max-height: 92vh; overflow: hidden;
    box-shadow: 0 32px 96px rgba(0,0,0,0.22), 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.5);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column;
  }
  /* 干部分工面板标题区 —— 与主页 header 同风格 */
  .cadre-panel-header {
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
    background: linear-gradient(135deg, #062654 0%, #0a3d8f 15%, #1557b0 30%, #1a6fd4 50%, #2085e8 70%, #2b94f0 85%, #45a5f5 100%);
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
  }
  .cadre-panel-header::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
  }
  .cadre-panel-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    pointer-events: none;
  }
  .cadre-title-wrap {
    padding: 28px 32px 20px;
    text-align: center;
    position: relative;
  }
  .cadre-panel-title {
    font-size: 26px; font-weight: 800; letter-spacing: 6px;
    background: linear-gradient(180deg, #ffffff 0%, #e0ecff 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    cursor: pointer; display: inline-block;
    text-align: center;
  }
  .cadre-panel-title:hover::after {
    content: ' ✏️';
    font-size: 14px; font-weight: 400;
    -webkit-text-fill-color: rgba(255,255,255,0.7);
  }
  .cadre-title-input {
    font-size: 24px; font-weight: 800; letter-spacing: 5px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.4);
    color: #fff; border-radius: 10px; padding: 6px 20px; text-align: center;
    outline: none; width: 80%; font-family: inherit;
    backdrop-filter: blur(10px);
  }
  .cadre-title-input:focus { border-color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.2); }
  .cadre-panel-subtitle {
    font-size: 13px; color: rgba(255,255,255,0.8); letter-spacing: 2px; margin-top: 6px;
  }
  .cadre-header-close {
    position: absolute; top: 14px; right: 18px;
    width: 36px; height: 36px; border: none;
    background: rgba(255,255,255,0.15); font-size: 20px; cursor: pointer;
    color: rgba(255,255,255,0.85); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; backdrop-filter: blur(4px);
    z-index: 2;
  }
  .cadre-header-close:hover { background: rgba(255,255,255,0.3); color: #fff; transform: scale(1.1); }
  .cadre-panel-body { padding: 24px 32px; overflow-y: auto; flex: 1; }
  .cadre-panel-footer {
    padding: 16px 32px; border-top: 1px solid var(--gray-200);
    display: flex; gap: 12px; flex-shrink: 0;
    background: linear-gradient(180deg, #fff, #f8f9fc);
    border-radius: 0 0 20px 20px;
  }
  .cadre-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .cadre-table th {
    background: linear-gradient(180deg, #f0f4fb 0%, #e8eef8 100%);
    color: var(--gray-700); font-weight: 700;
    padding: 13px 14px; text-align: left;
    border-bottom: 2px solid var(--gray-200); white-space: nowrap; font-size: 13px;
  }
  .cadre-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: top; color: var(--gray-800); }
  .cadre-table tr:last-child td { border-bottom: none; }
  .cadre-table tr:nth-child(even) td { background: #fafbfd; }
  .cadre-table tr:hover td { background: #f0f5ff; transition: background 0.15s; }
  .cadre-input {
    width: 100%; padding: 7px 10px; font-size: 13.5px;
    border: 1.5px solid transparent; border-radius: 7px;
    background: transparent; color: var(--gray-900);
    transition: all 0.15s; font-family: inherit; resize: none; box-sizing: border-box;
  }
  .cadre-input:hover { border-color: var(--gray-300); background: #fff; }
  .cadre-input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
  .cadre-textarea { min-height: 72px; line-height: 1.6; }
  .cadre-del-btn {
    background: none; border: none; cursor: pointer; font-size: 16px;
    color: var(--gray-400); padding: 5px 10px; border-radius: 6px; transition: all 0.15s;
  }
  .cadre-del-btn:hover { color: var(--danger); background: rgba(234,67,53,0.1); }
  .cadre-section-title {
    font-size: 13px; font-weight: 700; color: var(--gray-500);
    padding: 0 0 14px; display: flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: 0.5px;
  }
  .cadre-section-title::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

  /* 干部列表只读表格 */
  .cadre-readonly-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .cadre-readonly-table th {
    background: linear-gradient(180deg, #f0f4fb 0%, #e8eef8 100%);
    color: var(--gray-700); font-weight: 700;
    padding: 13px 16px; text-align: left;
    border-bottom: 2px solid var(--gray-200); white-space: nowrap; font-size: 13px;
  }
  .cadre-readonly-table td {
    padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
    vertical-align: middle; color: var(--gray-800); line-height: 1.6;
  }
  .cadre-readonly-table tr:last-child td { border-bottom: none; }
  .cadre-readonly-table tr:nth-child(even) td { background: #fafbfd; }
  .cadre-readonly-table tr:hover td { background: #f0f5ff; transition: background 0.15s; }
  .cadre-duty-text { white-space: pre-line; color: var(--gray-700); font-size: 13.5px; line-height: 1.7; }
  .cadre-action-cell { display: flex; gap: 8px; align-items: center; white-space: nowrap; }

  /* 干部编辑弹窗（内层弹窗，z-index更高） */
  .cadre-edit-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.6); z-index: 1100;
    backdrop-filter: blur(6px);
    align-items: center; justify-content: center;
  }
  .cadre-edit-overlay.active { display: flex; }
  .cadre-edit-modal {
    background: #fff; border-radius: 18px; width: 620px; max-width: 95vw;
    max-height: 88vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.6);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .cadre-edit-modal-header {
    padding: 22px 28px; border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, #f8f9fc, #fff);
    border-radius: 18px 18px 0 0;
  }
  .cadre-edit-modal-header h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); }
  .cadre-edit-modal-body { padding: 28px; }
  .cadre-edit-modal-footer {
    padding: 18px 28px; border-top: 1px solid var(--gray-200);
    display: flex; justify-content: flex-end; gap: 10px;
    background: linear-gradient(180deg, #fff, #f8f9fc);
    border-radius: 0 0 18px 18px;
  }
  .cadre-form-group { margin-bottom: 18px; }
  .cadre-form-group label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--gray-700); margin-bottom: 8px; letter-spacing: 0.3px;
  }
  .cadre-form-group input, .cadre-form-group textarea {
    width: 100%; padding: 11px 16px; border: 1.5px solid var(--gray-300);
    border-radius: 10px; font-size: 14px; outline: none; font-family: inherit;
    transition: all 0.25s; box-sizing: border-box;
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 2px rgba(0,0,0,0.04);
  }
  .cadre-form-group textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
  .cadre-form-group input:focus, .cadre-form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,115,232,0.1); background: #fff;
  }
  .cadre-form-row { display: flex; gap: 16px; }
  .cadre-form-row .cadre-form-group { flex: 1; }

  /* ===== Shift Panel (值班安排 独立弹窗) ===== */
  .shift-panel-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.55); z-index: 1000;
    backdrop-filter: blur(8px);
  }
  .shift-panel-overlay.active { display: flex; align-items: center; justify-content: center; }
  .shift-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    border-radius: 20px; width: 1300px; max-width: 98vw;
    max-height: 92vh; overflow: hidden;
    box-shadow: 0 32px 96px rgba(0,0,0,0.22), 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.5);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column;
  }
  .shift-panel-header {
    padding: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
    background: linear-gradient(135deg, #1a5f3a 0%, #1e7a49 25%, #22934f 50%, #28a95d 75%, #35c46e 100%);
    border-radius: 20px 20px 0 0;
    position: relative; overflow: hidden;
  }
  .shift-panel-header::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 60%);
    pointer-events: none;
  }
  .shift-title-wrap {
    padding: 28px 32px 20px;
    text-align: center; position: relative;
  }
  .shift-panel-title {
    font-size: 24px; font-weight: 800; letter-spacing: 5px;
    background: linear-gradient(180deg, #ffffff 0%, #d0f5e3 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; display: inline-block;
    cursor: pointer;
  }
  .shift-panel-title:hover::after {
    content: ' ✏️';
    font-size: 14px; font-weight: 400;
    -webkit-text-fill-color: rgba(255,255,255,0.7);
  }
  .shift-title-input {
    font-size: 22px; font-weight: 800; letter-spacing: 4px;
    background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.45);
    color: #fff; border-radius: 10px; padding: 6px 20px; text-align: center;
    outline: none; width: 80%; font-family: inherit;
  }
  .shift-title-input:focus { border-color: rgba(255,255,255,0.85); }
  .shift-panel-subtitle { font-size: 13px; color: rgba(255,255,255,0.8); letter-spacing: 2px; margin-top: 6px; }
  .shift-header-close {
    position: absolute; top: 14px; right: 18px;
    width: 36px; height: 36px; border: none;
    background: rgba(255,255,255,0.15); font-size: 20px; cursor: pointer;
    color: rgba(255,255,255,0.85); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; z-index: 2;
  }
  .shift-header-close:hover { background: rgba(255,255,255,0.3); color: #fff; transform: scale(1.1); }
  .shift-panel-body { padding: 24px 32px; overflow-y: auto; flex: 1; }
  .shift-panel-footer {
    padding: 16px 32px; border-top: 1px solid var(--gray-200);
    display: flex; gap: 12px; flex-shrink: 0;
    background: linear-gradient(180deg, #fff, #f8f9fc);
    border-radius: 0 0 20px 20px;
  }
  .cadre-shift-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .cadre-shift-table th {
    background: linear-gradient(180deg, #f0f4fb 0%, #e8eef8 100%);
    color: var(--gray-700); font-weight: 700; padding: 13px 18px;
    text-align: center; border-bottom: 2px solid var(--gray-200); font-size: 13px;
  }
  .cadre-shift-table td { padding: 11px 14px; border-bottom: 1px solid var(--gray-100); text-align: center; color: var(--gray-800); }
  .cadre-shift-table tr:nth-child(even) td { background: #fafbfd; }
  .cadre-shift-table tr:hover td { background: #f0f5ff; }
  .cadre-shift-select {
    width: 100%; padding: 7px 10px; font-size: 13.5px;
    border: 1.5px solid var(--gray-200); border-radius: 7px;
    background: #fff; color: var(--gray-900); cursor: pointer; font-family: inherit;
    transition: all 0.15s;
  }
  .cadre-shift-select:focus { outline: none; border-color: var(--success); box-shadow: 0 0 0 3px rgba(52,168,83,0.1); }
  .shift-remark {
    font-size: 13px; color: var(--gray-500); padding: 16px 4px 4px; line-height: 1.8;
    border-top: 1px dashed var(--gray-200); margin-top: 12px;
  }
  .shift-remark-textarea {
    width: 100%; min-height: 80px; padding: 12px 16px;
    border: 1.5px solid var(--gray-300); border-radius: 10px;
    font-size: 13.5px; font-family: inherit; line-height: 1.8;
    resize: vertical; outline: none;
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.25s;
  }
  .shift-remark-textarea:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(52,168,83,0.1);
    background: #fff;
  }

  /* 值班列表只读表格（复用 cadre-readonly-table 样式） */
  .shift-readonly-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .shift-readonly-table th {
    background: linear-gradient(180deg, #f0f4fb 0%, #e8eef8 100%);
    color: var(--gray-700); font-weight: 700;
    padding: 13px 16px; text-align: left;
    border-bottom: 2px solid var(--gray-200); white-space: nowrap; font-size: 13px;
  }
  .shift-readonly-table td {
    padding: 14px 16px; border-bottom: 1px solid var(--gray-100);
    vertical-align: middle; color: var(--gray-800); line-height: 1.6;
  }
  .shift-readonly-table tr:last-child td { border-bottom: none; }
  .shift-readonly-table tr:nth-child(even) td { background: #fafbfd; }
  .shift-readonly-table tr:hover td { background: #f0f5ff; transition: background 0.15s; }
  .shift-action-cell { display: flex; gap: 8px; align-items: center; white-space: nowrap; }

  /* 值班编辑弹窗（内层弹窗，z-index更高） */
  .shift-edit-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.6); z-index: 1100;
    backdrop-filter: blur(6px);
    align-items: center; justify-content: center;
  }
  .shift-edit-overlay.active { display: flex; }
  .shift-edit-modal {
    background: #fff; border-radius: 18px; width: 560px; max-width: 95vw;
    max-height: 88vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.25), 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid rgba(255,255,255,0.6);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .shift-edit-modal-header {
    padding: 22px 28px; border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, #f8f9fc, #fff);
    border-radius: 18px 18px 0 0;
  }
  .shift-edit-modal-header h3 { font-size: 18px; font-weight: 700; color: var(--gray-900); }
  .shift-edit-modal-body { padding: 28px; }
  .shift-edit-modal-footer {
    padding: 18px 28px; border-top: 1px solid var(--gray-200);
    display: flex; justify-content: flex-end; gap: 10px;
    background: linear-gradient(180deg, #fff, #f8f9fc);
    border-radius: 0 0 18px 18px;
  }
  .shift-form-group { margin-bottom: 18px; }
  .shift-form-group label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--gray-700); margin-bottom: 8px; letter-spacing: 0.3px;
  }
  .shift-form-group input, .shift-form-group select {
    width: 100%; padding: 11px 16px; border: 1.5px solid var(--gray-300);
    border-radius: 10px; font-size: 14px; outline: none; font-family: inherit;
    transition: all 0.25s; box-sizing: border-box;
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 2px rgba(0,0,0,0.04);
  }
  .shift-form-group input:focus, .shift-form-group select:focus {
    border-color: var(--success); box-shadow: 0 0 0 4px rgba(52,168,83,0.1); background: #fff;
  }
  .shift-form-row { display: flex; gap: 16px; }
  .shift-form-row .shift-form-group { flex: 1; }

  /* ===== Nav Manage Panel ===== */
  .nav-panel-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.5); z-index: 1000;
    backdrop-filter: blur(6px);
  }
  .nav-panel-overlay.active { display: flex; align-items: center; justify-content: center; }
  .nav-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    border-radius: 18px; width: 720px; max-width: 95vw;
    max-height: 85vh; overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2), 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.5);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column;
  }
  .nav-panel-header {
    padding: 22px 26px;
    border-bottom: 1px solid var(--gray-200);
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, #f8f9fc, #fff);
    border-radius: 18px 18px 0 0;
  }
  .nav-panel-header h3 { font-size: 18px; font-weight: 700; }
  .nav-panel-body { padding: 0; overflow-y: auto; flex: 1; }
  .nav-panel-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex; justify-content: flex-end; gap: 10px;
    background: linear-gradient(180deg, #fff, #f8f9fc);
    border-radius: 0 0 18px 18px;
  }
  .nav-manage-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .nav-manage-table thead { background: linear-gradient(180deg, #f5f7fa 0%, #ebeef3 100%); position: sticky; top: 0; z-index: 1; }
  .nav-manage-table th { padding: 13px 16px; text-align: left; font-weight: 700; color: var(--gray-700); border-bottom: 2px solid var(--gray-200); white-space: nowrap; font-size: 13px; }
  .nav-manage-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
  .nav-manage-table tbody tr { transition: background 0.15s; }
  .nav-manage-table tbody tr:hover { background: linear-gradient(90deg, rgba(26,115,232,0.03) 0%, rgba(26,115,232,0.06) 100%); }
  .nav-manage-empty { text-align: center; padding: 48px 20px; color: var(--gray-500); }
  .nav-manage-empty .icon { font-size: 40px; margin-bottom: 10px; opacity: 0.35; }

  /* Modal */
  .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(10,30,60,0.5); z-index: 1000; align-items: center; justify-content: center; backdrop-filter: blur(6px); }
  .modal-overlay.active { display: flex; }
  .modal {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    border-radius: 18px; width: 560px; max-width: 95vw;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.2), 0 8px 32px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.5);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes modalIn { from { opacity: 0; transform: scale(0.92) translateY(24px); } to { opacity: 1; transform: scale(1) translateY(0); } }
  .modal-header { padding: 24px 28px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; background: linear-gradient(180deg, #f8f9fc, #fff); border-radius: 18px 18px 0 0; }
  .modal-header h3 { font-size: 18px; font-weight: 700; }
  .modal-close { width: 36px; height: 36px; border: none; background: linear-gradient(180deg, #fff, #f8f9fa); font-size: 20px; cursor: pointer; color: var(--gray-500); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
  .modal-close:hover { background: linear-gradient(180deg, #f0f2f5, #e8eaed); color: var(--gray-900); transform: scale(1.1); }
  .modal-body { padding: 28px; }
  .modal-footer { padding: 18px 28px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 10px; background: linear-gradient(180deg, #fff, #f8f9fc); border-radius: 0 0 18px 18px; }

  /* Form */
  .form-group { margin-bottom: 18px; }
  .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; letter-spacing: 0.3px; }
  .form-group label .required { color: var(--danger); }
  .form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 11px 16px; border: 1.5px solid var(--gray-300);
    border-radius: 10px; font-size: 14px; outline: none; font-family: inherit;
    transition: all 0.25s;
    background: linear-gradient(180deg, #fff 0%, #fcfcfd 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 2px rgba(0,0,0,0.04);
  }
  .form-group textarea { resize: vertical; min-height: 80px; }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(26,115,232,0.1); background: #fff; }
  .form-row { display: flex; gap: 16px; }
  .form-row .form-group { flex: 1; }

  /* Pagination */
  .pagination { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px; flex-wrap: wrap; gap: 12px; }
  .pagination-info { font-size: 13px; color: var(--gray-500); font-weight: 600; }
  .pagination-btns { display: flex; gap: 5px; }
  .pagination-btns button {
    width: 38px; height: 38px; border: 1px solid var(--gray-300);
    background: linear-gradient(180deg, #fff 0%, #f8f9fa 100%);
    border-radius: 10px; cursor: pointer; font-size: 13px; transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
    font-weight: 600;
  }
  .pagination-btns button:hover { background: linear-gradient(180deg, #f0f4ff 0%, #e0e8f8 100%); border-color: var(--primary); box-shadow: 0 3px 10px rgba(26,115,232,0.18); transform: translateY(-2px); }
  .pagination-btns button.active { background: linear-gradient(180deg, #4a9af5, var(--primary-dark)); color: #fff; border-color: var(--primary); box-shadow: 0 4px 14px rgba(26,115,232,0.35), inset 0 1px 0 rgba(255,255,255,0.2); }
  .pagination-btns button:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }

  .empty-state { text-align: center; padding: 70px 20px; color: var(--gray-500); }
  .empty-state .icon { font-size: 64px; margin-bottom: 16px; opacity: 0.3; filter: saturate(0.5); }
  .empty-state p { font-size: 15px; font-weight: 500; }

  /* Footer */
  .page-footer { text-align: center; padding: 32px 32px 40px; }
  .page-footer .credit {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 36px;
    background: linear-gradient(145deg, #ffffff 0%, #eef1f5 100%);
    border-radius: 30px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.85);
    color: var(--gray-700); font-size: 14px; font-weight: 500; letter-spacing: 0.5px;
    position: relative; overflow: hidden;
  }
  .page-footer .credit::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, #1a73e8, #ea4335, #f9ab00, #34a853, #1a73e8);
    border-radius: 28px 28px 0 0;
  }
  .page-footer .credit .author {
    font-weight: 700; color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #1557b0);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; padding: 0 2px;
  }

  /* Print Styles */
  @media print {
    .header, .stats-bar, .filter-row, .search-box, .action-btns,
    .btn, .pagination, .modal-overlay, .tab-bar, .nav-section, .page-footer, .nav-panel-overlay { display: none !important; }
    .container { padding: 0; }
    .table-card { box-shadow: none; border: 1px solid #ccc; }
    body { background: #fff; font-size: 12px; }
    th { background: #f5f5f5 !important; -webkit-print-color-adjust: exact; }
    .badge { border: 1px solid #999; }
    .print-title { display: block !important; text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
    .print-subtitle { display: block !important; text-align: center; font-size: 13px; color: #666; margin-bottom: 16px; }
    .print-header { display: block !important; }
  }
  .print-title, .print-subtitle, .print-header { display: none; }

  /* Toast */
  .toast-container { position: fixed; top: 24px; right: 24px; z-index: 2000; }
  .toast { padding: 14px 24px; border-radius: 12px; color: #fff; font-size: 14px; margin-bottom: 10px; animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: 0 8px 28px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.1); display: flex; align-items: center; gap: 8px; font-weight: 500; border: 1px solid rgba(255,255,255,0.15); backdrop-filter: blur(8px); }
  .toast-success { background: linear-gradient(135deg, rgba(52,168,83,0.95), rgba(45,146,73,0.95)); }
  .toast-error { background: linear-gradient(135deg, rgba(234,67,53,0.95), rgba(211,52,38,0.95)); }
  .toast-info { background: linear-gradient(135deg, rgba(26,115,232,0.95), rgba(21,87,176,0.95)); }
  @keyframes toastIn { from { opacity: 0; transform: translateX(50px) scale(0.9); } to { opacity: 1; transform: translateX(0) scale(1); } }

  @media (max-width: 768px) {
    .header { padding: 16px; flex-direction: column; gap: 12px; }
    .stats-bar { padding: 16px; gap: 10px; }
    .container { padding: 0 16px 16px; }
    .form-row { flex-direction: column; gap: 0; }
    .search-box input { width: 140px; }
    .header-actions { width: 100%; justify-content: center; padding: 14px 16px 18px; }
    .nav-grid { padding: 0; gap: 0; }
    .nav-card { padding: 4px 10px; margin: 2px; font-size: 12px; }
    .nav-panel { max-height: 90vh; }
    .nav-manage-table { font-size: 12px; }
    .nav-manage-table th, .nav-manage-table td { padding: 8px 10px; }
    .cadre-panel { max-height: 92vh; }
    .cadre-panel-body { padding: 16px; }
    .shift-panel { max-height: 92vh; }
    .shift-panel-body { padding: 16px; }
  }

  /* ===== Joint Panel (共建联络) ===== */
  .joint-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.55); z-index: 1000;
    backdrop-filter: blur(8px);
  }
  .joint-overlay.active { display: flex; align-items: center; justify-content: center; }
  .joint-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    border-radius: 20px; width: 1100px; max-width: 98vw;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 32px 80px rgba(10,30,80,0.22), 0 0 0 1.5px rgba(26,115,232,0.10);
  }
  .joint-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px 16px; border-bottom: 1.5px solid #e8edf5;
    flex-shrink: 0;
  }
  .joint-panel-title {
    font-size: 20px; font-weight: 800; color: var(--gray-900);
    letter-spacing: 1px;
  }
  .joint-header-close {
    background: none; border: none; font-size: 26px; cursor: pointer;
    color: var(--gray-400); line-height: 1; padding: 0 4px;
  }
  .joint-header-close:hover { color: var(--danger); }
  .joint-panel-toolbar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 28px; border-bottom: 1px solid #eef1f6; flex-shrink: 0;
    flex-wrap: wrap;
  }
  .joint-search-input {
    flex: 1; min-width: 160px; max-width: 280px;
    border: 1.5px solid #dde3ee; border-radius: 8px;
    padding: 7px 12px; font-size: 14px; outline: none;
  }
  .joint-search-input:focus { border-color: var(--primary); }
  .joint-panel-body {
    flex: 1; overflow-y: auto; padding: 16px 28px;
  }
  .joint-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
  }
  .joint-table th {
    background: #f0f4ff; color: var(--gray-700); font-weight: 700;
    padding: 10px 12px; text-align: left; border-bottom: 2px solid #dde3ee;
    white-space: nowrap; position: sticky; top: 0; z-index: 1;
  }
  .joint-table td {
    padding: 9px 12px; border-bottom: 1px solid #f0f2f7;
    color: var(--gray-800); vertical-align: middle;
  }
  .joint-table tr:hover td { background: #f5f8ff; }
  .joint-group-row td {
    background: #e8f0fe !important; font-weight: 700;
    color: var(--primary); font-size: 13px;
  }
  .joint-panel-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px; border-top: 1.5px solid #e8edf5; flex-shrink: 0;
    flex-wrap: wrap; gap: 10px;
  }
  .joint-edit-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10,30,60,0.5); z-index: 2000; align-items: center; justify-content: center;
  }
  .joint-edit-overlay.active { display: flex; }
  .joint-edit-modal {
    background: #fff; border-radius: 16px; width: 540px; max-width: 96vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  }
  .joint-edit-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px 14px; border-bottom: 1px solid #eef1f6;
  }
  .joint-edit-modal-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
  .joint-edit-modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
  .joint-form-group { display: flex; flex-direction: column; gap: 5px; }
  .joint-form-group label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
  .joint-form-group input {
    border: 1.5px solid #dde3ee; border-radius: 8px; padding: 8px 12px;
    font-size: 14px; outline: none; font-family: inherit;
  }
  .joint-form-group input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
  }
  .joint-form-row { display: flex; gap: 12px; }
  .joint-form-row .joint-form-group { flex: 1; }
  .joint-edit-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 24px; border-top: 1px solid #eef1f6;
  }
  @media (max-width: 900px) {
    .joint-panel { max-height: 94vh; }
    .joint-panel-body { padding: 10px; }
  }

  /* ===== Community Data Panel (社区数据) ===== */
  .cd-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(8,20,50,0.6); z-index: 1000;
    backdrop-filter: blur(10px);
  }
  .cd-overlay.active { display: flex; align-items: flex-start; justify-content: center; padding: 20px 0; overflow-y: auto; }
  .cd-panel {
    background: #f0f4fa;
    border-radius: 20px; width: 1180px; max-width: 98vw;
    min-height: 80vh; display: flex; flex-direction: column;
    box-shadow: 0 32px 80px rgba(8,20,80,0.28), 0 0 0 1.5px rgba(26,115,232,0.12);
    margin: auto;
  }
  .cd-panel-header {
    background: linear-gradient(135deg, #062654 0%, #0e3f91 40%, #1a73e8 100%);
    border-radius: 20px 20px 0 0;
    padding: 22px 32px 18px;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
  }
  .cd-panel-header-left { display: flex; flex-direction: column; gap: 2px; }
  .cd-panel-title {
    font-size: 20px; font-weight: 800; color: #fff;
    letter-spacing: 2px; text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
  .cd-panel-subtitle { font-size: 12px; color: rgba(255,255,255,0.7); letter-spacing: 1px; }
  .cd-header-close {
    background: rgba(255,255,255,0.15); border: none; border-radius: 50%; width: 36px; height: 36px;
    font-size: 22px; cursor: pointer; color: #fff; line-height: 1; display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
  }
  .cd-header-close:hover { background: rgba(255,255,255,0.28); }

  /* 统计卡片区 */
  .cd-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    padding: 22px 28px 10px;
    flex-shrink: 0;
  }
  .cd-stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px 16px;
    box-shadow: 0 2px 10px rgba(26,115,232,0.08), 0 1px 3px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    border: 2px solid transparent;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; gap: 6px;
  }
  .cd-stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    border-radius: 14px 14px 0 0;
  }
  .cd-stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(26,115,232,0.18); }
  .cd-stat-card.active { border-color: var(--card-color, #1a73e8); box-shadow: 0 4px 20px rgba(26,115,232,0.25); }
  .cd-stat-card[data-cat="低保户"]    { --card-color: #ea4335; }
  .cd-stat-card[data-cat="特困户"]    { --card-color: #ff6d00; }
  .cd-stat-card[data-cat="党员"]      { --card-color: #d93025; }
  .cd-stat-card[data-cat="退役军人"]  { --card-color: #1a73e8; }
  .cd-stat-card[data-cat="重点人员"]  { --card-color: #7b1fa2; }
  .cd-stat-card[data-cat="社区常住人口"] { --card-color: #34a853; }
  .cd-stat-card::before { background: var(--card-color, #1a73e8); }
  .cd-stat-card .cd-card-icon { font-size: 28px; line-height: 1; }
  .cd-stat-card .cd-card-count {
    font-size: 32px; font-weight: 800; color: var(--card-color, #1a73e8);
    line-height: 1;
  }
  .cd-stat-card .cd-card-label { font-size: 14px; font-weight: 600; color: var(--gray-700); }
  .cd-stat-card .cd-card-sub { font-size: 11px; color: var(--gray-500); }
  .cd-stat-card .cd-card-arrow {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    color: var(--card-color, #1a73e8); opacity: 0.35; font-size: 18px;
  }

  /* 花名册面板区 */
  .cd-roster-area {
    flex: 1; padding: 0 28px 22px; display: flex; flex-direction: column; gap: 0;
    min-height: 0;
  }
  .cd-roster-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 0 12px; flex-wrap: wrap; gap: 10px; flex-shrink: 0;
  }
  .cd-roster-title {
    font-size: 16px; font-weight: 700; color: var(--gray-900);
    display: flex; align-items: center; gap: 8px;
  }
  .cd-roster-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--card-color, #1a73e8); color: #fff;
    border-radius: 20px; padding: 1px 10px; font-size: 12px; font-weight: 600;
  }
  .cd-roster-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .cd-search-input {
    border: 1.5px solid #dde3ee; border-radius: 8px;
    padding: 7px 12px; font-size: 14px; outline: none; min-width: 180px;
  }
  .cd-search-input:focus { border-color: var(--primary); }
  .cd-roster-wrap {
    background: #fff; border-radius: 14px;
    box-shadow: 0 2px 10px rgba(26,115,232,0.07);
    overflow: hidden; flex: 1; display: flex; flex-direction: column;
    min-height: 300px;
  }
  .cd-roster-table-wrap { overflow-y: auto; flex: 1; }
  .cd-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
  }
  .cd-table th {
    background: #f0f4ff; color: var(--gray-700); font-weight: 700;
    padding: 11px 14px; text-align: left; border-bottom: 2px solid #dde3ee;
    white-space: nowrap; position: sticky; top: 0; z-index: 1;
  }
  .cd-table td {
    padding: 9px 14px; border-bottom: 1px solid #f0f2f7;
    color: var(--gray-800); vertical-align: middle;
  }
  .cd-table tr:hover td { background: #f5f8ff; }
  .cd-table .cd-no-data { text-align: center; padding: 60px; color: var(--gray-500); font-size: 15px; }
  .cd-roster-footer {
    padding: 10px 16px; background: #f8fafd; border-top: 1px solid #eef1f6;
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
    font-size: 13px; color: var(--gray-500);
  }
  /* 分类管理工具栏 */
  .cd-cat-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 14px 28px 0; flex-shrink: 0; flex-wrap: wrap;
  }
  .cd-cat-btn {
    padding: 6px 16px; border-radius: 20px; border: 1.5px solid #dde3ee;
    background: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
    color: var(--gray-700); transition: all 0.15s; white-space: nowrap;
  }
  .cd-cat-btn:hover { border-color: #1a73e8; color: #1a73e8; background: #e8f0fe; }
  .cd-cat-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
  .cd-cat-btn-manage {
    padding: 6px 12px; border-radius: 20px; border: 1.5px dashed #c0c7d4;
    background: transparent; font-size: 13px; cursor: pointer;
    color: var(--gray-500); transition: all 0.15s;
  }
  .cd-cat-btn-manage:hover { border-color: #1a73e8; color: #1a73e8; }

  /* 分类管理弹窗 */
  .cd-catmgr-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 3000;
    align-items: center; justify-content: center;
  }
  .cd-catmgr-overlay.active { display: flex; }
  .cd-catmgr-modal {
    background: #fff; border-radius: 16px; width: 460px; max-width: 96vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  }
  .cd-catmgr-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px 14px; border-bottom: 1px solid #eef1f6;
  }
  .cd-catmgr-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
  .cd-catmgr-body { padding: 16px 24px; max-height: 50vh; overflow-y: auto; }
  .cd-catmgr-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0; border-bottom: 1px solid #f0f2f7;
  }
  .cd-catmgr-item:last-child { border-bottom: none; }
  .cd-catmgr-icon { font-size: 20px; width: 28px; text-align: center; cursor: pointer; }
  .cd-catmgr-name-input {
    flex: 1; border: 1.5px solid #dde3ee; border-radius: 6px;
    padding: 5px 10px; font-size: 14px; outline: none;
  }
  .cd-catmgr-name-input:focus { border-color: var(--primary); }
  .cd-catmgr-del { background: none; border: none; color: #ea4335; font-size: 18px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
  .cd-catmgr-del:hover { background: #fde8e8; }
  .cd-catmgr-add-row { display: flex; gap: 8px; padding: 12px 0 4px; }
  .cd-catmgr-add-input {
    flex: 1; border: 1.5px solid #dde3ee; border-radius: 8px;
    padding: 7px 12px; font-size: 14px; outline: none;
  }
  .cd-catmgr-add-input:focus { border-color: var(--primary); }
  .cd-catmgr-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 24px; border-top: 1px solid #eef1f6;
  }

  /* 花名册编辑弹窗 */
  .cd-edit-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(8,20,50,0.5); z-index: 2500;
    align-items: center; justify-content: center;
  }
  .cd-edit-overlay.active { display: flex; }
  .cd-edit-modal {
    background: #fff; border-radius: 16px; width: 560px; max-width: 96vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.22);
    max-height: 90vh; display: flex; flex-direction: column;
  }
  .cd-edit-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px 14px; border-bottom: 1px solid #eef1f6; flex-shrink: 0;
  }
  .cd-edit-modal-header h3 { font-size: 16px; font-weight: 700; color: var(--gray-900); }
  .cd-edit-modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
  .cd-form-group { display: flex; flex-direction: column; gap: 5px; }
  .cd-form-group label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
  .cd-form-group input, .cd-form-group select, .cd-form-group textarea {
    border: 1.5px solid #dde3ee; border-radius: 8px; padding: 8px 12px;
    font-size: 14px; outline: none; font-family: inherit;
  }
  .cd-form-group input:focus, .cd-form-group select:focus, .cd-form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
  }
  .cd-form-row { display: flex; gap: 12px; }
  .cd-form-row .cd-form-group { flex: 1; }
  .cd-edit-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 24px; border-top: 1px solid #eef1f6; flex-shrink: 0;
  }
  /* 卡片颜色映射辅助 */
  .cd-cat-pill {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 12px; font-weight: 600;
    background: #e8f0fe; color: #1a73e8;
  }
  @media(max-width:900px){
    .cd-panel { max-height: 96vh; }
    .cd-stats-grid { grid-template-columns: repeat(2,1fr); padding: 14px; gap: 10px; }
    .cd-roster-area { padding: 0 10px 14px; }
    .cd-cat-bar { padding: 10px 10px 0; }
  }

  body.auth-locked > :not(.auth-gate) {
    display: none !important;
  }

  .auth-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(rgba(10,20,35,0.38), rgba(10,20,35,0.48)), var(--login-bg, url('/logo.jpg')) center/cover no-repeat;
  }

  .auth-gate[hidden] {
    display: none !important;
  }

  .auth-card {
    width: min(380px, 100%);
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 28px;
  }

  .auth-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 6px;
  }

  .auth-subtitle {
    font-size: 13px;
    color: var(--gray-700);
    margin-bottom: 22px;
  }

  .auth-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-700);
    margin: 14px 0 7px;
  }

  .auth-input {
    width: 100%;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    outline: none;
  }

  .auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
  }

  .auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 22px;
  }

  .auth-error {
    min-height: 20px;
    margin-top: 12px;
    color: var(--danger);
    font-size: 13px;
    text-align: center;
  }

  .auth-footer {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 22px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
  }

  body.role-viewer .admin-only,
  body.role-viewer .write-action {
    display: none !important;
  }

  body.role-viewer .nav-float-actions,
  body.role-viewer #batchDeleteBtn,
  body.role-viewer #batchDoneBtn {
    display: none !important;
  }


