:root {
  color-scheme: light;
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --layout-max-width: 980px;
  --text: #1f2933;
  --text-muted: #52606d;
  --border: #e2e8f0;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --accent: #7c3aed;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 26px rgba(31, 41, 51, 0.10);
  --shadow-hover: 0 16px 36px rgba(31, 41, 51, 0.14);
  --focus: rgba(59, 130, 246, 0.35);

  /* UI 主题变量（页面级） */
  --page-work-start: rgba(13, 148, 136, 0.92);
  --page-work-end: rgba(2, 132, 199, 0.92);
  --page-records-start: rgba(5, 150, 105, 0.92);
  --page-records-end: rgba(14, 116, 144, 0.92);
  --page-manage-start: rgba(3, 105, 161, 0.92);
  --page-manage-end: rgba(8, 145, 178, 0.92);
  --page-profile-start: rgba(30, 64, 175, 0.90);
  --page-profile-end: rgba(14, 116, 144, 0.90);

  --surface-accent-soft: rgba(20, 184, 166, 0.10);
  --status-info-bg: rgba(13, 148, 136, 0.10);
  --status-error-bg: rgba(220, 38, 38, 0.12);
  --empty-border: rgba(13, 148, 136, 0.32);
  --empty-title: #0f766e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(circle at top, rgba(124, 58, 237, 0.14), transparent 46%),
    radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.16), transparent 42%),
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.10), transparent 44%),
    linear-gradient(180deg, #f8fafc, var(--bg) 42%);
  color: var(--text);
}

.container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 22px 20px 52px;
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: rgba(239, 246, 255, 0.80);
  border: none;
  border-bottom: 1px solid rgba(191, 219, 254, 0.70);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.page-header::before,
.page-header::after {
  display: none;
}

.page-header-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 12px 20px;
}

@media (min-width: 1024px) {
  :root {
    --layout-max-width: 1180px;
  }
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 220px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 1px 2px rgba(30, 58, 138, 0.18);
  border-radius: 16px;
  user-select: none;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-name {
  margin: 0;
  color: #1e3a8a;
}

.brand-link:hover .brand-name {
  color: #1e40af;
}

.brand-slogan {
  font-size: 12px;
  color: #3b82f6;
  white-space: nowrap;
}

.page-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.92), rgba(124, 58, 237, 0.92));
  color: rgba(255, 255, 255, 0.96);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.page-lead {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.segmented {
  display: inline-flex;
  align-items: center;
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 16px;
  background: rgba(239, 246, 255, 0.78);
  border: 1px solid rgba(191, 219, 254, 0.70);
  gap: 4px;
}

.segmented-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(30, 41, 59, 0.78);
  font-weight: 700;
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented-button:hover {
  background: rgba(37, 99, 235, 0.08);
}

.segmented-button.active {
  background: rgba(37, 99, 235, 0.14);
  color: #1e40af;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.16);
}

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

.header-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.header-back {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.2;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  margin-left: auto;
  position: relative;
  z-index: 1;
}

.top-nav a.button-link {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
  pointer-events: none;
}

.module-tile .nav-badge {
  top: 10px;
  right: 10px;
}

.top-nav .profile-trigger {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 12px;
}

.profile-trigger-circle {
  appearance: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(14, 116, 144, 0.34);
  background: linear-gradient(145deg, rgba(13, 148, 136, 0.98), rgba(14, 116, 144, 0.96));
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(14, 116, 144, 0.26);
  transition: transform 160ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.profile-trigger-circle:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 12px 22px rgba(14, 116, 144, 0.30);
  filter: saturate(1.04);
}

.profile-trigger-circle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.24), 0 12px 22px rgba(14, 116, 144, 0.30);
}

.profile-trigger-initial {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
}

.top-nav .button-link.button-secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(226, 232, 240, 0.80);
  color: #0f172a;
  box-shadow: none;
  backdrop-filter: none;
}

.top-nav .button-link.button-secondary:hover {
  background: rgba(255, 255, 255, 0.90);
  color: #0f172a;
}

.top-nav a.button-link.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(29, 78, 216, 0.48);
  color: #eff6ff;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.3);
  font-weight: 800;
  transform: translateY(-1px);
  position: relative;
}

.top-nav a.button-link.active::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.98);
}

.top-nav .button-link.button-secondary.active,
body:not(.dashboard):not(.login-page) .top-nav .button-link.button-secondary.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(29, 78, 216, 0.48);
  color: #eff6ff;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.3);
  font-weight: 800;
  transform: translateY(-1px);
}

.top-nav .profile-trigger.active,
.top-nav .top-nav-profile.open .profile-trigger {
  border-color: rgba(13, 148, 136, 0.42);
  box-shadow: 0 12px 24px rgba(13, 148, 136, 0.30);
  transform: scale(1.04);
}

.top-nav a.button-link.module-disabled::after {
  display: none;
}

.top-nav a.button-link.module-disabled {
  opacity: 0.62;
  filter: grayscale(0.25);
  cursor: not-allowed;
}

.top-nav a.button-link.module-disabled:hover {
  transform: none;
}

.top-nav-profile {
  position: relative;
}

.top-nav-profile .profile-dropdown {
  display: none;
  min-width: 182px;
  margin-top: 0;
}

.top-nav-profile.open .profile-dropdown {
  display: block;
}

.user-menu-item.module-disabled {
  opacity: 0.62;
  filter: grayscale(0.25);
  cursor: not-allowed;
}

.user-menu-item.module-disabled:hover {
  background: transparent;
}

.profile-dropdown-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 72;
}

.profile-dropdown-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.profile-menu-open {
  overflow: hidden;
}

@media (min-width: 769px) {
  .top-nav-profile .profile-dropdown {
    z-index: 76;
  }
}

.module-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  grid-auto-rows: minmax(96px, auto);
  margin: 0;
  padding: 0;
  align-items: stretch;
  justify-items: stretch;
  position: relative;
  z-index: 1;
}

.workbench-nav {
  margin: 0 0 14px;
}

.dashboard .container {
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: stretch;
}

.dashboard .workbench-nav {
  flex: 1;
  display: flex;
  align-items: stretch;
  margin: 0;
}

.dashboard .module-nav {
  flex: 1;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
}

.module-tile {
  --tile-accent-rgb: 37, 99, 235;
  --tile-bg-image: none;
  --tile-bg-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  padding: 14px;
  min-height: 96px;
  border-radius: 18px;
  background:
    radial-gradient(140px 140px at 100% 0%, rgba(var(--tile-accent-rgb), 0.22), transparent 60%),
    radial-gradient(140px 140px at 0% 100%, rgba(var(--tile-accent-rgb), 0.12), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.74));
  border: 1px solid rgba(226, 232, 240, 0.92);
  text-decoration: none;
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 12px 30px rgba(15, 23, 42, 0.08);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 180ms ease,
    border-color 180ms ease;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.module-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tile-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--tile-bg-position);
  opacity: 0.42;
  transform: none;
  pointer-events: none;
  z-index: 0;
}

.dashboard .module-tile::before {
  opacity: 0.56;
  filter: brightness(1.08) saturate(1.08);
}

.dashboard .module-title {
  color: #0f172a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.dashboard .module-desc {
  color: #334155;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.86);
}

.module-tile > * {
  position: relative;
  z-index: 1;
}

.dashboard .module-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.68) 0%,
    rgba(255, 255, 255, 0.34) 30%,
    rgba(255, 255, 255, 0) 62%
  );
  pointer-events: none;
  z-index: 0;
}

.module-icon {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(var(--tile-accent-rgb), 1),
    rgba(var(--tile-accent-rgb), 0.70)
  );
  box-shadow:
    0 10px 20px rgba(var(--tile-accent-rgb), 0.22),
    0 1px 0 rgba(255, 255, 255, 0.22) inset;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 180ms ease;
  pointer-events: none;
}

.module-icon svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.module-tile:hover {
  background:
    radial-gradient(150px 150px at 100% 0%, rgba(var(--tile-accent-rgb), 0.26), transparent 60%),
    radial-gradient(150px 150px at 0% 100%, rgba(var(--tile-accent-rgb), 0.14), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.995), rgba(255, 255, 255, 0.78));
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.74) inset,
    0 18px 44px rgba(15, 23, 42, 0.12);
}

.module-tile:hover .module-icon {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow:
    0 14px 26px rgba(var(--tile-accent-rgb), 0.26),
    0 1px 0 rgba(255, 255, 255, 0.24) inset;
}

.module-tile:focus-visible {
  outline: 2px solid rgba(var(--tile-accent-rgb), 0.38);
  outline-offset: 2px;
}

.module-disabled {
  opacity: 0.62;
  filter: grayscale(0.25);
  cursor: not-allowed;
}

.module-disabled:hover {
  transform: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.72) inset,
    0 12px 30px rgba(15, 23, 42, 0.08);
}

.module-disabled::after {
  content: "无权限";
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.06);
  color: rgba(30, 41, 59, 0.72);
  pointer-events: none;
}

.module-tile.active {
  background:
    radial-gradient(160px 160px at 100% 0%, rgba(var(--tile-accent-rgb), 0.30), transparent 60%),
    radial-gradient(160px 160px at 0% 100%, rgba(var(--tile-accent-rgb), 0.16), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.76));
  border-color: rgba(var(--tile-accent-rgb), 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.74) inset,
    0 18px 44px rgba(15, 23, 42, 0.12);
}

.module-tile-compact {
  min-height: 56px;
  padding: 12px;
  border-radius: 16px;
}

.tile-work {
  --tile-accent-rgb: 37, 99, 235;
  --tile-bg-image: url("/assets/module-bg/work.jpg");
  --tile-bg-position: 60% 40%;
}

.tile-my-records {
  --tile-accent-rgb: 14, 165, 233;
  --tile-bg-image: url("/assets/module-bg/my-records.jpg");
}

.tile-all-records {
  --tile-accent-rgb: 139, 92, 246;
  --tile-bg-image: url("/assets/module-bg/all-records.jpg");
  --tile-bg-position: 50% 40%;
}

.tile-projects {
  --tile-accent-rgb: 16, 185, 129;
  --tile-bg-image: url("/assets/module-bg/projects.jpg");
  --tile-bg-position: 55% 40%;
}

.tile-accounts {
  --tile-accent-rgb: 245, 158, 11;
  --tile-bg-image: url("/assets/module-bg/accounts.jpg");
  --tile-bg-position: 55% 40%;
}

.tile-profile {
  --tile-accent-rgb: 239, 68, 68;
  --tile-bg-image: url("/assets/module-bg/profile.jpg");
}

.tile-leaves {
  --tile-accent-rgb: 8, 145, 178;
  --tile-bg-image: url("/assets/module-bg/my-records.jpg");
}

.tile-vehicles {
  --tile-accent-rgb: 22, 163, 74;
  --tile-bg-image: url("/assets/module-bg/vehicles.jpg");
  --tile-bg-position: 50% 50%;
}

.module-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.module-desc {
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-muted);
}

.module-caret {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 12px;
  color: rgba(30, 41, 59, 0.55);
}

.user-pill {
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(239, 246, 255, 0.90);
  border: 1px solid rgba(226, 232, 240, 0.90);
  font-size: 13px;
  color: var(--text);
}

.user-menu-button {
  appearance: none;
  cursor: pointer;
  text-align: left;
  border: 0;
}

.user-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 10px;
  width: 172px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);
}

.user-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 13px;
  color: var(--text);
  background: transparent;
  border: none;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.user-menu-item:hover {
  background: rgba(239, 246, 255, 0.85);
  box-shadow: none;
  transform: none;
}

.user-menu-item.danger {
  color: #b91c1c;
}

.user-menu-item.danger:hover {
  background: rgba(254, 226, 226, 0.75);
}

.page-header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.page-header p {
  margin: 0;
  color: var(--text-muted);
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.55), rgba(124, 58, 237, 0.55));
  opacity: 0.65;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  font-weight: 600;
  color: var(--text);
}

.field span {
  font-size: 14px;
}

input,
select,
textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d7dee9;
  font-size: 14px;
  background: var(--surface-muted);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 6px;
  box-shadow: none;
  accent-color: var(--primary);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px var(--focus);
  background: #fff;
}

textarea {
  resize: vertical;
}

.work-editor {
  min-height: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #d7dee9;
  background: var(--surface-muted);
  font-size: 14px;
  line-height: 1.7;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.work-editor:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px var(--focus);
  background: #fff;
}

.work-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(100, 116, 139, 0.86);
  pointer-events: none;
}

.work-editor-actions {
  display: flex;
  justify-content: flex-start;
}

.work-editor-actions button {
  box-shadow: none;
}

.project-combobox {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 34px;
  align-items: stretch;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: var(--surface-muted);
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.project-combobox:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px var(--focus);
  background: #fff;
}

.project-combobox input {
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.project-combobox input:focus {
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: none;
  background: transparent;
}

.project-dropdown-toggle {
  width: 34px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
  color: #334155;
  box-shadow: none;
  line-height: 1;
  transition: background 140ms ease;
  margin-left: 0;
  position: relative;
  z-index: 1;
}

.project-dropdown-toggle svg {
  width: 14px;
  height: 14px;
  display: block;
  margin: 0 auto;
  transition: transform 160ms ease;
}

.project-dropdown-toggle:hover {
  background: linear-gradient(180deg, rgba(241, 245, 249, 1), rgba(226, 232, 240, 0.98));
}

.project-combobox.open .project-dropdown-toggle {
  background: linear-gradient(180deg, rgba(226, 232, 240, 1), rgba(203, 213, 225, 0.98));
}

.project-combobox.open .project-dropdown-toggle svg {
  transform: rotate(180deg);
}

.project-dropdown {
  position: absolute;
  z-index: 25;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #d1d5db !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  max-height: 160px;
  overflow: auto;
}

.participant-picker {
  position: relative;
  max-width: 100%;
}

.participant-picker .project-dropdown {
  left: 0;
  right: auto;
  width: 300px;
  max-width: 100%;
}

.participant-picker .project-dropdown-toggle {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.96));
  color: #334155;
}

.participant-picker .project-dropdown-toggle:hover {
  background: linear-gradient(180deg, rgba(241, 245, 249, 1), rgba(226, 232, 240, 0.98));
}

.participant-picker .project-combobox {
  width: 300px;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr) 34px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: var(--surface-muted);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.participant-picker .project-combobox.open .project-dropdown-toggle {
  background: linear-gradient(180deg, rgba(226, 232, 240, 1), rgba(203, 213, 225, 0.98));
}

.participant-picker .project-combobox:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px var(--focus);
  background: #fff;
}

.participant-picker .project-combobox input {
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.participant-picker .project-combobox input:focus {
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.26);
  box-shadow: none;
  background: transparent;
}

.participant-picker .file-chips {
  display: flex;
  flex-wrap: wrap;
  overflow: visible;
  max-width: 100%;
}

.participant-picker .file-chip {
  max-width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  align-items: center;
}

.participant-picker .file-chip-name {
  display: inline-block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .participant-picker {
    max-width: 100%;
  }
}

.project-dropdown-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: #e5e7eb !important;
  color: #0f172a;
  padding: 8px 12px;
  border-radius: 0;
  box-shadow: none;
  font-weight: 500;
}

.project-dropdown-item:last-child {
  border-bottom: 0;
}

.project-dropdown-item:hover:not(:disabled) {
  background: #cbd5e1 !important;
}

.project-dropdown-item.active:not(:disabled) {
  background: #bfdbfe !important;
  color: #1e3a8a;
}

.project-dropdown-item mark {
  background: rgba(251, 191, 36, 0.35);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

.project-dropdown-item:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

.file-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  max-width: 100%;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.92);
  color: #0f172a;
}

.file-chip-name {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.helper-text-inline {
  display: inline-block;
  margin: 0;
}

.project-description {
  white-space: pre-wrap;
  word-break: break-word;
}

.project-status-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-attachments-block {
  margin-top: 12px;
}

.project-attachments-title {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.project-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.project-attachment-search-field {
  margin-bottom: 10px;
}

.project-attachment-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.attachment-link {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 40px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(239, 246, 255, 0.88);
  color: #1d4ed8;
  text-decoration: none;
  word-break: break-all;
}

.attachment-link-name {
  font-weight: 700;
}

.attachment-link-meta {
  font-size: 12px;
  color: #475569;
}

.attachment-link:hover {
  background: rgba(219, 234, 254, 0.96);
}

.button-inline-danger {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  box-shadow: none;
}

.project-attachment-hint {
  margin-bottom: 8px;
}

.empty.empty-compact {
  padding: 12px 14px;
  font-size: 13px;
}

.work-editor-spacer {
  min-height: 24px;
}

.work-editor-image-block {
  position: relative;
  margin: 12px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.92), rgba(248, 250, 252, 0.96));
}

.work-editor-image-block img {
  display: block;
  width: min(100%, 300px);
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(255, 255, 255, 0.9);
}

.work-editor-image-remove {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  background: rgba(254, 242, 242, 0.96);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.work-editor-image-remove:hover {
  background: rgba(254, 226, 226, 0.98);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.field-inline span {
  font-size: 14px;
  color: var(--text-muted);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  font-weight: 600;
  color: var(--text);
}

.checkbox span {
  font-size: 14px;
  color: var(--text);
}

.pagination-bar {
  margin-top: 16px;
  margin-bottom: 16px;
}

.pagination-bar .actions {
  justify-content: space-between;
}

.pagination-bar input {
  width: 110px;
}

.table-footer {
  margin-top: 10px;
}

.table-footer .actions {
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(248, 250, 252, 0.88);
}

.table-footer select {
  width: 72px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(226, 232, 240, 0.90);
}

.table-footer input[type="number"] {
  width: 84px;
}

.table-footer .field-inline span {
  font-size: 12px;
}

.table-footer button.button-secondary {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 12px;
  box-shadow: none;
}

.table-footer .status {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(37, 99, 235, 0.06);
}

.pager-pages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border-radius: 12px;
  background: transparent;
}

button.pager-page {
  padding: 6px 10px;
  font-size: 12px;
  min-width: 34px;
  min-height: 32px;
  border-radius: 10px;
  box-shadow: none;
}

button.pager-page:not(:disabled):hover {
  background: #cbd5e1;
  transform: translateY(-1px);
}

button.pager-page.is-active:disabled {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #eff6ff;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.24);
  opacity: 1;
  cursor: default;
}

button.pager-page[aria-current="page"] {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #eff6ff;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.24);
}

.pager-ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
  user-select: none;
}

button {
  background: linear-gradient(135deg, var(--primary), #2563eb);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

/* 用于把 <a> 渲染成按钮样式（不引入额外构建步骤）。 */
a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

a.button-link:hover {
  transform: translateY(-1px);
}

button:hover {
  background: linear-gradient(135deg, var(--primary-dark), #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus), 0 10px 18px rgba(37, 99, 235, 0.22);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

button.button-secondary {
  background: #e2e8f0;
  color: var(--text);
  box-shadow: none;
}

/* 保持链接按钮与普通按钮风格一致 */
a.button-link.button-secondary {
  background: #e2e8f0;
  color: var(--text);
  box-shadow: none;
  border-color: rgba(148, 163, 184, 0.35);
}

button.button-secondary:hover {
  background: #cbd5e1;
  transform: translateY(-1px);
}

a.button-link.button-secondary:hover {
  background: #cbd5e1;
}

button.button-danger {
  background: linear-gradient(135deg, var(--danger), #ef4444);
}

button.button-danger:hover {
  background: linear-gradient(135deg, var(--danger-dark), #dc2626);
}

.status {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
}

.status:empty {
  display: none;
}

.status.error {
  color: #b42318;
  background: rgba(220, 38, 38, 0.1);
}

.work-page .status.success {
  position: fixed;
  right: 18px;
  top: 84px;
  z-index: 92;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.34);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.98), rgba(209, 250, 229, 0.95));
  color: #065f46;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(6, 95, 70, 0.22);
  animation: success-pop-in 220ms ease-out;
}

.work-page .status.success::before {
  content: '✓';
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
  font-size: 14px;
  font-weight: 800;
}

@keyframes success-pop-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(15, 23, 42, 0.92);
  color: rgba(226, 232, 240, 0.96);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.footer {
  margin-top: 20px;
  text-align: right;
}

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

.footer a + a {
  margin-left: 12px;
}

.footer a:hover {
  text-decoration: underline;
}

.readonly-field {
  border: 1px solid #d7dee9;
  background: var(--surface-muted);
  border-radius: 8px;
  padding: 10px 12px;
}

.readonly-text {
  display: inline-block;
  font-size: 14px;
  color: var(--text-muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #1e3a8a;
  background: rgba(37, 99, 235, 0.10);
  border: 1px solid rgba(37, 99, 235, 0.18);
  white-space: nowrap;
}

.tag.tag-muted {
  color: var(--text-muted);
  background: rgba(82, 96, 109, 0.10);
  border-color: rgba(82, 96, 109, 0.18);
}

.filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  align-items: end;
}

.filter.filter-in-card {
  margin-bottom: 12px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(248, 250, 252, 0.72);
}

.filter .field {
  margin-bottom: 0;
}

.filter .actions {
  align-self: end;
  justify-content: flex-start;
}

.records-filter {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  grid-auto-flow: dense;
}

.records-filter .field:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1;
}

.records-filter .field:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1;
}

.records-filter .field:nth-of-type(3) {
  grid-column: 3;
  grid-row: 1;
}

.records-filter .filter-actions-top {
  grid-column: 4 / 5;
  grid-row: 1;
  justify-self: end;
  justify-content: flex-end;
}

.records-filter .filter-search-row {
  grid-column: 1 / 3;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(165px, 240px) max-content max-content;
  align-items: end;
  column-gap: 6px;
  row-gap: 8px;
}

.records-filter .filter-search-row > button {
  justify-self: start;
  width: auto;
  min-width: 72px;
}

.records-filter .search-hit-status {
  justify-self: start;
  align-self: end;
  min-height: 32px;
  font-size: 12px;
  padding: 4px 8px;
  margin: 0;
}

.records-filter .filter-keyword {
  margin: 0;
}

.records-filter .filter-search-button {
  min-height: 40px;
}

@media (min-width: 920px) {
  .filter {
    grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(200px, 1fr)) auto;
  }
}

@media (max-width: 920px) {
  .records-filter {
    grid-template-columns: 1fr;
  }

  .records-filter .filter-actions-top,
  .records-filter .filter-search-row,
  .records-filter .filter-keyword {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }

  .records-filter .filter-search-row {
    grid-template-columns: 1fr;
  }
}

.section-title {
  margin: 0 0 16px;
  font-size: 18px;
}

.section-title.section-title-sm {
  margin-bottom: 10px;
  font-size: 16px;
}

.card.card-muted {
  padding: 16px;
  margin-top: 6px;
  box-shadow: none;
  background: rgba(248, 250, 252, 0.92);
}

.profile-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.profile-form .card-muted {
  grid-column: 1 / -1;
}

.profile-form .actions {
  grid-column: 1 / -1;
}

.profile-items {
  display: grid;
  gap: 12px;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(255, 255, 255, 0.62);
}

.profile-item.profile-item-danger {
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(254, 242, 242, 0.60);
}

.profile-item-main {
  min-width: 0;
}

.profile-item-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-item-value {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.profile-item-actions {
  flex: 0 0 auto;
}

.profile-actions {
  margin-top: 14px;
}

.records-section {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.helper-text {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.auth-card {
  min-height: 100%;
}

.login-page {
  background:
    radial-gradient(circle at 8% 8%, rgba(8, 145, 178, 0.16), transparent 42%),
    radial-gradient(circle at 92% 10%, rgba(30, 64, 175, 0.15), transparent 44%),
    linear-gradient(180deg, #ecfeff 0%, #eff6ff 36%, #f3f5f9 100%);
}

.login-page .container {
  padding-top: 26px;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(340px, 1fr);
  gap: 20px;
  align-items: stretch;
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  background:
    radial-gradient(circle at 82% 16%, rgba(14, 116, 144, 0.16), transparent 42%),
    linear-gradient(155deg, rgba(15, 118, 110, 0.09), rgba(30, 64, 175, 0.08));
  border-color: rgba(14, 116, 144, 0.18);
}

.login-kicker {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(14, 116, 144, 0.24);
  background: rgba(236, 254, 255, 0.7);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #155e75;
}

.login-hero-title {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.login-hero-text {
  margin: 14px 0 0;
  max-width: 52ch;
  color: #334155;
  font-size: 14px;
}

.login-points {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.login-point {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(255, 255, 255, 0.76);
  color: #0f172a;
  font-size: 12px;
  font-weight: 650;
}

.login-auth-grid {
  align-content: start;
}

.login-auth-grid .auth-card {
  border-radius: 18px;
  border-color: rgba(125, 211, 252, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.88));
}

.login-auth-grid .auth-card .section-title {
  margin-bottom: 8px;
}

.login-auth-grid .auth-card .helper-text {
  margin-bottom: 14px;
  color: #475569;
}

.login-auth-grid .field span {
  color: #334155;
}

.login-auth-grid input {
  background: rgba(248, 250, 252, 0.92);
  border-color: rgba(148, 163, 184, 0.35);
}

.login-auth-grid input:focus {
  border-color: rgba(14, 116, 144, 0.5);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.18);
}

.login-auth-grid button[type="submit"] {
  min-width: 126px;
  background: linear-gradient(135deg, #0f766e, #1d4ed8);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.22);
}

.login-auth-grid button[type="submit"]:hover {
  background: linear-gradient(135deg, #0f5f58, #1e40af);
  box-shadow: 0 12px 22px rgba(30, 64, 175, 0.24);
}

.account-section {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

body:not(.dashboard):not(.login-page) {
  background:
    radial-gradient(circle at 8% 6%, rgba(20, 184, 166, 0.10), transparent 36%),
    radial-gradient(circle at 92% 2%, rgba(14, 165, 233, 0.10), transparent 34%),
    linear-gradient(180deg, #f6fbff 0%, #f3f6fb 40%, #eef3f8 100%);
}

body:not(.dashboard):not(.login-page) .card {
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.30);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.90));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.85) inset,
    0 16px 36px rgba(15, 23, 42, 0.10);
}

body:not(.dashboard):not(.login-page) .card::before {
  height: 3px;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.62), rgba(14, 116, 144, 0.56));
  opacity: 0.9;
}

body:not(.dashboard):not(.login-page) .section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  letter-spacing: -0.01em;
}

body:not(.dashboard):not(.login-page) .section-title::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d9488, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}

body:not(.dashboard):not(.login-page) .helper-text,
body:not(.dashboard):not(.login-page) .page-lead {
  color: #475569;
}

body:not(.dashboard):not(.login-page) .filter.filter-in-card {
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.30);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.88), rgba(241, 245, 249, 0.84));
}

body:not(.dashboard):not(.login-page) .table-wrap {
  border-radius: 16px;
  border-color: rgba(148, 163, 184, 0.30);
  background: rgba(255, 255, 255, 0.82);
}

body:not(.dashboard):not(.login-page) .data-table th {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.72), rgba(239, 246, 255, 0.78));
  color: #1f2937;
}

body:not(.dashboard):not(.login-page) .data-table tbody tr:hover td {
  background: rgba(236, 253, 245, 0.58);
}

body:not(.dashboard):not(.login-page) .table-footer .actions {
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.86));
  border-color: rgba(148, 163, 184, 0.30);
}

body:not(.dashboard):not(.login-page) button {
  background: linear-gradient(135deg, #0d9488, #0284c7);
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.20);
}

body:not(.dashboard):not(.login-page) button:hover {
  background: linear-gradient(135deg, #0f766e, #0369a1);
  box-shadow: 0 12px 22px rgba(3, 105, 161, 0.24);
}

body:not(.dashboard):not(.login-page) button.button-secondary,
body:not(.dashboard):not(.login-page) a.button-link.button-secondary {
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.38);
  color: #0f172a;
  box-shadow: none;
}

body:not(.dashboard):not(.login-page) button.button-secondary:hover,
body:not(.dashboard):not(.login-page) a.button-link.button-secondary:hover {
  background: rgba(226, 232, 240, 0.95);
  color: #0f172a;
}

body:not(.dashboard):not(.login-page) .modal-dialog {
  border-radius: 20px;
  border-color: rgba(148, 163, 184, 0.30);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.94));
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.24);
}

body:not(.dashboard):not(.login-page) .profile-item {
  border-color: rgba(148, 163, 184, 0.30);
  background: rgba(255, 255, 255, 0.78);
}

.work-page .card {
  background:
    radial-gradient(circle at 98% 2%, rgba(20, 184, 166, 0.10), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.work-page .page-tag {
  background: linear-gradient(90deg, var(--page-work-start), var(--page-work-end));
  border-color: color-mix(in srgb, var(--page-work-start) 30%, transparent);
}

.my-records-page .page-tag,
.records-page .page-tag {
  background: linear-gradient(90deg, var(--page-records-start), var(--page-records-end));
  border-color: color-mix(in srgb, var(--page-records-start) 30%, transparent);
}

.projects-page .page-tag,
.accounts-page .page-tag {
  background: linear-gradient(90deg, var(--page-manage-start), var(--page-manage-end));
  border-color: color-mix(in srgb, var(--page-manage-start) 30%, transparent);
}

.leaves-page .page-tag {
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.92), rgba(14, 116, 144, 0.92));
  border-color: color-mix(in srgb, rgba(8, 145, 178, 0.92) 30%, transparent);
}

.profile-page .page-tag {
  background: linear-gradient(90deg, var(--page-profile-start), var(--page-profile-end));
  border-color: color-mix(in srgb, var(--page-profile-start) 28%, transparent);
}

.work-page .work-editor {
  border-radius: 14px;
  border-color: rgba(125, 211, 252, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.work-page .work-editor-actions {
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.82));
}

.work-page #insertImageButton {
  border-radius: 999px;
  padding: 8px 14px;
}

.my-records-page .table-header,
.records-page .table-header,
.projects-page .table-header,
.accounts-page .table-header {
  padding: 6px 0 10px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.34);
}

.my-records-page .table-wrap,
.records-page .table-wrap,
.projects-page .table-wrap,
.accounts-page .table-wrap {
  margin-top: 4px;
}

.records-page .card,
.my-records-page .card {
  background:
    radial-gradient(circle at 2% 0%, rgba(16, 185, 129, 0.07), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.records-page .filter.filter-in-card,
.my-records-page .filter.filter-in-card {
  position: sticky;
  top: 74px;
  z-index: 12;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.projects-page .card,
.accounts-page .card,
.profile-page .card {
  background:
    radial-gradient(circle at 98% 0%, rgba(14, 165, 233, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.leaves-page .card {
  border-color: rgba(8, 145, 178, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 254, 255, 0.72));
}

.leave-section-spacing {
  margin-top: 16px;
}

.leave-form-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.leave-form-grid .leave-form-reason {
  grid-column: 1 / span 3;
}

.vehicle-complete-hint.helper-text {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 18px;
  height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-picker {
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d7dee9;
  background: var(--surface-muted);
}

.file-picker-trigger {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.46);
  background: rgba(241, 245, 249, 0.95);
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  flex: 0 0 auto;
}

.file-picker-name {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #dc2626;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}

.file-clear-btn:hover {
  color: #b91c1c;
}

.file-clear-btn[hidden] {
  display: none !important;
}

.leave-notification-list {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.9);
}

.leave-notification-item {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.96);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "message actions";
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
}

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

.leave-notification-item.is-unread {
  background: rgba(239, 246, 255, 0.85);
  box-shadow: inset 3px 0 0 rgba(37, 99, 235, 0.65);
}

.leave-notification-title {
  display: none;
}

.leave-notification-message {
  grid-area: message;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leave-notification-item .actions {
  grid-area: actions;
  gap: 6px;
  align-items: center;
  justify-self: end;
  margin: 0;
}

.leave-notification-item .actions .status {
  font-size: 10px;
  padding: 1px 5px;
}

.leave-notification-item .actions .button-secondary {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11px;
}

.tag.tag-success {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.tag.tag-danger {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
}

.projects-page .status,
.accounts-page .status,
.profile-page .status,
.records-page .status,
.my-records-page .status,
.work-page .status {
  background: var(--status-info-bg);
}

.projects-page .status.error,
.accounts-page .status.error,
.profile-page .status.error,
.records-page .status.error,
.my-records-page .status.error,
.work-page .status.error {
  background: var(--status-error-bg);
}

.work-page .top-nav a.button-link.button-secondary.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(29, 78, 216, 0.48);
  color: #eff6ff;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.3);
}

.my-records-page .top-nav a.button-link.button-secondary.active,
.records-page .top-nav a.button-link.button-secondary.active,
.projects-page .top-nav a.button-link.button-secondary.active,
.accounts-page .top-nav a.button-link.button-secondary.active,
.profile-page .top-nav a.button-link.button-secondary.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(29, 78, 216, 0.48);
  color: #eff6ff;
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.3);
}

.projects-page .empty,
.accounts-page .empty,
.profile-page .empty,
.records-page .empty,
.my-records-page .empty,
.work-page .empty {
  border: 1px dashed var(--empty-border);
  background:
    radial-gradient(circle at 50% 0%, var(--surface-accent-soft), transparent 42%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.92));
  color: #334155;
}

.projects-page .empty::before,
.accounts-page .empty::before,
.profile-page .empty::before,
.records-page .empty::before,
.my-records-page .empty::before,
.work-page .empty::before {
  content: '暂无数据';
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--empty-title);
}

.profile-page .profile-item {
  border-radius: 16px;
}

.profile-shell {
  max-width: 780px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.profile-hero-card {
  border-radius: 18px;
  border-color: rgba(125, 211, 252, 0.34);
  background:
    radial-gradient(circle at 94% 10%, rgba(14, 116, 144, 0.10), transparent 46%),
    linear-gradient(180deg, rgba(239, 246, 255, 0.75), rgba(255, 255, 255, 0.94));
}

.profile-hero-card .page-lead {
  margin-bottom: 8px;
}

.profile-page .profile-item-label {
  color: #334155;
}

.profile-page .profile-item-value {
  color: #0f172a;
}

.table-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(255, 255, 255, 0.60);
}

.table-wrap.list-switching {
  animation: list-fade-in 160ms ease;
}

@keyframes list-fade-in {
  from {
    opacity: 0.64;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 780px;
}

.data-table.resizable {
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 12px 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  font-size: 13px;
}

.data-table.resizable th {
  position: relative;
}

.data-table.resizable td {
  white-space: normal;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.data-table.resizable th.cell-project,
.data-table.resizable td.cell-project {
  width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table.resizable th.cell-actions,
.data-table.resizable td.cell-actions {
  width: 96px;
  text-align: right;
}

.data-table.resizable td.cell-actions .row-actions {
  display: flex;
  justify-content: flex-end;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
}

.col-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  width: 2px;
  height: 56%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.26);
  transform: translateX(-50%);
  transition: background 140ms ease;
}

.data-table.resizable th:hover .col-resizer::before {
  background: rgba(59, 130, 246, 0.35);
}

body.resizing,
body.resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.data-table th {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(30, 41, 59, 0.68);
  background: rgba(239, 246, 255, 0.70);
}

.data-table tbody tr:hover td {
  background: rgba(239, 246, 255, 0.45);
}

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

.cell-text {
  max-width: 420px;
  overflow: hidden;
  white-space: normal;
  text-overflow: clip;
}

.record-content {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.record-content-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.record-inline-image-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.record-inline-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(191, 219, 254, 0.95);
  background: rgba(239, 246, 255, 0.78);
  cursor: pointer;
  box-shadow: none;
  overflow: hidden;
}

.record-inline-image:hover {
  background: rgba(219, 234, 254, 0.9);
  transform: none;
}

.record-inline-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.record-inline-image-more {
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 800;
}

.file-chips {
  display: inline-flex;
  gap: 8px;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow: hidden;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(255, 255, 255, 0.70);
  color: rgba(30, 41, 59, 0.82);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  max-width: 240px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-chip-remove {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.3;
  background: rgba(241, 245, 249, 0.94);
  color: #0f172a;
  cursor: pointer;
  box-shadow: none;
}

.file-chip-remove:hover {
  background: rgba(226, 232, 240, 0.96);
}

.file-chip:hover {
  background: rgba(255, 255, 255, 0.95);
}

/* 协作者区域：横向显示，超出后换行 */
#participantChips {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

#participantChips .file-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#participantChips .file-chip-name {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-chip.file-chip-image {
  border-color: rgba(59, 130, 246, 0.22);
  background: rgba(239, 246, 255, 0.78);
  color: #1e40af;
}

.image-preview-dialog {
  width: min(980px, 96vw);
}

.image-preview-body {
  grid-template-columns: 1fr;
}

.image-preview-frame {
  grid-column: 1 / -1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(15, 23, 42, 0.06);
}

.image-preview-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  background: transparent;
}

.file-preview-frame {
  display: block;
  width: 100%;
  height: min(72vh, 680px);
  border: 0;
  background: #ffffff;
}

.file-preview-text {
  margin: 0;
  padding: 12px;
  max-height: 72vh;
  overflow: auto;
  background: #ffffff;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.55;
}

.file-preview-empty {
  padding: 24px;
  text-align: center;
  color: #475569;
  font-size: 13px;
}

.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.record-row-clickable {
  cursor: pointer;
}

.record-row-clickable:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: -2px;
}

.record-detail-body {
  display: grid;
  gap: 12px;
}

.record-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.record-detail-item {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 10px;
  padding: 10px;
  background: rgba(248, 250, 252, 0.86);
}

.record-detail-label {
  font-size: 12px;
  color: #64748b;
}

.record-detail-value {
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
  word-break: break-word;
}

.record-detail-content,
.record-detail-attachments {
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.record-detail-attachments .file-chips {
  flex-wrap: wrap;
}

.keyword-hit {
  padding: 0 2px;
  border-radius: 3px;
  background: rgba(250, 204, 21, 0.46);
  color: inherit;
}

.row-actions button.button-danger {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 7px;
}

.modal-dialog {
  width: min(620px, 92vw);
  border: 1px solid rgba(226, 232, 240, 0.90);
  border-radius: 18px;
  padding: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.20);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.modal-dialog .card {
  margin: 0;
}

.modal-dialog .card:hover {
  transform: none;
  box-shadow: none;
}

.dialog-form {
  padding: 18px 18px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.dialog-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dialog-header .section-title {
  min-width: 0;
}

.dialog-full {
  grid-column: 1 / -1;
}

.dialog-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.code-block {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 240px;
  overflow: auto;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.90);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(30, 41, 59, 0.78);
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: none;
  box-shadow: none;
}

.project-section {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.project-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.project-form .actions {
  grid-column: 1 / -1;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.account-form .actions {
  grid-column: 1 / -1;
}

.records {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.account-header {
  font-weight: 700;
  margin-bottom: 8px;
}

.account-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.account-actions {
  flex-wrap: wrap;
}

.card.account {
  border-left: 4px solid var(--accent);
}

.record-header {
  font-weight: 700;
  margin-bottom: 8px;
}

.record-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.record-text {
  margin: 0 0 12px;
  white-space: pre-wrap;
}

.card.record {
  border-left: 4px solid var(--primary);
}

.card.project {
  border-left: 4px solid rgba(124, 58, 237, 0.85);
}

.project-desc {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.project-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.project-title {
  font-weight: 700;
}

.project-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.project-actions {
  justify-content: flex-end;
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.attachment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 200px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 8px;
  border: 1px solid var(--border);
}

.attachment img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.attachment a {
  color: var(--primary);
  font-size: 13px;
  word-break: break-word;
}

.empty {
  text-align: center;
  padding: 40px;
  background: var(--surface);
  border-radius: 12px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .container {
    padding: 16px 14px 46px;
  }

  .page-header-inner {
    padding: 10px 14px;
  }

  .dashboard .container {
    min-height: unset;
    display: block;
  }

  .dashboard .workbench-nav {
    display: block;
    margin: 0 0 14px;
  }

  .dashboard .top-nav {
    display: none;
  }

  .dashboard .module-nav {
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .module-nav {
    gap: 10px;
  }

  /* 手机端工作台卡片：按 2 列展示，卡片高度=宽度（方形），便于点击与阅读。 */
  .dashboard .module-tile {
    aspect-ratio: 1 / 1;
    min-height: unset;
  }

  body:not(.dashboard) .module-tile {
    min-height: 66px;
    padding: 10px;
    border-radius: 16px;
    gap: 4px;
  }

  body:not(.dashboard) .module-icon {
    width: 28px;
    height: 28px;
    border-radius: 12px;
  }

  body:not(.dashboard) .module-icon svg {
    width: 15px;
    height: 15px;
  }

  body:not(.dashboard) .module-desc {
    display: none;
  }

  body:not(.dashboard) .tile-profile .module-desc {
    display: block;
    font-size: 10.5px;
  }

  .card {
    padding: 18px;
  }

  .card:hover {
    transform: none;
  }

  .footer {
    text-align: left;
  }
}

@media (max-width: 920px) {
  .header-top {
    align-items: stretch;
  }

  .header-brand {
    min-width: 0;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .module-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-user {
    justify-content: flex-start;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .login-hero {
    order: 2;
    min-height: auto;
  }

  .login-auth-grid {
    order: 1;
  }
}

@media (max-width: 768px) {
  body:not(.dashboard):not(.login-page) .card {
    border-radius: 14px;
  }

  body:not(.dashboard):not(.login-page) .table-wrap,
  body:not(.dashboard):not(.login-page) .table-footer .actions,
  body:not(.dashboard):not(.login-page) .filter.filter-in-card {
    border-radius: 14px;
  }

  .records-page .filter.filter-in-card,
  .my-records-page .filter.filter-in-card {
    position: static;
    top: auto;
    z-index: auto;
    backdrop-filter: none;
    box-shadow: none;
  }

  .work-page .work-editor-actions {
    padding: 8px;
  }

  .leave-form-grid {
    grid-template-columns: 1fr;
  }

  .leave-form-grid .leave-form-reason {
    grid-column: auto;
  }

  .page-header-inner {
    padding: 10px 12px;
  }

  .header-top {
    gap: 8px;
  }

  .header-brand {
    width: 100%;
    gap: 8px;
    min-width: 0;
  }

  .brand-link {
    min-width: 0;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-slogan {
    font-size: 11px;
  }

  .page-tag {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .header-user {
    width: 100%;
    justify-content: flex-end;
  }

  .page-lead {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .top-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .top-nav a.button-link {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .top-nav .profile-trigger {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .profile-trigger-circle {
    width: 38px;
    height: 38px;
  }

  .top-nav-profile {
    position: static;
  }

  .top-nav-profile .profile-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 64px;
    width: auto;
    margin-top: 0;
    min-width: 0;
    max-height: min(72vh, 520px);
    overflow: auto;
    z-index: 88;
    border-radius: 16px;
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 46px rgba(15, 23, 42, 0.24);
  }

  .top-nav-profile .profile-dropdown {
    z-index: 90;
  }

  .top-nav-profile .profile-dropdown .user-menu-item {
    min-height: 42px;
    border-radius: 10px;
  }

  .segmented {
    display: flex;
    width: 100%;
  }

  .segmented-button {
    flex: 1 1 0;
    min-height: 40px;
    text-align: center;
  }

  .section-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .helper-text {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .actions {
    width: 100%;
    gap: 8px;
  }

  .actions > button,
  .actions > a.button-link {
    min-height: 40px;
  }

  .actions > .status {
    flex-basis: 100%;
  }

  .status {
    border-radius: 12px;
    padding: 6px 10px;
  }

  .table-header .actions {
    width: 100%;
  }

  .table-header .actions > button,
  .table-header .actions > a.button-link,
  .table-header .actions > .status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .filter {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filter .actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .filter .actions button,
  .filter .actions a.button-link,
  .filter .actions .status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 700px;
  }

  .data-table.resizable {
    table-layout: auto;
  }

  .table-footer .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .table-footer .field-inline,
  .table-footer .status,
  .table-footer #pagerPages,
  .table-footer #recordPagerPages {
    grid-column: 1 / -1;
  }

  .table-footer .field-inline {
    justify-content: space-between;
  }

  .table-footer button.button-secondary,
  .table-footer .pager-page {
    min-height: 38px;
  }

  .row-actions {
    gap: 6px;
  }

  .row-actions button,
  .row-actions a.button-link {
    min-height: 36px;
    padding: 7px 10px;
  }

  .file-chips {
    flex-wrap: wrap;
  }

  .file-chip {
    max-width: 100%;
  }

  .dialog-form {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    width: min(96vw, 700px);
    max-height: 88vh;
    overflow: auto;
  }

  .dialog-actions {
    justify-content: stretch;
    gap: 8px;
  }

  .dialog-actions button,
  .dialog-actions a.button-link,
  .dialog-actions .status {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .profile-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-item-actions {
    width: 100%;
  }

  .profile-item-actions button {
    width: 100%;
  }

  .work-editor {
    min-height: 180px;
  }

  .work-page .status.success {
    top: auto;
    right: 12px;
    left: 12px;
    bottom: 14px;
    max-width: none;
    min-height: 44px;
  }

  .work-editor-actions {
    width: 100%;
  }

  .work-editor-actions button {
    width: 100%;
  }

  .profile-shell {
    max-width: none;
    gap: 12px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  button,
  a.button-link,
  .icon-button {
    min-height: 40px;
  }
}

@media (max-width: 480px) {
  .header-back {
    padding: 7px 10px;
    font-size: 12px;
  }

  .module-tile {
    min-height: 76px;
    padding: 10px 10px 10px;
    border-radius: 16px;
    gap: 4px;
  }

  .module-icon {
    width: 30px;
    height: 30px;
    border-radius: 13px;
  }

  .module-icon svg {
    width: 16px;
    height: 16px;
  }

  .module-title {
    font-size: 13px;
  }

  .module-desc {
    font-size: 11px;
  }

  .brand-slogan {
    display: none;
  }

  .brand-name {
    font-size: 15px;
  }

  .page-tag {
    font-size: 10px;
  }

  .card {
    padding: 14px;
  }

  .section-title {
    font-size: 15px;
  }

  .helper-text {
    font-size: 12px;
  }

  .dialog-header {
    align-items: flex-start;
  }

  .dialog-header .icon-button {
    flex: 0 0 auto;
  }

  .table-footer .actions {
    grid-template-columns: 1fr;
  }

  .table-footer button.button-secondary,
  .table-footer .pager-page {
    width: 100%;
  }

  .row-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .row-actions button,
  .row-actions a.button-link {
    width: 100%;
  }

  .data-table th,
  .data-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .login-page .container {
    padding-top: 16px;
  }

  .login-hero-title {
    font-size: 24px;
  }

  .login-hero-text {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .module-tile,
  .module-icon {
    transition: none;
  }

  .module-tile:hover {
    transform: none;
  }

  .module-tile:hover .module-icon {
    transform: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0b1220;
    --surface: #0f172a;
    --surface-muted: rgba(255, 255, 255, 0.05);
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --border: rgba(148, 163, 184, 0.25);
    --shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.45);
  }

  body {
    background:
      radial-gradient(circle at top, rgba(124, 58, 237, 0.18), transparent 46%),
      radial-gradient(circle at 20% 10%, rgba(37, 99, 235, 0.16), transparent 40%),
      linear-gradient(180deg, #0b1220, var(--bg) 60%);
  }

  .page-header {
    background: rgba(15, 23, 42, 0.60);
    border-bottom-color: rgba(147, 197, 253, 0.24);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
  }

  .page-header h1 {
    color: var(--text);
  }

  .brand-name {
    color: var(--text);
  }

  .brand-link:hover .brand-name {
    color: #bfdbfe;
  }

  .brand-slogan {
    color: #60a5fa;
  }

  .page-tag {
    border-color: rgba(96, 165, 250, 0.26);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.32), rgba(167, 139, 250, 0.24));
    color: rgba(226, 232, 240, 0.92);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.18);
  }

  .segmented {
    background: rgba(30, 41, 59, 0.46);
    border-color: rgba(148, 163, 184, 0.20);
  }

  .segmented-button {
    color: rgba(226, 232, 240, 0.82);
  }

  .segmented-button:hover {
    background: rgba(59, 130, 246, 0.12);
  }

  .segmented-button.active {
    background: rgba(59, 130, 246, 0.22);
    color: #bfdbfe;
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.18);
  }

  .top-nav .button-link.button-secondary {
    background: rgba(30, 41, 59, 0.38);
    border-color: rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
  }

  .top-nav .button-link.button-secondary:hover {
    background: rgba(30, 41, 59, 0.52);
    color: #f1f5f9;
  }

  .top-nav a.button-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(30, 64, 175, 0.9));
    border-color: rgba(147, 197, 253, 0.42);
    color: #dbeafe;
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.32);
  }

  .top-nav .button-link.button-secondary.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(30, 64, 175, 0.9));
    border-color: rgba(147, 197, 253, 0.42);
    color: #dbeafe;
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.32);
  }

  .module-tile {
    background:
      radial-gradient(160px 160px at 100% 0%, rgba(var(--tile-accent-rgb), 0.28), transparent 62%),
      radial-gradient(160px 160px at 0% 100%, rgba(var(--tile-accent-rgb), 0.16), transparent 62%),
      linear-gradient(180deg, rgba(30, 41, 59, 0.70), rgba(30, 41, 59, 0.42));
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  }

  .module-tile:hover {
    background:
      radial-gradient(170px 170px at 100% 0%, rgba(var(--tile-accent-rgb), 0.32), transparent 62%),
      radial-gradient(170px 170px at 0% 100%, rgba(var(--tile-accent-rgb), 0.18), transparent 62%),
      linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(30, 41, 59, 0.48));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  }

  .module-tile.active {
    background:
      radial-gradient(180px 180px at 100% 0%, rgba(var(--tile-accent-rgb), 0.36), transparent 62%),
      radial-gradient(180px 180px at 0% 100%, rgba(var(--tile-accent-rgb), 0.20), transparent 62%),
      linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(30, 41, 59, 0.52));
    border-color: rgba(147, 197, 253, 0.22);
    color: #bfdbfe;
  }

  .module-disabled::after {
    background: rgba(226, 232, 240, 0.10);
    color: rgba(226, 232, 240, 0.72);
  }

  .module-caret {
    color: rgba(226, 232, 240, 0.65);
  }

  .user-menu {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  }

  .user-menu-item {
    color: var(--text);
  }

  .user-menu-item:hover {
    background: rgba(30, 41, 59, 0.60);
  }

  .user-menu-item.danger:hover {
    background: rgba(127, 29, 29, 0.35);
  }

  input,
  select,
  textarea,
  .readonly-field {
    border-color: rgba(148, 163, 184, 0.35);
  }

  input:focus,
  select:focus,
  textarea:focus {
    background: rgba(255, 255, 255, 0.02);
  }

  button.button-secondary {
    background: rgba(148, 163, 184, 0.14);
    color: var(--text);
  }

  button.button-secondary:hover {
    background: rgba(148, 163, 184, 0.22);
  }

  .tag {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.28);
  }

  .tag.tag-muted {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.20);
  }

  .attachment {
    background: rgba(255, 255, 255, 0.04);
  }

  .logo {
    background: #2563eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.55);
  }

  .card.card-muted {
    background: rgba(255, 255, 255, 0.04);
  }

  .profile-item {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
  }

  .profile-item.profile-item-danger {
    border-color: rgba(248, 113, 113, 0.22);
    background: rgba(127, 29, 29, 0.22);
  }

  .profile-item-label {
    color: rgba(226, 232, 240, 0.62);
  }

  .table-wrap {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
  }

  .data-table th,
  .data-table td {
    border-bottom-color: rgba(148, 163, 184, 0.18);
  }

  .data-table th {
    color: rgba(226, 232, 240, 0.62);
    background: rgba(30, 41, 59, 0.52);
  }

  .data-table tbody tr:hover td {
    background: rgba(30, 41, 59, 0.46);
  }

  .file-chip {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(30, 41, 59, 0.52);
    color: rgba(226, 232, 240, 0.82);
  }

  .file-chip:hover {
    background: rgba(30, 41, 59, 0.70);
  }

  .file-chip.file-chip-image {
    border-color: rgba(147, 197, 253, 0.22);
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe;
  }

  .modal-dialog {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55);
  }

  .modal-dialog::backdrop {
    background: rgba(2, 6, 23, 0.70);
  }

  .icon-button {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(30, 41, 59, 0.52);
    color: rgba(226, 232, 240, 0.75);
  }

  .icon-button:hover {
    background: rgba(30, 41, 59, 0.70);
  }
}
