    :root {
      --bg-1: #f4f7ff;
      --bg-2: #f6f9f1;
      --ink: #1b1f2a;
      --sub: #51607a;
      --line: #d9e0ee;
      --accent: #2b7a78;
      --accent-2: #1f4d4c;
      --sidebar: #dfeee2;
      --sidebar-accent: #b9d8c1;
      --danger: #c0392b;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
      color: var(--ink);
      background: radial-gradient(1200px 500px at 10% -10%, #d9e5ff 0%, transparent 60%),
                  radial-gradient(1200px 500px at 90% -20%, #d9f2e2 0%, transparent 60%),
                  linear-gradient(135deg, var(--bg-1), var(--bg-2));
      min-height: 100vh;
    }
    .shell {
      display: grid;
      grid-template-columns: 240px 1fr;
      min-height: 100vh;
    }
    .sidebar {
      background: var(--sidebar);
      color: #1f2d3d;
      padding: 18px 12px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .brand {
      font-weight: 700;
      font-size: 18px;
      color: #1f4d4c;
      padding: 12px 10px;
      border-bottom: 1px solid rgba(0,0,0,0.08);
    }
    .nav-btn {
      border: none;
      background: var(--sidebar-accent);
      color: #1b1f2a;
      padding: 10px 12px;
      border-radius: 10px;
      text-align: left;
      cursor: pointer;
      font-size: 14px;
    }
    .nav-btn.active {
      background: var(--accent);
    }
    .nav-btn.exit {
      background: var(--danger);
      color: #fff;
    }
    .nav-btn.admin {
      background: #cfe6f5;
    }
    .sidebar-status {
      border-radius: 12px;
      background: #f7fbf8;
      border: 1px solid rgba(0,0,0,0.08);
      padding: 10px 12px;
      font-size: 12px;
      color: #1f2d3d;
    }
    .sidebar-spacer {
      margin-top: 64px;
    }
    .sidebar-footer {
      margin-top: 4px;
      font-size: 12px;
      color: #1b57f0;
      font-weight: 700;
      padding: 10px;
      line-height: 1.4;
    }
    .content {
      padding: 24px 26px 60px;
    }
    h1 {
      margin: 0 0 10px;
      font-size: 24px;
      letter-spacing: 1px;
    }
    .sub {
      color: var(--sub);
      margin-bottom: 18px;
    }
    .welcome-hint {
      color: #1b57f0;
    }
    .card {
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 22px;
      box-shadow: 0 10px 30px rgba(20, 30, 60, 0.08);
    }
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 14px;
    }
    label {
      font-size: 12px;
      color: var(--sub);
      display: block;
      margin-bottom: 6px;
    }
    input, select, button, textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 14px;
      background: #fff;
    }
    textarea {
      min-height: 160px;
      font-family: "Cascadia Mono", "Consolas", monospace;
      resize: vertical;
      color: #1f2d3d;
      background: #f8fafc;
    }
    .actions {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 16px;
    }
    button {
      background: var(--accent);
      color: #fff;
      border: none;
      font-weight: 700;
      cursor: pointer;
      transition: transform .15s ease, background .15s ease;
    }
    button:hover { background: var(--accent-2); transform: translateY(-1px); }
    .status {
      margin-top: 16px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #f3f6ff;
      border: 1px dashed var(--line);
      color: var(--sub);
    }
    .download a {
      display: inline-block;
      margin-top: 10px;
      color: var(--accent-2);
      font-weight: 700;
      text-decoration: none;
    }
    .download-btn {
      display: inline-block;
      padding: 8px 14px;
      border-radius: 10px;
      background: #2ecc71;
      color: #fff;
      font-weight: 700;
      text-decoration: none;
    }
    .download-btn:hover { background: #27ae60; }
    .download a:hover { text-decoration: underline; }
    .section { display: none; }
    .section.active { display: block; }
    .panel {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: #fbfcff;
    }
    .panel-title {
      font-size: 13px;
      color: var(--sub);
      margin: 0 0 10px;
      font-weight: 700;
    }
    .panel.disabled {
      opacity: 0.55;
      filter: grayscale(0.25);
    }
    .panel.disabled select,
    .panel.disabled input {
      background: #f0f3f8;
      cursor: not-allowed;
    }
    .auth-card {
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 16px;
      background: linear-gradient(135deg, #f7fbff 0%, #eef6f2 100%);
      margin-bottom: 18px;
      box-shadow: 0 10px 24px rgba(20, 30, 60, 0.08);
    }
    .auth-row {
      display: grid;
      grid-template-columns: 1.1fr 1fr;
      gap: 16px;
    }
    .auth-tabs {
      display: flex;
      gap: 10px;
      margin-bottom: 10px;
    }
    .auth-tab {
      border: 1px solid var(--line);
      background: #fff;
      color: var(--ink);
      padding: 8px 12px;
      border-radius: 10px;
      cursor: pointer;
      font-weight: 700;
    }
    .auth-tab.active {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }
    .auth-tab.admin.active {
      background: #1e4fa3;
      border-color: #1e4fa3;
    }
    .auth-form {
      display: none;
    }
    .auth-form.active {
      display: block;
    }
    .auth-form.login-box {
      background: #ffffff;
      border: 1px solid #d6e2f4;
      border-radius: 12px;
      padding: 14px;
    }
    .auth-form.register-box {
      background: #fff8f2;
      border: 1px solid #f0ddc9;
      border-radius: 12px;
      padding: 14px;
    }
    .auth-title {
      margin: 0 0 8px;
      font-size: 14px;
      font-weight: 700;
      color: #1e4fa3;
    }
    .auth-title.admin {
      color: #1f4d4c;
    }
    .auth-hint {
      font-size: 12px;
      color: #51607a;
      margin-bottom: 8px;
    }
    .auth-inline {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .auth-message {
      margin-top: 8px;
      font-size: 13px;
      color: #1e4fa3;
    }
    .auth-message.error {
      color: var(--danger);
    }
    .auth-user {
      padding: 10px 12px;
      border-radius: 10px;
      background: #eef3ff;
      color: #1b1f2a;
      font-size: 13px;
    }
    .auth-user strong {
      color: #1f4d4c;
    }
    .auth-actions {
      display: flex;
      gap: 10px;
      margin-top: 12px;
    }
    .auth-actions button {
      width: auto;
      padding: 8px 14px;
    }
    .section-locked {
      opacity: 0.6;
      filter: grayscale(0.2);
      pointer-events: none;
    }
    .admin-panel {
      margin-top: 16px;
      padding: 14px;
      border-radius: 12px;
      border: 1px solid var(--line);
      background: #f5fbff;
    }
    .tips-panel {
      border: 1px solid var(--line);
      border-radius: 14px;
      padding: 12px;
      background: #fdf7f1;
      color: #5b4b3a;
      line-height: 1.6;
      font-size: 13px;
    }
    .tips-panel h3 {
      margin: 0 0 8px;
      font-size: 14px;
      color: #8a5a2b;
    }
    .user-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 12px;
    }
    .user-table th,
    .user-table td {
      border-bottom: 1px dashed #d6e2f4;
      padding: 6px 8px;
      text-align: left;
    }
    .user-table th {
      color: #1e4fa3;
    }
    .user-table button {
      width: auto;
      padding: 4px 8px;
      font-size: 12px;
    }
    .admin-reset-box {
      display: none;
      margin-top: 10px;
    }
    .tag {
      display: inline-block;
      padding: 4px 8px;
      border-radius: 999px;
      background: #eef3ff;
      color: #2c3e50;
      font-size: 12px;
      margin-right: 6px;
    }
    .summary-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
      margin: 16px 0;
    }
    .summary-card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fbfcff;
      padding: 12px;
    }
    .summary-card .label {
      color: var(--sub);
      font-size: 12px;
    }
    .summary-card .value {
      margin-top: 6px;
      color: var(--accent-2);
      font-size: 24px;
      font-weight: 700;
    }
    .detail-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
      background: #fff;
    }
    .detail-table th,
    .detail-table td {
      border-bottom: 1px dashed #d6e2f4;
      padding: 8px 10px;
      text-align: left;
    }
    .detail-table th {
      color: #1e4fa3;
      background: #f5fbff;
    }
    .listbox {
      height: 180px;
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 8px;
      background: #fff;
      text-align: left;
      direction: ltr;
    }
    .listbox label {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      margin: 4px 0;
      color: var(--ink);
      font-size: 13px;
      justify-content: flex-start;
      width: 100%;
      text-align: left;
      flex-wrap: nowrap;
    }
    .listbox label span {
      flex: 1;
      text-align: left;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .listbox-item {
      display: grid;
      grid-template-columns: auto 120px 1fr;
      align-items: center;
      gap: 12px;
      padding: 6px 8px;
      border-bottom: 1px dashed #e6edf7;
    }
    .listbox-item:last-child {
      border-bottom: none;
    }
    .listbox-item input {
      width: auto;
      margin: 0;
    }
    .listbox-item span {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-align: left;
    }
    .listbox-item .ann-date {
      color: #4c5d7a;
      font-weight: 700;
    }
    .listbox-item .ann-title {
      min-width: 0;
    }
    .pc-tight {
      margin-top: 10px;
    }
    #pcAnnouncements {
      text-align: left;
      direction: ltr;
    }
    .header-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 8px;
    }
    .help-btn {
      width: auto;
      padding: 8px 14px;
      border-radius: 10px;
      background: #f2a316;
      color: #fff;
      font-weight: 700;
      border: none;
    }
    .help-btn:hover { background: #d98e0f; }
    .secondary-btn {
      width: auto;
      padding: 6px 12px;
      border-radius: 10px;
      background: #2b7a78;
      color: #fff;
      border: none;
      font-weight: 700;
    }
    .secondary-btn:hover { background: #1f4d4c; }
    .modal {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(15, 18, 26, 0.45);
      z-index: 1000;
      padding: 20px;
    }
    .modal.show { display: flex; }
    .modal-content {
      width: min(920px, 95vw);
      max-height: 88vh;
      overflow: auto;
      background: #ffffff;
      border-radius: 16px;
      border: 1px solid var(--line);
      box-shadow: 0 18px 40px rgba(20, 30, 60, 0.2);
    }
    .modal-content.resizable {
      resize: both;
      overflow: auto;
      min-width: 520px;
      min-height: 360px;
    }
    .modal-content.maximized {
      width: 96vw;
      height: 92vh;
      max-height: 92vh;
      max-width: 96vw;
      resize: none;
    }
    .modal-header .modal-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      background: #f3f6ff;
      border-bottom: 1px solid var(--line);
    }
    .modal-title {
      font-weight: 700;
      font-size: 16px;
      color: #1e4fa3;
    }
    .activity-list {
      margin: 8px 0 0;
      padding-left: 16px;
    }
    .activity-list li {
      margin: 4px 0;
      font-size: 13px;
    }
    .activity-table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 10px;
      font-size: 12px;
    }
    .activity-table th,
    .activity-table td {
      border-bottom: 1px dashed #d6e2f4;
      padding: 6px 8px;
      text-align: left;
    }
    .activity-table th {
      color: #1e4fa3;
    }
    .pagination {
      display: flex;
      gap: 8px;
      align-items: center;
      margin-top: 10px;
    }
    .pagination button {
      width: auto;
      padding: 6px 10px;
    }
    .modal-body {
      padding: 18px 22px 26px;
      color: #1b1f2a;
      line-height: 1.7;
      font-size: 14px;
    }
    .modal-body h3 {
      margin: 14px 0 6px;
      font-size: 15px;
      color: #1f4d4c;
    }
    .modal-body ul { margin: 6px 0 12px 18px; }
    .modal-body li { margin: 2px 0; }
    .danger-line {
      color: #c0392b;
      font-weight: 700;
    }
    .form-label {
      color: #1e4fa3;
      font-weight: 700;
    }
    #fuzhu input[type="file"]::file-selector-button {
      background: #2ecc71;
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 8px;
      margin-right: 10px;
      cursor: pointer;
    }
    #fuzhu input[type="file"]::-webkit-file-upload-button {
      background: #2ecc71;
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 8px;
      margin-right: 10px;
      cursor: pointer;
    }
    #hanzheng input[type="file"]::file-selector-button {
      background: #2ecc71;
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 8px;
      margin-right: 10px;
      cursor: pointer;
    }
    #hanzheng input[type="file"]::-webkit-file-upload-button {
      background: #2ecc71;
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 8px;
      margin-right: 10px;
      cursor: pointer;
    }
    #workday input[type="file"]::file-selector-button {
      background: #2ecc71;
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 8px;
      margin-right: 10px;
      cursor: pointer;
    }
    #workday input[type="file"]::-webkit-file-upload-button {
      background: #2ecc71;
      color: #fff;
      border: none;
      padding: 6px 10px;
      border-radius: 8px;
      margin-right: 10px;
      cursor: pointer;
    }
    .message-layout {
      display: grid;
      grid-template-columns: 280px 1fr;
      gap: 14px;
      min-height: 520px;
    }
    .message-layout.user-only {
      grid-template-columns: 1fr;
    }
    .message-user-list {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fbfcff;
      overflow: auto;
      max-height: 520px;
    }
    .message-user-item {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      align-items: center;
      width: 100%;
      border: none;
      border-bottom: 1px dashed #d6e2f4;
      border-radius: 0;
      background: #fff;
      color: #1b1f2a;
      padding: 10px 12px;
      font-weight: 400;
    }
    .message-user-item.active {
      background: #e8f2ff;
      color: #1e4fa3;
      font-weight: 700;
    }
    .message-badge {
      background: #d63031;
      color: #fff;
      border-radius: 999px;
      padding: 1px 7px;
      font-size: 12px;
    }
    .message-chat-box {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      display: flex;
      flex-direction: column;
      height: 520px;
      overflow: hidden;
    }
    .message-chat-header {
      padding: 12px;
      border-bottom: 1px solid var(--line);
      color: #1e4fa3;
      font-weight: 700;
    }
    .message-chat-window {
      flex: 1;
      overflow-y: auto;
      padding: 12px;
      background: #f8fbff;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .message-item {
      max-width: 78%;
      padding: 8px 10px;
      border-radius: 10px;
      line-height: 1.5;
      font-size: 13px;
      border: 1px solid #d6e2f4;
      background: #fff;
      align-self: flex-start;
    }
    .message-item.self {
      background: #eaf9f0;
      border-color: #b8e4c7;
      align-self: flex-end;
    }
    .message-meta {
      margin-top: 4px;
      color: #6b7c93;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: wrap;
    }
    .message-read-mark {
      font-weight: 700;
      font-size: 12px;
      line-height: 1;
    }
    .message-read-mark.read {
      color: #2ecc71;
    }
    .message-read-mark.unread {
      color: #9aa3af;
    }
    .message-input-row {
      display: grid;
      grid-template-columns: 120px 1fr auto;
      gap: 8px;
      padding: 12px;
      border-top: 1px solid var(--line);
      background: #fff;
    }
    .message-input-row.user {
      grid-template-columns: 120px auto 1fr auto;
    }
    .message-input-row.admin {
      grid-template-columns: auto 1fr auto;
    }
    .message-input-row textarea {
      min-height: 74px;
      resize: vertical;
      overflow-y: auto;
      font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
      background: #fff;
    }
    .message-tip {
      color: #51607a;
      font-size: 12px;
      padding: 10px 12px;
      border-top: 1px dashed #d6e2f4;
      background: #f8fbff;
    }
    .message-upload-row {
      display: flex;
      gap: 8px;
      align-items: center;
      padding: 0 12px 10px;
      background: #fff;
    }
    .message-upload-row input[type="file"] {
      flex: 1;
      padding: 6px 8px;
      font-size: 12px;
    }
    .message-attach-btn {
      width: auto;
      padding: 7px 12px;
      background: #2b7a78;
    }
    .message-attach-btn:hover {
      background: #1f4d4c;
    }
    .message-attach-btn:disabled {
      background: #9aa3af;
      cursor: not-allowed;
      transform: none;
    }
    .emoji-btn {
      width: auto;
      padding: 7px 10px;
      border-radius: 10px;
      background: #f3f6ff;
      color: #1f4d4c;
      border: 1px solid var(--line);
      font-weight: 700;
    }
    .emoji-btn:hover {
      background: #e9eefc;
      transform: none;
    }
    .emoji-panel {
      display: none;
      flex-wrap: wrap;
      gap: 6px;
      padding: 8px 12px 10px;
      background: #fff;
      border-top: 1px dashed #d6e2f4;
      max-height: 160px;
      overflow-y: auto;
    }
    .emoji-panel.show {
      display: flex;
    }
    .emoji-item {
      width: auto;
      min-width: 34px;
      padding: 6px 8px;
      border-radius: 8px;
      background: #f8fbff;
      border: 1px solid #d6e2f4;
      font-size: 16px;
      line-height: 1;
    }
    .emoji-item:hover {
      background: #eaf2ff;
      transform: none;
    }
    @media (max-width: 860px) {
      .shell { grid-template-columns: 1fr; }
      .sidebar { flex-direction: row; flex-wrap: wrap; }
      .sidebar-footer { display: none; }
      .message-layout {
        grid-template-columns: 1fr;
      }
    }
