/* ==========================================================================
   时迹 WorkLog — 视觉系统
   ========================================================================== */

:root {
  --bg: #f3f0e9;
  --bg-deep: #ebe6db;
  --surface: #fffdf8;
  --surface-2: #f9f6ef;
  --surface-3: #f1ece2;
  --ink: #19211f;
  --ink-2: #35403c;
  --muted: #737b76;
  --muted-2: #9aa09b;
  --line: #e5dfd4;
  --line-strong: #d5cec0;
  --brand: #0e5b50;
  --brand-dark: #0a463e;
  --brand-mid: #15766a;
  --brand-soft: #e5f0eb;
  --brand-faint: #f1f7f4;
  --accent: #d9653f;
  --accent-soft: #faeae3;
  --amber: #b97e25;
  --amber-soft: #f7eeda;
  --amber-bright: #d79a3f;
  --danger: #bc4236;
  --danger-soft: #fbe9e6;
  --blue: #426b8c;
  --blue-soft: #e9f0f5;
  --sidebar: #122a26;
  --sidebar-2: #0c211d;
  --white: #fffdf8;
  --shadow-xs: 0 1px 2px rgba(25, 33, 31, 0.04);
  --shadow-sm: 0 2px 6px rgba(25, 33, 31, 0.03), 0 1px 2px rgba(25, 33, 31, 0.04);
  --shadow: 0 20px 46px -30px rgba(25, 33, 31, 0.4), 0 2px 7px rgba(25, 33, 31, 0.03);
  --shadow-lift: 0 28px 60px -34px rgba(25, 33, 31, 0.55), 0 3px 10px rgba(25, 33, 31, 0.05);
  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Songti SC", "SimSun", serif;
  --sidebar-w: 254px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  background:
    radial-gradient(circle at 12% -8%, rgba(185, 126, 37, 0.07), transparent 30%),
    radial-gradient(circle at 102% 4%, rgba(14, 91, 80, 0.06), transparent 28%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: rgba(217, 101, 63, 0.22); }

:focus-visible {
  outline: 2px solid var(--brand-mid);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   基础组件
   -------------------------------------------------------------------------- */

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow-light { color: #e7b56f; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; transform: none; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fbfdfb;
  box-shadow: 0 8px 20px -14px rgba(14, 91, 80, 0.9);
}
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-2);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-faint); }

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }

.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: #d9eae3; }

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a8372d; border-color: #a8372d; }

.btn-danger-ghost { color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }

.btn-lg { height: 48px; padding: 0 22px; border-radius: 12px; font-size: 14.5px; }
.btn-sm { height: 32px; padding: 0 11px; border-radius: 8px; font-size: 12.5px; gap: 6px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn-dark { color: rgba(255, 255, 255, 0.55); }
.icon-btn-dark:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.field-label .optional { color: var(--muted-2); font-weight: 400; }
.field-hint { color: var(--muted-2); font-size: 11.5px; line-height: 1.5; }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 1;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  transform: translateY(-50%);
  pointer-events: none;
}
.input-icon svg { width: 17px; height: 17px; }

.input-wrap > input,
.input-wrap > select {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.input-wrap.has-icon > input { padding-left: 40px; }

.input-wrap > input::placeholder,
textarea::placeholder { color: #aaa99f; }

.input-wrap > input:hover,
.input-wrap > select:hover,
textarea:hover { border-color: #c4bcab; }

.input-wrap > input:focus,
.input-wrap > select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-mid);
  background: #fffefa;
  box-shadow: 0 0 0 3px rgba(21, 118, 106, 0.11);
}

.input-action {
  position: absolute;
  right: 7px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  transform: translateY(-50%);
}
.input-action:hover { background: var(--surface-3); color: var(--ink); }
.input-action svg { width: 17px; height: 17px; }

input[type="date"],
input[type="month"] {
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
}
input[type="date"]:focus,
input[type="month"]:focus {
  outline: none;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(21, 118, 106, 0.11);
}

select {
  appearance: none;
  padding-right: 34px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23737b76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

textarea {
  width: 100%;
  min-height: 88px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-error {
  padding: 10px 12px;
  border: 1px solid #efc9c3;
  border-radius: 9px;
  background: var(--danger-soft);
  color: #9f352b;
  font-size: 12.5px;
  line-height: 1.5;
}
.form-note {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.form-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--brand-mid); }

/* 徽章 / 状态 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; }
.badge-workday { background: var(--brand-soft); color: var(--brand-dark); }
.badge-weekend { background: #edeae2; color: #777468; }
.badge-holiday { background: var(--accent-soft); color: #ac4b2d; }
.badge-normal { background: var(--brand-soft); color: var(--brand-dark); }
.badge-overtime { background: var(--accent-soft); color: #a9472b; }
.badge-prod { background: var(--blue-soft); color: #3f6684; }
.badge-other { background: var(--amber-soft); color: #8e6119; }
.badge-admin { background: #f0e8d8; color: #84601e; }
.badge-member { background: var(--surface-3); color: var(--muted); }
.badge-active { background: var(--brand-soft); color: var(--brand-dark); }
.badge-inactive { background: #eeeae2; color: #8a877d; }
.badge-makeup { background: var(--blue-soft); color: var(--blue); }
.badge-soft { background: var(--surface-3); color: var(--muted); }

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.dot-teal { background: var(--brand-mid); }
.dot-amber { background: var(--amber-bright); }
.dot-coral { background: var(--accent); }
.dot-blue { background: var(--blue); }

/* 头像 */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #f7fbf9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  flex: none;
  user-select: none;
}
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-lg { width: 46px; height: 46px; font-size: 15px; }
.avatar-button { border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); transition: box-shadow 0.18s; }
.avatar-button:hover { box-shadow: 0 0 0 1px var(--brand); }
.avatar[data-tone="1"] { background: #9b5b3c; }
.avatar[data-tone="2"] { background: #436b8d; }
.avatar[data-tone="3"] { background: #7c6a3f; }
.avatar[data-tone="4"] { background: #6b5a83; }
.avatar[data-tone="5"] { background: #31736a; }

/* 页面辅助 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.page-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }
.page-head-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.section-head h3 svg { width: 17px; height: 17px; color: var(--brand-mid); }
.section-head p { color: var(--muted-2); font-size: 12px; }
.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--brand-mid);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.section-link svg { width: 14px; height: 14px; }
.section-link:hover { color: var(--brand-dark); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 22px; }
.card-flush { overflow: hidden; }
.muted { color: var(--muted); }
.tiny { color: var(--muted-2); font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.serif { font-family: var(--font-display); }
.text-right { text-align: right; }
.flex { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.spacer { flex: 1; }

/* --------------------------------------------------------------------------
   登录页
   -------------------------------------------------------------------------- */

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr);
  min-height: 100vh;
  background: var(--bg);
}

.login-art {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 48px clamp(40px, 5vw, 76px) 34px;
  color: #f4f6f1;
  background:
    radial-gradient(circle at 84% 12%, rgba(197, 138, 44, 0.2), transparent 34%),
    radial-gradient(circle at 16% 86%, rgba(21, 118, 106, 0.34), transparent 44%),
    linear-gradient(145deg, #163d34 0%, #102b26 46%, #0b201c 100%);
}

.art-grid {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom right, #000, transparent 72%);
  pointer-events: none;
}
.art-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  right: -190px;
  bottom: -150px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 80px rgba(255, 255, 255, 0.025), 0 0 0 160px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.login-brand { position: relative; display: flex; align-items: center; gap: 12px; z-index: 1; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff9ec;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.brand-mark-light {
  background: #f3e6cb;
  color: #173a31;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, 0.5);
}
.brand-word {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.brand-word-light { color: #f6f4eb; }
.brand-en {
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.brand-word-light .brand-en { color: rgba(255, 255, 255, 0.38); }

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-top: clamp(54px, 10vh, 120px);
}
.login-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 4.1vw, 64px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.035em;
}
.login-copy h1 .marker {
  position: relative;
  color: #f0c98d;
  font-style: italic;
  white-space: nowrap;
}
.login-copy h1 .marker::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 0;
  bottom: 3px;
  height: 7px;
  border-radius: 50%;
  background: rgba(217, 101, 63, 0.4);
  filter: blur(0.4px);
  transform: rotate(-1.2deg);
}
.login-lede {
  max-width: 500px;
  margin-top: 24px;
  color: rgba(241, 244, 236, 0.66);
  font-size: 14.5px;
  line-height: 1.85;
}

.login-preview {
  position: relative;
  z-index: 1;
  width: min(470px, 100%);
  margin-top: clamp(32px, 5vh, 54px);
  padding: 20px 22px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(14px);
}
.preview-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.preview-label { display: block; color: rgba(255, 255, 255, 0.5); font-size: 10.5px; letter-spacing: 0.08em; }
.preview-number {
  display: block;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.preview-number span { margin-left: 2px; font-family: var(--font-sans); font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.45); }
.preview-badge {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}
.preview-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 78px;
  margin-top: 18px;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.preview-bars i {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, #1f8576, #59b3a0);
  opacity: 0.88;
}
.preview-bars i:nth-child(3n) { background: linear-gradient(to top, #b95638, #df8d70); }
.preview-bars i.weekend { height: calc(var(--h) * 0.52); background: rgba(255, 255, 255, 0.14); }
.preview-footer {
  display: flex;
  gap: 18px;
  margin-top: 13px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10.5px;
}
.preview-footer span { display: inline-flex; align-items: center; gap: 6px; }

.login-points {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: auto;
  padding-top: 32px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.login-points span { display: flex; align-items: center; gap: 8px; }
.login-points span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #d79a3f; }

.login-art-foot {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.24);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 44px 42px;
  background:
    radial-gradient(circle at 84% 8%, rgba(217, 101, 63, 0.045), transparent 28%),
    var(--bg);
}
.login-form-wrap { width: min(396px, 100%); }
.login-mobile-brand { display: none; align-items: center; gap: 11px; margin-bottom: 32px; }
.login-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.login-head > p:last-child { margin-top: 9px; color: var(--muted); font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 18px; margin-top: 30px; }
.login-form .input-wrap > input { height: 49px; border-radius: 11px; font-size: 14px; }
.login-form .input-wrap.has-icon > input { padding-left: 42px; }
.login-form .input-icon { left: 15px; width: 18px; height: 18px; }
.login-form .input-icon svg { width: 18px; height: 18px; }
.login-form .form-error { margin-top: -4px; }
.login-form .btn-lg { margin-top: 4px; }
.credential-hint {
  display: flex;
  gap: 11px;
  margin-top: 20px;
  padding: 13px 14px;
  border: 1px dashed #ddcba8;
  border-radius: 11px;
  background: #faf4e6;
  color: #715a32;
}
.credential-hint .hint-icon { color: #a9792b; margin-top: 1px; }
.credential-hint .hint-icon svg { width: 17px; height: 17px; }
.credential-hint strong { display: block; font-size: 11.5px; font-weight: 700; }
.credential-hint p { margin-top: 2px; font-size: 11.5px; line-height: 1.65; }
.credential-hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(113, 90, 50, 0.1);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.login-help { margin-top: 24px; text-align: center; color: var(--muted-2); font-size: 11.5px; }
.login-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
}
.login-secure { display: inline-flex; align-items: center; gap: 5px; }
.login-secure svg { width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   应用框架
   -------------------------------------------------------------------------- */

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  padding: 26px 17px 18px;
  overflow-y: auto;
  color: rgba(244, 247, 240, 0.72);
  background:
    radial-gradient(circle at 20% 2%, rgba(197, 138, 44, 0.13), transparent 30%),
    linear-gradient(175deg, #15332d 0%, #102923 55%, #0c211d 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 27px;
}
.sidebar-brand .brand-mark { width: 39px; height: 39px; font-size: 22px; }
.sidebar-brand .brand-word { font-size: 18px; }
.sidebar-close { display: none; margin-left: auto; color: rgba(255, 255, 255, 0.6); background: transparent; border: 0; }
.sidebar-close svg { width: 20px; height: 20px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label {
  margin: 18px 10px 7px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.nav-label:first-child { margin-top: 0; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 43px;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(236, 241, 234, 0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; opacity: 0.8; }
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: #f5f6ee; }
.nav-item.active { background: rgba(255, 255, 255, 0.09); color: #fffdf6; font-weight: 600; }
.nav-item.active svg { color: #e8b770; opacity: 1; }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d79a3f;
}

.sidebar-quote {
  display: flex;
  gap: 10px;
  margin: auto 8px 22px;
  padding: 15px 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.33);
}
.sidebar-quote svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: rgba(215, 154, 63, 0.65); }
.sidebar-quote p { font-size: 10px; line-height: 1.7; letter-spacing: 0.03em; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 9px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user .avatar { background: rgba(255, 255, 255, 0.12); color: #f4e7cb; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.sidebar-user-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.sidebar-user-copy strong { overflow: hidden; color: rgba(255, 255, 255, 0.88); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy span { color: rgba(255, 255, 255, 0.34); font-size: 9.5px; letter-spacing: 0.02em; }
.sidebar-user .icon-btn { margin-left: auto; width: 30px; height: 30px; }
.sidebar-user .icon-btn svg { width: 16px; height: 16px; }

.sidebar-backdrop {
  position: fixed;
  z-index: 39;
  inset: 0;
  background: rgba(8, 17, 15, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(2px);
}

.workspace {
  min-height: 100vh;
  margin-left: var(--sidebar-w);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 82px;
  padding: 0 36px;
  border-bottom: 1px solid rgba(213, 206, 192, 0.62);
  background: rgba(243, 240, 233, 0.84);
  backdrop-filter: blur(16px);
}
.topbar-title { min-width: 0; }
.topbar-title h1 {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-title p {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mobile-menu { display: none; }

.day-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.6);
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.day-pill .dot { width: 5px; height: 5px; }
.day-pill.is-holiday { border-color: #ecd3c6; background: #fcf2eb; color: #a85435; }
.day-pill.is-weekend { color: #7e7b70; }

.quick-add { height: 38px; padding: 0 14px; font-size: 12.5px; }

.profile-wrap { position: relative; }
.profile-menu {
  position: absolute;
  z-index: 60;
  top: calc(100% + 9px);
  right: 0;
  width: 204px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  animation: menu-in 0.16s var(--ease);
}
.profile-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.profile-menu-head strong { display: block; font-size: 12.5px; }
.profile-menu-head span { color: var(--muted-2); font-size: 10px; }
.profile-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
}
.profile-menu button svg { width: 15px; height: 15px; color: var(--muted); }
.profile-menu button:hover { background: var(--surface-2); }
.profile-menu button.danger { color: var(--danger); }
.profile-menu button.danger svg { color: var(--danger); }
.profile-menu button.danger:hover { background: var(--danger-soft); }

.view {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 36px 64px;
  outline: none;
}

/* --------------------------------------------------------------------------
   工作台
   -------------------------------------------------------------------------- */

.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.dash-greeting h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.dash-greeting h2 span { color: var(--accent); }
.dash-greeting p { margin-top: 7px; color: var(--muted); font-size: 12.5px; }
.dash-greeting p strong { color: var(--ink-2); font-weight: 600; }
.dash-controls { display: flex; align-items: center; gap: 8px; }

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}
.segmented button {
  height: 29px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, color 0.16s, box-shadow 0.16s;
}
.segmented button:hover { color: var(--ink); }
.segmented button.active { background: var(--surface); color: var(--brand-dark); box-shadow: 0 1px 3px rgba(25, 33, 31, 0.09); font-weight: 600; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 19px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.stat-card::after {
  content: "";
  position: absolute;
  left: 19px;
  right: 19px;
  top: 0;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--brand);
  opacity: 0.7;
}
.stat-card.tone-amber::after { background: var(--amber-bright); }
.stat-card.tone-coral::after { background: var(--accent); }
.stat-card.tone-neutral::after { background: var(--line-strong); }
.stat-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
}
.stat-label svg { width: 15px; height: 15px; color: var(--muted-2); }
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1;
}
.stat-value .unit { font-family: var(--font-sans); font-size: 11px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; }
.stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted-2);
  font-size: 10.5px;
}
.stat-delta { display: inline-flex; align-items: center; gap: 3px; color: var(--brand-mid); font-weight: 600; }
.stat-delta.down { color: var(--danger); }
.stat-delta.flat { color: var(--muted-2); }
.stat-delta svg { width: 12px; height: 12px; }
.stat-units { display: flex; flex-wrap: wrap; gap: 4px 7px; }
.stat-units b { color: var(--ink-2); font-weight: 600; }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
}
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* 今日卡片 */
.today-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
  color: #f3f6ef;
  background:
    radial-gradient(circle at 94% -10%, rgba(215, 154, 63, 0.24), transparent 34%),
    linear-gradient(145deg, #17483d 0%, #103630 58%, #0e2e29 100%);
  box-shadow: 0 22px 46px -28px rgba(12, 44, 38, 0.65);
}
.today-card::before {
  content: "";
  position: absolute;
  right: -65px;
  bottom: -100px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(255, 255, 255, 0.018), 0 0 0 92px rgba(255, 255, 255, 0.012);
  pointer-events: none;
}
.today-head { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.today-date { display: flex; flex-direction: column; gap: 4px; }
.today-kicker { color: rgba(243, 246, 239, 0.45); font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.today-date h3 { font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.today-date p { color: rgba(243, 246, 239, 0.52); font-size: 10.5px; }
.today-head .badge { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.78); }
.today-head .badge-holiday { background: rgba(226, 112, 77, 0.2); color: #f6c4ae; }

.today-body { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; margin-top: 18px; }
.ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 106px;
  height: 106px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(#e0ac58 calc(var(--p, 0) * 1%), rgba(255, 255, 255, 0.1) 0);
}
.ring::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #11332d;
}
.ring-inner { position: relative; z-index: 1; text-align: center; }
.ring-inner strong { display: block; font-family: var(--font-display); font-size: 27px; font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; }
.ring-inner span { color: rgba(255, 255, 255, 0.45); font-size: 9px; letter-spacing: 0.04em; }
.today-summary { flex: 1; min-width: 0; }
.today-summary > p { color: rgba(243, 246, 239, 0.55); font-size: 11.5px; line-height: 1.65; }
.today-split { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 10px; }
.today-split span { display: flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, 0.72); font-size: 10.5px; }
.today-split b { color: #fff; font-weight: 600; }
.today-actions { display: flex; gap: 7px; margin-top: 14px; flex-wrap: wrap; }
.today-actions .btn { height: 32px; padding: 0 11px; border-radius: 7px; font-size: 11px; }
.today-actions .btn svg { width: 14px; height: 14px; }
.today-actions .btn-light { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.11); color: #fff; }
.today-actions .btn-light:hover { background: rgba(255, 255, 255, 0.17); }

.today-entries {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 16px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.today-entry {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 4px;
  border-radius: 7px;
  font-size: 10.5px;
  transition: background 0.16s;
}
.today-entry:hover { background: rgba(255, 255, 255, 0.05); }
.today-entry .kind-mark { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.today-entry .kind-mark.prod { background: #77c7b3; }
.today-entry .kind-mark.other { background: #e2b467; }
.today-entry .entry-name { flex: 1; overflow: hidden; color: rgba(255, 255, 255, 0.72); text-overflow: ellipsis; white-space: nowrap; }
.today-time {
  flex: none;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(119, 199, 179, 0.13);
  color: #8dd0bf;
  font-size: 8px;
  line-height: 1.5;
}
.today-time.overtime { background: rgba(217, 101, 63, 0.17); color: #f0b5a0; }
.today-entry .entry-note { overflow: hidden; max-width: 160px; color: rgba(255, 255, 255, 0.37); text-overflow: ellipsis; white-space: nowrap; }
.today-entry b { color: #f7f4ea; font-family: var(--font-display); font-size: 13px; font-weight: 500; }
.today-empty { padding: 12px 2px 4px; color: rgba(255, 255, 255, 0.4); font-size: 10.5px; text-align: center; }

/* 图表卡片 */
.chart-card { padding: 20px 20px 16px; }
.chart-card .section-head { flex-wrap: wrap; gap: 10px; }
.chart-legend { display: flex; gap: 13px; color: var(--muted); font-size: 10.5px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.chart-legend .normal { background: var(--brand-mid); }
.chart-legend .overtime { background: var(--accent); }
.chart-legend .prod { background: var(--brand-mid); }
.chart-legend .other { background: var(--amber-bright); }
.chart-legend .off { background: repeating-linear-gradient(135deg, #e8e2d7 0 2px, transparent 2px 4px); }
.chart-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.chart-toggle { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.chart-toggle button { height: 25px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted-2); font-size: 9.5px; white-space: nowrap; }
.chart-toggle button:hover { color: var(--ink); }
.chart-toggle button.active { background: var(--surface); color: var(--brand-dark); font-weight: 600; box-shadow: 0 1px 2px rgba(25, 33, 31, 0.08); }

.bar-chart { display: flex; gap: 8px; margin-top: 14px; }
.chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 194px;
  padding-bottom: 25px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: right;
}
.chart-main { flex: 1; min-width: 0; }
.chart-plot {
  position: relative;
  height: 194px;
  border-bottom: 1px solid var(--line);
}
.chart-lines { position: absolute; inset: 0 0 25px; display: flex; flex-direction: column; justify-content: space-between; }
.chart-lines i { display: block; border-top: 1px dashed #eae4d9; }
.chart-lines i:first-child { border-top-style: solid; border-color: #ddd6c9; }
.bar-cols { position: absolute; inset: 0 0 25px; display: flex; align-items: flex-end; gap: 2px; }
.bar-col {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 1;
  height: 100%;
  min-width: 0;
  border-radius: 3px 3px 0 0;
  cursor: pointer;
}
.bar-col.off { background: repeating-linear-gradient(135deg, rgba(213, 206, 192, 0.17) 0 3px, transparent 3px 7px); }
.bar-col:hover { background-color: rgba(14, 91, 80, 0.045); }
.bar-col.off:hover { background-color: rgba(217, 101, 63, 0.055); }
.bar-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: min(64%, 13px);
  min-width: 3px;
  height: 100%;
  overflow: hidden;
  border-radius: 3px 3px 0 0;
  transition: filter 0.15s;
}
.bar-col:hover .bar-stack { filter: saturate(1.15) brightness(1.04); }
.bar-stack .seg { width: 100%; flex: none; }
.bar-stack .seg-normal { background: linear-gradient(to top, #0e5b50, #2c8b7d); }
.bar-stack .seg-overtime { background: linear-gradient(to top, #c95b38, #e09776); }
.bar-stack .seg-prod { background: linear-gradient(to top, #0e5b50, #2c8b7d); }
.bar-stack .seg-other { background: linear-gradient(to top, #c28a35, #e1b15f); }
.bar-stack .seg-empty { background: transparent; }
.chart-x {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  height: 24px;
  align-items: center;
}
.chart-x span {
  flex: 1;
  overflow: visible;
  color: var(--muted-2);
  font-size: 8px;
  text-align: center;
  white-space: nowrap;
}
.chart-x span.off { color: #b27155; }
.chart-x span.blank { visibility: hidden; }
.chart-footnote { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted-2); font-size: 9px; }
.chart-footnote .off-note { display: inline-flex; align-items: center; gap: 5px; }
.chart-footnote .off-note i { width: 10px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(135deg, #e3dccf 0 2px, transparent 2px 4px); }

.chart-tip {
  position: fixed;
  z-index: 150;
  min-width: 128px;
  max-width: 220px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: #172622;
  color: #f7f5ee;
  font-size: 10.5px;
  line-height: 1.6;
  pointer-events: none;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -100%);
}
.chart-tip strong { display: block; font-size: 11px; font-weight: 600; }
.chart-tip .tip-row { display: flex; justify-content: space-between; gap: 14px; color: rgba(255, 255, 255, 0.55); }
.chart-tip .tip-row b { color: #fff; font-weight: 500; }
.chart-tip .tip-meta { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.48); font-size: 9px; }
.chart-tip .tip-badge { margin-top: 3px; color: #e3b16a; font-size: 9.5px; }

/* 侧栏列表 */
.rank-list { display: flex; flex-direction: column; gap: 13px; }
.rank-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.rank-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
}
.rank-item:nth-child(1) .rank-index { background: #f5ead4; color: #9a6a20; }
.rank-item:nth-child(2) .rank-index { background: #e9efec; color: var(--brand); }
.rank-item:nth-child(3) .rank-index { background: #f4ebe5; color: #a55a3e; }
.rank-copy { min-width: 0; }
.rank-copy strong { display: block; overflow: hidden; font-size: 11.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.rank-copy .rank-bar { height: 4px; margin-top: 6px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.rank-copy .rank-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand-mid); }
.rank-item:nth-child(2) .rank-bar i { background: #4d9d8e; }
.rank-item:nth-child(3) .rank-bar i { background: #c0824d; }
.rank-item:nth-child(n+4) .rank-bar i { background: #a9b8b2; }
.rank-value { color: var(--ink-2); font-family: var(--font-display); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.rank-value span { color: var(--muted-2); font-family: var(--font-sans); font-size: 8.5px; }

.member-list { display: flex; flex-direction: column; }
.member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child { border-bottom: 0; }
.member-row .avatar { width: 30px; height: 30px; font-size: 10px; }
.member-row-copy { flex: 1; min-width: 0; }
.member-row-copy strong { display: block; overflow: hidden; font-size: 11.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.member-row-copy span { color: var(--muted-2); font-size: 9px; }
.member-row-value { color: var(--ink-2); font-family: var(--font-display); font-size: 13px; }
.member-row-value span { color: var(--muted-2); font-family: var(--font-sans); font-size: 8.5px; }

.recent-list { display: flex; flex-direction: column; }
.recent-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.recent-item:last-child { border-bottom: 0; }
.recent-icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: none;
  border-radius: 9px;
  background: var(--brand-soft);
  color: var(--brand);
}
.recent-icon svg { width: 15px; height: 15px; }
.recent-icon.other { background: var(--amber-soft); color: #9a6a20; }
.recent-copy { flex: 1; min-width: 0; }
.recent-copy strong { display: block; overflow: hidden; font-size: 11.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.recent-copy p { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.recent-time { margin-right: 4px; color: var(--brand-mid); font-size: 8.5px; font-weight: 600; }
.recent-time.overtime { color: #b35436; }
.recent-meta { flex: none; text-align: right; }
.recent-meta b { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 550; }
.recent-meta span { color: var(--muted-2); font-size: 8.5px; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 22px;
  text-align: center;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted-2);
}
.empty-icon svg { width: 22px; height: 22px; }
.empty-state h3 { margin-top: 13px; font-size: 14px; font-weight: 600; }
.empty-state p { max-width: 300px; margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.empty-state .btn { margin-top: 14px; }
.empty-small { padding: 24px 16px; }
.empty-small .empty-icon { width: 38px; height: 38px; border-radius: 11px; }
.empty-small .empty-icon svg { width: 18px; height: 18px; }
.empty-small h3 { font-size: 12.5px; }
.empty-small p { font-size: 10.5px; }

.onboarding {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}
.onboard-step { padding: 20px; background: var(--surface); }
.onboard-step .step-no { color: var(--accent); font-family: var(--font-display); font-size: 12px; }
.onboard-step h3 { margin-top: 7px; font-size: 13px; }
.onboard-step p { margin-top: 4px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   填写日志
   -------------------------------------------------------------------------- */

.log-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.side-calendar { padding: 18px; }
.calendar-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.calendar-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.calendar-head .cal-nav { display: flex; gap: 2px; margin-left: auto; }
.calendar-head .icon-btn { width: 28px; height: 28px; }
.calendar-head .icon-btn svg { width: 15px; height: 15px; }
.today-mini { height: 27px; padding: 0 9px; font-size: 10.5px; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 5px;
  color: var(--muted-2);
  font-size: 9px;
  text-align: center;
}
.calendar-weekdays span:nth-child(6),
.calendar-weekdays span:nth-child(7) { color: #b78b7d; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  min-height: 36px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cal-day:hover { background: var(--surface-2); border-color: var(--line); }
.cal-day.is-weekend { color: #a77a6d; background: rgba(246, 238, 231, 0.5); }
.cal-day.is-holiday { color: #b85b3b; background: #fcf1ea; }
.cal-day.is-makeup { color: var(--blue); }
.cal-day.is-today { box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.cal-day.is-selected { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 10px -5px rgba(14, 91, 80, 0.7); }
.cal-day.is-selected .cal-dot { background: #f0c98d; }
.cal-day.is-selected.is-weekend,
.cal-day.is-selected.is-holiday { color: #fff; }
.cal-day.is-blank { visibility: hidden; }
.cal-day .cal-dot {
  width: 4px;
  height: 4px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand-mid);
  opacity: 0.8;
}
.cal-day .cal-dot.multi { width: 8px; border-radius: 4px; }
.cal-day.is-selected .cal-dot { background: #f0c98d; opacity: 1; }
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9px;
}
.calendar-legend span { display: inline-flex; align-items: center; gap: 4px; }
.calendar-legend i { width: 7px; height: 7px; border-radius: 2px; }
.calendar-legend .lg-work { background: #dcebe5; }
.calendar-legend .lg-weekend { background: #f1e5dc; }
.calendar-legend .lg-holiday { background: #f3c9b8; }
.calendar-legend .lg-makeup { background: #c9dce8; }

.month-summary { margin-top: 16px; padding: 12px 13px; border-radius: 11px; background: var(--surface-2); }
.month-summary-row { display: flex; align-items: baseline; justify-content: space-between; }
.month-summary-row span { color: var(--muted); font-size: 10px; }
.month-summary-row strong { font-family: var(--font-display); font-size: 20px; font-weight: 550; }
.month-summary-bar { display: flex; height: 5px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: var(--surface-3); }
.month-summary-bar i { height: 100%; }
.month-summary-bar .normal { background: var(--brand-mid); }
.month-summary-bar .overtime { background: var(--accent); }
.month-summary-split { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 8px; color: var(--muted-2); font-size: 9px; }
.month-summary-split span { display: inline-flex; align-items: center; gap: 4px; }

.day-panel { min-width: 0; }
.day-hero {
  position: relative;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 4%, rgba(197, 138, 44, 0.08), transparent 30%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.day-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.day-title { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.day-title .day-num { font-family: var(--font-display); font-size: 36px; font-weight: 550; letter-spacing: -0.04em; line-height: 1; }
.day-title .day-month { color: var(--muted); font-size: 11px; }
.day-sub { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.day-total {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
}
.day-total strong { font-family: var(--font-display); font-size: 24px; font-weight: 550; line-height: 1; }
.day-total span { color: var(--muted-2); font-size: 9.5px; }
.day-splits { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.day-split-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}
.day-split-chip b { color: var(--ink-2); font-weight: 600; }
.day-split-chip .dot { width: 5px; height: 5px; }
.day-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }

.notice-strip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fcf3ec;
  color: #955234;
  font-size: 10.5px;
  line-height: 1.5;
}
.notice-strip svg { width: 15px; height: 15px; flex: none; }
.notice-strip.workday { background: var(--brand-faint); color: var(--brand-dark); }
.notice-strip.weekend { background: var(--surface-2); color: var(--muted); }

.entry-list { margin-top: 18px; }
.entry-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.entry-list-head h3 { font-size: 13px; font-weight: 650; }
.entry-list-head span { color: var(--muted-2); font-size: 10px; }
.entry-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.16s;
}
.entry-card + .entry-card { margin-top: 9px; }
.entry-card.is-overtime { border-left: 3px solid #df9b7f; }
.entry-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.entry-kind {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
}
.entry-kind.other { background: var(--amber-soft); color: #9a6a20; }
.entry-kind svg { width: 18px; height: 18px; }
.entry-main { flex: 1; min-width: 0; }
.entry-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.entry-top strong { font-size: 12.5px; font-weight: 650; }
.entry-top .badge { height: 20px; font-size: 9px; }
.entry-content { margin-top: 4px; color: var(--ink-2); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.entry-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 7px; color: var(--muted-2); font-size: 9.5px; }
.entry-sub span { display: inline-flex; align-items: center; gap: 4px; }
.entry-sub svg { width: 12px; height: 12px; }
.entry-hours { flex: none; text-align: right; }
.entry-hours strong { font-family: var(--font-display); font-size: 23px; font-weight: 550; letter-spacing: -0.02em; line-height: 1; }
.entry-hours strong span { margin-left: 2px; font-family: var(--font-sans); font-size: 9px; font-weight: 500; color: var(--muted-2); }
.entry-hours.is-overtime strong { color: #b35436; }
.entry-actions { display: flex; gap: 1px; margin-top: 8px; justify-content: flex-end; }
.entry-actions .icon-btn { width: 28px; height: 28px; }
.entry-actions .icon-btn svg { width: 14px; height: 14px; }

.day-empty { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 13px; background: rgba(255, 253, 248, 0.4); }

/* --------------------------------------------------------------------------
   日志明细
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.toolbar .toolbar-spacer { flex: 1; }
.toolbar .month-switch { display: flex; align-items: center; gap: 2px; padding-right: 4px; border-right: 1px solid var(--line); }
.toolbar .month-switch input[type="month"] { height: 35px; width: 137px; border: 0; background: transparent; padding: 0 5px; font-weight: 600; }
.toolbar .month-switch input[type="month"]:focus { box-shadow: none; }
.toolbar select { height: 35px; min-width: 105px; border-color: var(--line); background-color: var(--surface-2); font-size: 11.5px; border-radius: 8px; }
.toolbar .btn { height: 34px; font-size: 11.5px; border-radius: 8px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}
.summary-note { margin-top: 8px; color: var(--muted-2); font-size: 9.5px; text-align: right; }
.summary-cell { padding: 14px 16px; background: var(--surface); }
.summary-cell span { display: block; color: var(--muted-2); font-size: 9.5px; }
.summary-cell strong { display: block; margin-top: 5px; font-family: var(--font-display); font-size: 22px; font-weight: 550; line-height: 1; letter-spacing: -0.02em; }
.summary-cell strong small { margin-left: 2px; font-family: var(--font-sans); font-size: 9px; font-weight: 500; color: var(--muted-2); }
.summary-cell.highlight strong { color: var(--accent); }

.log-groups { display: flex; flex-direction: column; gap: 13px; margin-top: 15px; }
.log-group { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.log-group-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.log-group-head .group-date { font-family: var(--font-display); font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.log-group-head .group-weekday { color: var(--muted); font-size: 10px; }
.log-group-head .badge { height: 20px; font-size: 9px; }
.log-group-head .group-total { margin-left: auto; color: var(--muted); font-size: 10px; }
.log-group-head .group-total b { color: var(--ink); font-family: var(--font-display); font-size: 14px; font-weight: 550; }
.log-group.off .log-group-head { background: #fcf4ee; }
.log-group.off .log-group-head .group-date { color: #8f4b32; }

.log-row {
  display: grid;
  grid-template-columns: 98px minmax(120px, 0.8fr) minmax(180px, 1.6fr) 78px 70px 58px;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}
.log-row:last-child { border-bottom: 0; }
.log-row:hover { background: #fdfbf6; }
.log-person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.log-person .avatar { width: 25px; height: 25px; font-size: 8.5px; }
.log-person span { overflow: hidden; color: var(--ink-2); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.log-item { min-width: 0; }
.log-item strong { display: block; overflow: hidden; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.log-item span { display: block; overflow: hidden; color: var(--muted-2); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.log-content { min-width: 0; overflow: hidden; color: var(--ink-2); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.log-qty { color: var(--muted); font-size: 9.5px; text-align: right; white-space: nowrap; }
.log-hours { color: var(--ink); font-family: var(--font-display); font-size: 16px; font-weight: 550; text-align: right; white-space: nowrap; }
.log-hours span { margin-left: 1px; color: var(--muted-2); font-family: var(--font-sans); font-size: 8px; }
.log-actions { display: flex; justify-content: flex-end; gap: 1px; }
.log-actions .icon-btn { width: 26px; height: 26px; }
.log-actions .icon-btn svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   统计分析
   -------------------------------------------------------------------------- */

.stats-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.range-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.range-presets { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.range-presets button {
  height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.range-presets button:hover { color: var(--ink); }
.range-presets button.active { background: var(--surface); color: var(--brand-dark); box-shadow: 0 1px 3px rgba(25, 33, 31, 0.09); font-weight: 600; }
.range-custom { display: flex; align-items: center; gap: 5px; }
.range-custom input[type="month"] { height: 35px; width: 132px; font-size: 10.5px; border-radius: 8px; }
.range-custom span { color: var(--muted-2); font-size: 10px; }
.stats-scope { display: flex; align-items: center; gap: 8px; }
.stats-scope select { height: 36px; min-width: 120px; font-size: 11.5px; border-radius: 8px; }
.range-label { color: var(--muted); font-size: 10.5px; }
.range-label b { color: var(--ink-2); font-weight: 600; }

.stats-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: start;
}
.stats-main, .stats-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--brand-mid) 0 calc(var(--p, 50) * 1%), var(--accent) calc(var(--p, 50) * 1%) 100%);
}
.donut::after { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: var(--surface); }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 550; line-height: 1.05; letter-spacing: -0.03em; }
.donut-center span { color: var(--muted-2); font-size: 8.5px; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.legend-row { display: flex; align-items: flex-start; gap: 9px; }
.legend-row .dot { margin-top: 5px; }
.legend-row-copy { flex: 1; min-width: 0; }
.legend-row-copy span { display: block; color: var(--muted); font-size: 10px; }
.legend-row-copy strong { display: block; margin-top: 1px; font-family: var(--font-display); font-size: 17px; font-weight: 550; line-height: 1.2; }
.legend-row-copy strong small { font-family: var(--font-sans); font-size: 9px; color: var(--muted-2); }
.legend-row .pct { color: var(--muted-2); font-size: 9.5px; white-space: nowrap; }

.split-bar { margin-top: 6px; }
.split-bar-track { display: flex; height: 8px; overflow: hidden; border-radius: 8px; background: var(--surface-3); }
.split-bar-track i { height: 100%; }
.split-bar-track .work { background: var(--brand-mid); }
.split-bar-track .holiday { background: var(--accent); }
.split-bar-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted-2); font-size: 9px; }

.project-table { width: 100%; border-collapse: collapse; }
.project-table th {
  padding: 0 0 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}
.project-table th:not(:first-child),
.project-table td:not(:first-child) { text-align: right; }
.project-table td { padding: 11px 0; border-top: 1px solid var(--line); font-size: 11px; }
.project-table .proj-name { display: flex; align-items: center; gap: 8px; text-align: left; }
.project-table .proj-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--brand-mid); flex: none; }
.project-table .proj-name strong { display: block; font-size: 11px; font-weight: 600; }
.project-table .proj-name span { display: block; color: var(--muted-2); font-size: 8.5px; }
.project-table .table-hours { font-family: var(--font-display); font-size: 14px; font-weight: 550; }
.project-table .table-muted { color: var(--muted-2); font-size: 9.5px; }
.empty-table { padding: 28px 0; color: var(--muted-2); font-size: 11px; text-align: center; }

.member-rank { display: flex; flex-direction: column; gap: 3px; }
.member-rank-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member-rank-row:last-child { border-bottom: 0; }
.member-rank-index { width: 17px; color: var(--muted-2); font-family: var(--font-display); font-size: 10px; }
.member-rank-row .avatar { width: 27px; height: 27px; font-size: 9px; }
.member-rank-copy { flex: 1; min-width: 0; }
.member-rank-copy strong { display: block; overflow: hidden; font-size: 10.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.member-rank-copy span { color: var(--muted-2); font-size: 8.5px; }
.member-rank-hours { font-family: var(--font-display); font-size: 13px; font-weight: 550; white-space: nowrap; }
.member-rank-hours span { font-family: var(--font-sans); font-size: 8px; color: var(--muted-2); }

.matrix-card .section-head { margin-bottom: 13px; }
.matrix-table { width: 100%; border-collapse: collapse; }
.matrix-table th {
  padding: 0 0 9px;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: right;
  white-space: nowrap;
}
.matrix-table thead th:first-child { text-align: left; }
.matrix-table tbody th { padding: 10px 0; border-top: 1px solid var(--line); text-align: left; }
.matrix-table tbody td { padding: 10px 0; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: 16px; font-weight: 550; text-align: right; white-space: nowrap; }
.matrix-table small { margin-left: 1px; color: var(--muted-2); font-family: var(--font-sans); font-size: 8px; font-weight: 500; }
.matrix-label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 10.5px; font-weight: 600; }
.matrix-label .dot { width: 6px; height: 6px; }
.matrix-total { color: var(--ink); }
.matrix-table .matrix-sum th, .matrix-table .matrix-sum td { border-top: 1px solid var(--line-strong); color: var(--muted); font-size: 10px; font-weight: 600; }
.matrix-table .matrix-sum td { color: var(--ink-2); font-family: var(--font-display); font-size: 15px; }
.matrix-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); color: var(--muted-2); font-size: 9px; }

.table-split { display: block; margin-top: 2px; color: var(--muted-2); font-family: var(--font-sans); font-size: 8px; font-weight: 400; white-space: nowrap; }
.log-time-overtime { color: #b35436 !important; }

.category-list { display: flex; flex-direction: column; gap: 11px; }
.category-row { display: flex; align-items: center; gap: 10px; }
.category-name { width: 58px; flex: none; color: var(--muted); font-size: 10px; }
.category-track { flex: 1; height: 5px; overflow: hidden; border-radius: 5px; background: var(--surface-3); }
.category-track i { display: block; height: 100%; border-radius: 5px; background: var(--amber-bright); }
.category-value { width: 45px; flex: none; color: var(--ink-2); font-family: var(--font-display); font-size: 11px; text-align: right; }

/* --------------------------------------------------------------------------
   项目管理
   -------------------------------------------------------------------------- */

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.project-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.project-card.archived { background: var(--surface-2); opacity: 0.82; }
.project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.project-code {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--brand-faint);
  color: var(--brand);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.project-card h3 { margin-top: 12px; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.project-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  min-height: 34px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.project-metrics {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.project-metric span { display: block; color: var(--muted-2); font-size: 8.5px; }
.project-metric strong { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 18px; font-weight: 550; line-height: 1.2; }
.project-metric strong small { font-family: var(--font-sans); font-size: 8px; color: var(--muted-2); }
.project-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.project-unit { color: var(--muted-2); font-size: 9px; }
.project-actions { display: flex; gap: 2px; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 20px;
  background: #d9d3c7;
  transition: background 0.18s;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s var(--ease);
}
.switch input:checked + .switch-track { background: var(--brand-mid); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch-label { color: var(--muted); font-size: 9.5px; }

/* --------------------------------------------------------------------------
   成员管理
   -------------------------------------------------------------------------- */

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.admin-summary .summary-cell { border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-xs); }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.member-table { width: 100%; border-collapse: collapse; }
.member-table th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.member-table th:last-child, .member-table td:last-child { text-align: right; }
.member-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.member-table tr:last-child td { border-bottom: 0; }
.member-table tbody tr:hover { background: #fdfbf6; }
.member-table tr.inactive { opacity: 0.6; }
.member-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.member-cell strong { display: block; font-size: 11.5px; font-weight: 600; }
.member-cell span { display: block; color: var(--muted-2); font-size: 8.5px; }
.member-dept { color: var(--muted); font-size: 10px; }
.member-hours { font-family: var(--font-display); font-size: 13px; font-weight: 550; }
.member-actions { display: flex; justify-content: flex-end; gap: 2px; }
.member-actions .icon-btn { width: 28px; height: 28px; }
.member-actions .icon-btn svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   日历设置
   -------------------------------------------------------------------------- */

.calendar-admin-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.year-switch { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.year-switch .icon-btn { width: 28px; height: 28px; }
.year-switch .icon-btn svg { width: 14px; height: 14px; }
.year-switch strong { width: 50px; font-family: var(--font-display); font-size: 14px; font-weight: 600; text-align: center; }

.calendar-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid #ddcba8;
  border-radius: 12px;
  background: #faf5e8;
  color: #735b33;
  font-size: 11px;
  line-height: 1.65;
}
.calendar-note svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: #a9792b; }
.calendar-note strong { font-weight: 650; }
.legend-line { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 15px; color: var(--muted); font-size: 9.5px; }
.legend-line span { display: inline-flex; align-items: center; gap: 5px; }
.legend-line i { width: 8px; height: 8px; border-radius: 2px; }
.legend-line .work { background: #dcebe5; }
.legend-line .weekend { background: #eae4d8; }
.legend-line .holiday { background: #f2c5b1; }
.legend-line .makeup { background: #c6ddeb; }

.year-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini-month { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.mini-month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mini-month-head h3 { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.mini-month-head span { color: var(--muted-2); font-size: 8.5px; }
.mini-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 3px; color: var(--muted-2); font-size: 7.5px; text-align: center; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.mini-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-2);
  font-size: 8.5px;
  transition: background 0.12s, border-color 0.12s;
}
.mini-day:hover { border-color: var(--line-strong); background: var(--surface-2); }
.mini-day.is-weekend { color: #8d8272; background: #f1ece3; }
.mini-day.is-holiday { color: #a74a2d; background: #f7d9ca; }
.mini-day.is-makeup { color: #356783; background: #d8e8f2; }
.mini-day.is-today { box-shadow: inset 0 0 0 1px var(--brand); font-weight: 700; }
.mini-day.blank { visibility: hidden; }
.mini-day::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: transparent;
}
.mini-day.has-override::after { background: var(--accent); }
.mini-day.is-makeup.has-override::after { background: var(--blue); }

/* --------------------------------------------------------------------------
   弹窗 / 提示
   -------------------------------------------------------------------------- */

.modal-root { position: relative; z-index: 100; }
.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(10, 22, 19, 0.48);
  backdrop-filter: blur(5px);
  animation: fade-in 0.18s;
}
.modal-card {
  width: min(560px, 100%);
  max-height: min(90vh, 780px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 36px 90px -30px rgba(0, 0, 0, 0.55);
  animation: modal-in 0.24s var(--ease);
}
.modal-card.modal-lg { width: min(720px, 100%); }
.modal-card.modal-xl { width: min(920px, 100%); }
.modal-card.modal-sm { width: min(430px, 100%); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 23px 25px 0; }
.modal-head h3 { font-family: var(--font-display); font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.modal-head p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.modal-close { margin: -4px -6px 0 0; }
.modal-body { padding: 20px 25px 22px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 15px 25px 20px; border-top: 1px solid var(--line); }
.modal-foot .modal-foot-note { margin-right: auto; color: var(--muted-2); font-size: 9.5px; }
.modal-section + .modal-section { margin-top: 17px; }

/* 同面板记录正常 + 加班 */
.combined-date-row { display: grid; grid-template-columns: 178px minmax(0, 1fr); gap: 12px; align-items: end; margin-bottom: 14px; }
.combined-day-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.combined-day-hint svg { width: 15px; height: 15px; flex: none; color: var(--brand-mid); }
.combined-day-hint b { color: var(--ink-2); font-weight: 600; }
.combined-day-hint.is-holiday { background: #fcf2eb; color: #955234; }
.combined-day-hint.is-holiday svg { color: var(--accent); }
.split-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.time-block {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--brand-mid);
  border-radius: 13px;
  background: var(--surface-2);
}
.time-block.tone-overtime { border-top-color: var(--accent); background: #fdf8f4; }
.time-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.time-block-title { display: flex; align-items: center; gap: 5px; color: var(--ink); font-size: 11.5px; font-weight: 650; }
.time-block-title svg { width: 14px; height: 14px; color: var(--brand-mid); }
.time-block.tone-overtime .time-block-title svg { color: var(--accent); }
.sync-btn {
  height: 20px;
  margin-left: 2px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1;
}
.sync-btn.active { border-color: #c9e1d8; background: var(--brand-soft); color: var(--brand-dark); }
.time-block.tone-overtime .sync-btn.active { border-color: #f0c9b9; background: var(--accent-soft); color: #a9472b; }
.block-hours { display: flex; align-items: center; gap: 3px; flex: none; }
.block-hours input {
  width: 67px;
  height: 34px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 550;
  text-align: right;
}
.block-hours input:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 2px rgba(14, 91, 80, 0.1); }
.block-hours input::placeholder { color: #b7b2a6; }
.block-hours span { color: var(--muted-2); font-size: 9px; }
.block-kind-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 9px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}
.block-kind-tabs button {
  height: 24px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-2);
  font-size: 9.5px;
}
.block-kind-tabs button:hover { color: var(--ink); }
.block-kind-tabs button.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.time-block.tone-overtime .block-kind-tabs button.active { background: var(--accent-soft); color: #a9472b; }
.block-fields { display: flex; flex-direction: column; gap: 8px; }
.block-kind-fields { display: grid; grid-template-columns: 1.45fr 1fr; gap: 8px; }
.block-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.block-field > span { color: var(--muted); font-size: 9px; font-weight: 600; }
.block-field > span small { color: var(--muted-2); font-size: 8px; font-weight: 400; }
.block-field input,
.block-field select,
.block-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10.5px;
}
.block-field input,
.block-field select { height: 33px; padding: 0 8px; }
.block-field select { padding-right: 26px !important; background-position: right 8px center; background-size: 13px; }
.block-field textarea { min-height: 55px; height: 55px; padding: 7px 8px; line-height: 1.5; resize: vertical; }
.block-field input:focus,
.block-field select:focus,
.block-field textarea:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 2px rgba(14, 91, 80, 0.09); }
.block-unit { position: relative; }
.block-unit input { padding-right: 37px; }
.block-unit span { position: absolute; right: 8px; top: 50%; color: var(--muted-2); font-size: 9px; transform: translateY(-50%); pointer-events: none; }
.combined-total-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9.5px;
}
.combined-total-main { display: flex; align-items: baseline; gap: 6px; }
.combined-total-main strong { color: var(--ink); font-family: var(--font-display); font-size: 18px; font-weight: 550; }
.combined-total-split { color: var(--muted-2); }
.combined-remaining { margin-left: auto; color: var(--brand-dark); font-weight: 600; }
.combined-remaining.over { color: var(--danger); }
#combined-error { margin-top: 10px; }

/* 动态多条工时记录 */
#daily-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 9px; }
.daily-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand-mid);
  border-radius: 11px;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.daily-row[data-time="overtime"] { border-left-color: var(--accent); background: #fdf8f4; }
.daily-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.daily-row-index { min-width: 43px; color: var(--muted-2); font-size: 9px; font-weight: 650; }
.daily-time-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.daily-time-toggle button {
  height: 23px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted-2);
  font-size: 9px;
}
.daily-time-toggle button.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 650; }
.daily-row[data-time="overtime"] .daily-time-toggle button.active { background: var(--accent-soft); color: #a9472b; }
.daily-hours { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.daily-hours input {
  width: 64px;
  height: 32px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 550;
  text-align: right;
}
.daily-hours input:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 2px rgba(14, 91, 80, 0.09); }
.daily-hours span { color: var(--muted-2); font-size: 9px; }
.row-remove { width: 27px; height: 27px; }
.row-remove svg { width: 14px; height: 14px; }
.daily-row-body { display: grid; grid-template-columns: minmax(230px, 1.05fr) minmax(0, 1.3fr); gap: 9px; }
.daily-row-side { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.daily-kind-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.daily-kind-tabs button { height: 23px; border: 0; border-radius: 4px; background: transparent; color: var(--muted-2); font-size: 9px; }
.daily-kind-tabs button.active { background: var(--surface); color: var(--brand-dark); font-weight: 650; box-shadow: 0 1px 2px rgba(25, 33, 31, 0.07); }
.daily-kind-fields { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 6px; }
.daily-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.daily-field > span { color: var(--muted); font-size: 8.5px; font-weight: 600; }
.daily-field input,
.daily-field select,
.daily-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
}
.daily-field input,
.daily-field select { height: 30px; padding: 0 7px; }
.daily-field select { padding-right: 24px !important; background-position: right 6px center; background-size: 12px; }
.daily-field textarea { height: 63px; min-height: 63px; padding: 6px 7px; line-height: 1.5; resize: vertical; }
.daily-field input:focus,
.daily-field select:focus,
.daily-field textarea:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 2px rgba(14, 91, 80, 0.08); }
.daily-unit { position: relative; }
.daily-unit input { padding-right: 34px; }
.daily-unit span { position: absolute; right: 7px; top: 50%; color: var(--muted-2); font-size: 8px; transform: translateY(-50%); pointer-events: none; }
.daily-content { height: 100%; }
.daily-content textarea { flex: 1; height: 100%; min-height: 63px; }
.add-row-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  height: 33px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--brand-mid);
  font-size: 10px;
  font-weight: 600;
}
.add-row-btn:hover { border-color: var(--brand); background: var(--brand-faint); }
.add-row-btn:disabled { cursor: not-allowed; opacity: 0.45; background: transparent; }
.add-row-btn svg { width: 14px; height: 14px; }
.daily-total-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--surface-2);
}
.daily-total-chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.daily-total-chip span { color: var(--muted); font-size: 8.5px; }
.daily-total-chip strong { color: var(--ink-2); font-family: var(--font-display); font-size: 12px; font-weight: 550; }
.daily-total-chip.is-ok { border-color: #c9e2d8; background: var(--brand-faint); }
.daily-total-chip.is-ok strong { color: var(--brand-dark); }
.daily-total-chip.is-over { border-color: #ecc7bb; background: var(--accent-soft); }
.daily-total-chip.is-over strong { color: #a9472b; }
.daily-total-note { margin-left: auto; color: var(--muted-2); font-size: 9px; }
.daily-total-note.is-over { color: var(--danger); font-weight: 600; }
#daily-error { margin-top: 10px; }

.time-toggle-row { margin-bottom: 16px; }
.time-toggle-row > .field-label { display: block; margin-bottom: 7px; }
.time-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.time-toggle-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: left;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.time-toggle-btn .dot { width: 8px; height: 8px; flex: none; }
.time-toggle-btn span { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.time-toggle-btn strong { color: var(--ink-2); font-size: 11.5px; font-weight: 650; }
.time-toggle-btn small { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.time-toggle-btn:hover { border-color: var(--line-strong); background: var(--surface); }
.time-toggle-btn.active { border-color: var(--brand); background: var(--brand-faint); box-shadow: 0 0 0 2px rgba(14, 91, 80, 0.07); }
.time-toggle-btn[data-entry-time="overtime"].active { border-color: #d98766; background: #fdf1eb; box-shadow: 0 0 0 2px rgba(217, 101, 63, 0.08); }

.type-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 18px; }.type-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: left;
  transition: border-color 0.16s, background 0.16s, color 0.16s, box-shadow 0.16s;
}
.type-tab svg { width: 18px; height: 18px; flex: none; }
.type-tab strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.type-tab span { display: block; color: var(--muted-2); font-size: 9px; }
.type-tab:hover { border-color: var(--line-strong); background: var(--surface); }
.type-tab.active { border-color: var(--brand); background: var(--brand-faint); box-shadow: 0 0 0 2px rgba(14, 91, 80, 0.07); }
.type-tab.active svg { color: var(--brand); }
.type-tab.active strong { color: var(--brand-dark); }

.hours-input { display: flex; align-items: center; gap: 8px; }
.hours-input input { flex: 1; min-width: 0; width: auto; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font-family: var(--font-display); font-size: 19px; font-weight: 550; }
.hours-input input:focus { outline: none; border-color: var(--brand-mid); box-shadow: 0 0 0 3px rgba(21, 118, 106, 0.11); }
.hours-input span { flex: none; color: var(--muted-2); font-size: 11px; white-space: nowrap; }
.hours-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.hours-chip {
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 9.5px;
}
.hours-chip:hover { border-color: var(--brand); color: var(--brand); }
.hours-chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }

.unit-input { position: relative; }
.unit-input input { padding-right: 44px; }
.unit-input span { position: absolute; right: 12px; top: 50%; color: var(--muted-2); font-size: 10px; transform: translateY(-50%); pointer-events: none; }

.entry-day-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
}
.entry-day-hint svg { width: 14px; height: 14px; }
.entry-day-hint b { color: var(--ink-2); font-weight: 600; }
.entry-day-hint.is-holiday { background: #fcf2eb; color: #955234; }
.entry-day-hint.is-holiday b { color: #8f4329; }

.quick-pwd { display: flex; gap: 7px; }
.quick-pwd input { flex: 1; }

.day-modal-date { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); }
.day-modal-date strong { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.day-modal-date span { color: var(--muted); font-size: 10.5px; }
.type-options { display: flex; flex-direction: column; gap: 7px; }
.type-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.type-option:hover { border-color: var(--line-strong); background: var(--surface-2); }
.type-option:has(input:checked) { border-color: var(--brand); background: var(--brand-faint); }
.type-option input { margin-top: 3px; accent-color: var(--brand); }
.type-option-copy strong { display: block; font-size: 11.5px; font-weight: 600; }
.type-option-copy span { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; line-height: 1.5; }

/* Toast */
.toast-root {
  position: fixed;
  z-index: 200;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 220px;
  max-width: 360px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  background: #18322c;
  color: #f4f6ef;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.5);
  font-size: 11.5px;
  line-height: 1.5;
  animation: toast-in 0.24s var(--ease);
  pointer-events: auto;
}
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: #84c8b7; }
.toast.error { background: #40231f; }
.toast.error svg { color: #ef9d87; }
.toast.leaving { animation: toast-out 0.2s forwards; }

/* Skeleton */
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #ece7dc;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.4s infinite;
}
.skeleton-card { height: 120px; border-radius: var(--radius); }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-80 { width: 80%; }

/* Boot */
.boot-screen {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  background: #f3f0e9;
  transition: opacity 0.35s, visibility 0.35s;
}
.boot-screen.done { opacity: 0; visibility: hidden; }
.boot-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--brand);
  color: #f7ecd8;
  font-family: var(--font-display);
  font-size: 29px;
  box-shadow: 0 16px 36px -18px rgba(14, 91, 80, 0.7);
  animation: boot-pulse 1.8s ease-in-out infinite;
}
.boot-copy { display: flex; align-items: center; color: var(--muted); font-size: 11px; letter-spacing: 0.05em; }
.boot-dots { display: inline-flex; gap: 3px; margin-left: 3px; }
.boot-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); animation: dot-blink 1.2s infinite; }
.boot-dots i:nth-child(2) { animation-delay: 0.15s; }
.boot-dots i:nth-child(3) { animation-delay: 0.3s; }

/* --------------------------------------------------------------------------
   动画
   -------------------------------------------------------------------------- */

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(10px); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes boot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes dot-blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view > * { animation: rise-in 0.35s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: 0.03s; }
.view > *:nth-child(3) { animation-delay: 0.06s; }

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1240px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-row { grid-template-columns: 86px minmax(110px, 0.8fr) minmax(140px, 1.4fr) 66px 62px 52px; }
}

@media (max-width: 1080px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.28s var(--ease); }
  .sidebar.open { transform: none; box-shadow: 30px 0 70px -30px rgba(0, 0, 0, 0.5); }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .sidebar-close { display: inline-flex; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-flex; }
  .topbar { padding: 0 24px; }
  .view { padding: 24px 24px 56px; }
  .dash-hero { align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-side { display: grid; grid-template-columns: 1fr 1fr; }
  .stats-side > .card:first-child { grid-column: span 2; }
  .login-art { padding-left: 42px; padding-right: 42px; }
  .login-copy h1 { font-size: 46px; }
}

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; padding: 46px 28px; }
  .login-mobile-brand { display: flex; }
  .login-panel-foot { margin-top: 50px; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; }
  .today-card { grid-column: span 2; }
  .log-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .summary-strip .summary-cell:nth-child(n+4) { border-top: 1px solid var(--line); }
  .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .log-row { grid-template-columns: 62px minmax(100px, 0.8fr) minmax(120px, 1.2fr) 58px 58px; }
  .log-row .log-qty { display: none; }
  .log-row .log-actions { grid-column: 5; }
  .log-row .log-hours { grid-column: 4; }
}

@media (max-width: 760px) {
  .topbar { height: 70px; padding: 0 16px; gap: 10px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-title p { display: none; }
  .topbar-actions { gap: 7px; }
  .day-pill { display: none; }
  .quick-add { height: 35px; padding: 0 11px; }
  .quick-add span:last-child { display: none; }
  .quick-add svg { width: 18px; height: 18px; }
  .view { padding: 18px 16px 48px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head h2 { font-size: 24px; }
  .page-head-actions { justify-content: flex-start; }
  .dash-hero { flex-direction: column; align-items: stretch; gap: 12px; }
  .dash-greeting h2 { font-size: 25px; }
  .dash-controls { justify-content: flex-start; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 15px; }
  .stat-value { font-size: 29px; }
  .dash-side { display: flex; }
  .today-card { grid-column: auto; }
  .today-body { gap: 16px; }
  .ring { width: 92px; height: 92px; }
  .ring-inner strong { font-size: 23px; }
  .log-layout { grid-template-columns: 1fr; }
  .side-calendar { padding: 16px; }
  .calendar-grid { gap: 4px; }
  .cal-day { min-height: 39px; }
  .stats-side { display: flex; }
  .stats-side > .card:first-child { grid-column: auto; }
  .range-custom { width: 100%; }
  .range-custom input[type="month"] { flex: 1; }
  .stats-scope { width: 100%; }
  .stats-scope select { flex: 1; }
  .year-grid { grid-template-columns: 1fr; }
  .onboarding { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip .summary-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .summary-note { text-align: left; }
  .chart-tools { width: 100%; justify-content: flex-start; margin-top: 8px; }
  .time-toggle-btn span { flex-direction: column; align-items: flex-start; gap: 1px; }
  .log-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    padding: 12px 14px;
  }
  .log-row .log-person { grid-column: 1; }
  .log-row .log-item { grid-column: 1; }
  .log-row .log-content { grid-column: 1; white-space: normal; }
  .log-row .log-qty { display: none; }
  .log-row .log-hours { grid-column: 2; grid-row: 1; align-self: start; }
  .log-row .log-actions { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
  .log-group-head { flex-wrap: wrap; }
  .member-table th:nth-child(4), .member-table td:nth-child(4),
  .member-table th:nth-child(5), .member-table td:nth-child(5) { display: none; }
  .member-table th, .member-table td { padding: 11px 12px; }
  .member-table th:nth-child(3), .member-table td:nth-child(3) { display: none; }
  .project-table th:nth-child(3), .project-table td:nth-child(3) { display: none; }
  .donut-wrap { gap: 16px; }
  .donut { width: 112px; height: 112px; }
  .login-panel { padding: 36px 22px; }
  .login-mobile-brand { margin-bottom: 26px; }
  .login-head h2 { font-size: 30px; }
  .login-panel-foot { margin-top: 42px; }
  .modal-overlay { padding: 0; align-items: end; }
  .modal-card { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; animation: sheet-in 0.26s var(--ease); }
  .modal-head { padding: 20px 19px 0; }
  .modal-body { padding: 17px 19px 19px; }
  .modal-foot { padding: 13px 19px calc(16px + env(safe-area-inset-bottom)); }
  .modal-card.modal-sm, .modal-card.modal-lg { width: 100%; }
  .modal-card.modal-xl { width: 100%; }
  .combined-date-row { grid-template-columns: 1fr; }
  .split-entry-grid { grid-template-columns: 1fr; }
  .combined-total-bar { flex-wrap: wrap; gap: 6px 12px; }
  .combined-remaining { width: 100%; margin-left: 0; }
  .daily-row-body { grid-template-columns: 1fr; }
  .daily-content textarea { min-height: 58px; }
  .daily-total-note { width: 100%; margin-left: 0; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .form-grid .span-2 { grid-column: span 1; }
  .toast-root { left: 14px; right: 14px; top: 14px; align-items: stretch; }
  .toast { max-width: none; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 560px) {
  .time-toggle { grid-template-columns: 1fr; }
  .block-kind-fields { grid-template-columns: 1fr; }
  .daily-kind-fields { grid-template-columns: 1fr; }
  .daily-total-chip { flex: 1; justify-content: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card .stat-value { font-size: 27px; }
  .dash-greeting h2 { font-size: 23px; }
  .today-card { padding: 18px; }
  .today-body { flex-direction: column; align-items: flex-start; }
  .ring { width: 84px; height: 84px; }
  .today-actions { margin-top: 10px; }
  .chart-card { padding: 16px 13px 12px; }
  .chart-legend { display: none; }
  .chart-y { width: 23px; height: 176px; font-size: 8px; }
  .chart-plot { height: 176px; }
  .bar-cols { gap: 1px; }
  .bar-stack { width: 78%; min-width: 2px; }
  .chart-x span { font-size: 7px; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-cell { padding: 12px 13px; }
  .summary-cell strong { font-size: 19px; }
  .day-hero { padding: 18px; }
  .day-title .day-num { font-size: 31px; }
  .entry-card { padding: 13px; gap: 10px; }
  .entry-kind { width: 32px; height: 32px; border-radius: 9px; }
  .entry-hours strong { font-size: 20px; }
  .entry-note, .today-entry .entry-note { display: none; }
  .toolbar { padding: 9px; }
  .toolbar .month-switch { width: 100%; border-right: 0; padding-right: 0; }
  .toolbar .month-switch input { flex: 1; }
  .toolbar select { flex: 1; min-width: 0; }
  .toolbar .toolbar-spacer { display: none; }
  .toolbar .btn { flex: 1; }
  .project-metrics { gap: 16px; }
  .member-table th:nth-child(6), .member-table td:nth-child(6) { display: none; }
  .login-head h2 { font-size: 27px; }
  .login-form .input-wrap > input { height: 46px; }
  .login-panel-foot { flex-direction: column; align-items: flex-start; gap: 7px; }
  .calendar-note { font-size: 10px; }
  .mini-month { padding: 12px; }
  .mini-day { height: 27px; }
  .donut { width: 100px; height: 100px; }
  .donut::after { inset: 12px; }
  .donut-center strong { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
