:root {
  color-scheme: light;
  --bg: #f3f2ee;
  --surface: #fbfbf9;
  --surface-raised: #ffffff;
  --surface-muted: #efeee9;
  --ink: #1f2527;
  --ink-soft: #5f6869;
  --ink-faint: #8b9292;
  --line: #ddded9;
  --line-soft: #e9e9e4;
  --accent: #2f5e6d;
  --accent-dark: #234955;
  --accent-soft: #e2ecee;
  --danger: #b34d48;
  --danger-soft: #faeae8;
  --success: #4d766a;
  --sidebar: #202627;
  --radius-sm: 8px;
  --radius-md: 13px;
  --radius-lg: 20px;
  --shadow-soft: 0 12px 40px rgba(25, 31, 31, 0.07);
  --shadow-float: 0 20px 64px rgba(19, 25, 26, 0.18);
  --font-sans: Inter, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid rgba(47, 94, 109, 0.28);
  outline-offset: 2px;
}

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

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 8px;
  background: white;
  transform: translateY(-140%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.app-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 16px 18px;
  color: #ecf0ee;
  background: var(--sidebar);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 9px;
}
.brand > span:last-child { display: grid; gap: 3px; }
.brand strong { font-size: 15px; letter-spacing: 0.03em; }
.brand small { color: #929d9b; font-size: 11px; letter-spacing: 0.09em; }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid #5e6b69;
  border-radius: 50%;
}
.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  width: 13px;
  height: 2px;
  border-radius: 2px;
  background: #c6d1cf;
  transform-origin: center;
}
.brand-mark::before { transform: rotate(0deg); }
.brand-mark::after { transform: rotate(60deg); }
.brand-mark span { transform: rotate(-60deg); }

.nav-list { display: grid; gap: 5px; margin-top: 38px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  padding: 0 12px;
  border-radius: 10px;
  color: #9ba5a4;
  font-weight: 570;
  transition: color 140ms ease, background 140ms ease;
}
.nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-item.is-active { color: white; background: #343c3d; }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 3px;
  height: 20px;
  border-radius: 0 3px 3px 0;
  background: #93b6bd;
}

.icon { flex: 0 0 auto; width: 18px; height: 18px; }
.nav-item .icon { width: 19px; height: 19px; }

.button,
.icon-button,
.text-button,
.rail-more {
  border: 0;
  cursor: pointer;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-weight: 650;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { cursor: not-allowed; opacity: 0.48; }
.button-primary { color: white; background: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-dark); }
.button-secondary { border: 1px solid var(--line); background: var(--surface-raised); }
.button-secondary:hover:not(:disabled) { border-color: #bfc3bf; }
.button-secondary.is-complete { color: var(--success); border-color: #bdd0ca; background: #f0f6f4; }
.button-quiet { border: 1px solid var(--line); background: var(--surface-raised); }

.sidebar-create { width: 100%; margin-top: auto; background: #f3f6f5; color: #243033; }
.sidebar-create:hover:not(:disabled) { background: white; }
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 15px 6px 0;
  color: #75807e;
  font-size: 11px;
}
.local-dot { width: 6px; height: 6px; border-radius: 50%; background: #7baa9c; }

.main-content { min-width: 0; }
body.has-overlay { overflow: hidden; }
.loading-state { display: grid; place-items: center; min-height: 60vh; color: var(--ink-soft); }
.home-page, .page-pad { padding: 32px 34px 36px; }
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  margin-bottom: 24px;
}
.page-header h1 { margin: 3px 0 0; font-size: clamp(25px, 2.3vw, 34px); line-height: 1.15; letter-spacing: -0.035em; }
.eyebrow { margin: 0; color: var(--ink-faint); font-size: 10px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }
.page-actions { display: flex; align-items: center; gap: 10px; }

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #eaeae5;
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-weight: 650;
}
.segmented button.is-selected { color: var(--ink); background: white; box-shadow: 0 2px 8px rgba(21, 26, 26, 0.07); }
.segmented .icon { width: 16px; height: 16px; }

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 20px;
  align-items: start;
}
.schedule-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
}
.date-navigator, .timeline-actions { display: flex; align-items: center; gap: 6px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 37px;
  height: 37px;
  padding: 0;
  border-radius: 9px;
  color: var(--ink-soft);
  background: transparent;
}
.icon-button:hover { color: var(--ink); background: var(--surface-muted); }
.month-picker-label { position: relative; }
.month-picker-label input {
  width: 145px;
  height: 37px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.month-picker-label input:hover { background: var(--surface-muted); }

.timeline-frame { position: relative; }
.timeline-scroll {
  --day-width: 64px;
  position: relative;
  max-height: calc(100vh - 205px);
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  cursor: grab;
  scrollbar-color: #c5c8c4 transparent;
  scrollbar-width: thin;
}
.timeline-scroll.is-dragging { cursor: grabbing; user-select: none; }
.timeline-scroll.is-dragging .project-hit { cursor: grabbing; }
.timeline-canvas {
  position: relative;
  width: calc(var(--total-days) * var(--day-width));
  min-height: 0;
  background-color: #fafaf8;
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(var(--day-width) - 1px), rgba(80, 89, 88, 0.10) calc(var(--day-width) - 1px), rgba(80, 89, 88, 0.10) var(--day-width));
}
.timeline-sticky-head {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: rgba(250, 250, 248, 0.96);
  backdrop-filter: blur(8px);
}
.timeline-months { position: relative; height: 42px; border-bottom: 1px solid var(--line-soft); }
.month-band {
  position: absolute;
  left: calc(var(--start) * var(--day-width));
  width: calc(var(--span) * var(--day-width));
  height: 100%;
  overflow: hidden;
  padding: 13px 0 0 12px;
  border-right: 1px solid rgba(74, 84, 83, 0.16);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
}
.month-band > span { display: inline-block; }
.timeline-days { position: relative; height: 44px; border-bottom: 1px solid var(--line); }
.timeline-day {
  position: absolute;
  left: calc(var(--start) * var(--day-width));
  width: var(--day-width);
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.timeline-day.is-weekend { background: rgba(71, 79, 78, 0.025); }
.timeline-day.is-today span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: white;
  background: var(--accent);
  font-weight: 750;
}
.timeline-projects { position: relative; padding: 24px 0 38px; overflow: clip; }
.timeline-project-row { position: relative; width: 100%; height: 58px; }
.timeline-project-row[hidden] { display: none; }
.today-line {
  position: absolute;
  z-index: 4;
  top: 0;
  bottom: 0;
  left: calc((var(--day-index) + .5) * var(--day-width));
  width: 1px;
  background: rgba(47, 94, 109, 0.7);
  pointer-events: none;
}
.today-line span {
  position: sticky;
  top: 94px;
  display: inline-block;
  margin: 8px 0 0 5px;
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}
.project-hit {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: calc(var(--start) * var(--day-width));
  width: calc(var(--span) * var(--day-width));
  height: 38px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.project-hit:hover .project-solid { filter: saturate(1.1) brightness(0.97); box-shadow: 0 4px 12px color-mix(in srgb, var(--project-color) 20%, transparent); }
.project-solid {
  position: absolute;
  z-index: 1;
  top: 9px;
  left: 0;
  width: calc(var(--solid-span) * var(--day-width));
  height: 27px;
  min-width: 8px;
  border: 1px solid color-mix(in srgb, var(--project-color) 60%, white);
  border-radius: 7px;
  background: color-mix(in srgb, var(--project-color) 20%, white);
  transition: filter 140ms ease, box-shadow 140ms ease;
}
.project-open-line {
  position: absolute;
  z-index: 0;
  top: 22px;
  left: calc(var(--dash-start) * var(--day-width));
  right: 0;
  height: 1px;
  background-image: repeating-linear-gradient(to right, color-mix(in srgb, var(--project-color) 45%, transparent) 0 5px, transparent 5px 10px);
}
.project-label {
  position: absolute;
  z-index: 5;
  top: 15px;
  left: 9px;
  max-width: min(var(--label-max, 180px), max(28px, calc(var(--solid-span) * var(--day-width) - 18px)));
  overflow: hidden;
  color: color-mix(in srgb, var(--project-color) 48%, #1f2527);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(var(--label-offset, 0));
}
.project-hit.is-view-clipped-left .project-label::before { content: "‹ "; }
.project-hit.is-view-clipped-right .project-label::after { content: " ›"; }
.project-label.is-external { top: -8px; max-width: 190px; padding: 1px 4px; border-radius: 4px; background: rgba(250,250,248,.92); }
.project-hit.is-view-clipped-left .project-label,
.project-hit.is-tight-start .project-label,
.project-hit.is-boundary-short .project-label {
  top: -7px;
  max-width: var(--label-max, 200px);
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(250,250,248,.94);
}
.milestone,
.shoot-range {
  position: absolute;
  z-index: 7;
  display: grid;
  place-items: center;
  color: var(--project-color);
  pointer-events: auto;
}
.milestone {
  top: 12px;
  left: calc(var(--point) * var(--day-width));
  width: 20px;
  height: 20px;
  border: 1px solid color-mix(in srgb, var(--project-color) 55%, white);
  border-radius: 50%;
  background: white;
  transform: translateX(-50%);
}
.milestone .icon { width: 11px; height: 11px; stroke-width: 2.2; }
.milestone.is-complete { color: white; background: var(--project-color); }
.milestone.is-overdue { color: var(--danger); border-color: #d99590; background: var(--danger-soft); }
.milestone.completed { width: 10px; height: 10px; top: 17px; background: var(--project-color); }
.shoot-range {
  top: 7px;
  left: calc(var(--point) * var(--day-width));
  width: calc(var(--shoot-span) * var(--day-width));
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--project-color) 70%, white);
  border-radius: 6px;
  background: color-mix(in srgb, var(--project-color) 78%, white);
  transform: translateX(calc(var(--day-width) * -0.5));
}
.shoot-range .icon { width: 15px; height: 15px; color: white; stroke-width: 2; }
.shoot-range:not(.is-multiday) { width: 32px; border-radius: 6px; transform: translateX(-50%); }
.timeline-empty {
  position: sticky;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: var(--viewport-width, 100%);
  height: 260px;
  color: var(--ink-soft);
}
.timeline-empty[hidden] { display: none; }
.timeline-empty > .icon { width: 26px; height: 26px; color: var(--ink-faint); }
.text-button { padding: 4px; color: var(--accent); background: none; font-weight: 700; }
.timeline-hint { margin: 0; padding: 10px 15px; border-top: 1px solid var(--line-soft); color: var(--ink-faint); font-size: 10px; }
.timeline-hint span { padding: 0 6px; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 0 15px 12px; color: var(--ink-soft); font-size: 10px; }
.timeline-legend > span { display: inline-flex; gap: 5px; align-items: center; }
.timeline-legend .icon { width: 13px; height: 13px; }
.timeline-legend i { width: 19px; border-top: 1px dashed var(--ink-faint); }

.insight-rail { display: grid; gap: 16px; }
.rail-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: 0 8px 28px rgba(26, 31, 31, 0.045);
}
.rail-heading { display: flex; align-items: flex-start; justify-content: space-between; padding: 17px 17px 13px; }
.rail-heading h2 { margin: 3px 0 0; font-size: 16px; letter-spacing: -0.015em; }
.count-badge { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 20px; color: var(--danger); background: var(--danger-soft); font-size: 11px; font-weight: 750; }
.attention-list, .recent-list { display: grid; }
.attention-item,
.recent-item {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line-soft);
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.attention-item {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 16px;
  border-left: 3px solid var(--project-color);
}
.attention-item:hover, .recent-item:hover { background: #f8f8f5; }
.attention-item[hidden] { display: none; }
.attention-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--accent); background: var(--accent-soft); }
.attention-icon .icon { width: 14px; height: 14px; }
.priority-0 .attention-icon, .priority-1 .attention-icon { color: var(--danger); background: var(--danger-soft); }
.attention-item > span:last-child, .recent-item > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.attention-item strong, .recent-item strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attention-item small, .recent-item small { overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.rail-more { display: flex; align-items: center; justify-content: center; gap: 5px; width: 100%; min-height: 37px; border-top: 1px solid var(--line-soft); color: var(--ink-soft); background: #fafaf8; font-size: 11px; font-weight: 700; }
.rail-more .icon { width: 13px; height: 13px; transition: transform 140ms ease; }
.rail-more.is-expanded .icon { transform: rotate(-90deg); }
.recent-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 12px 16px; }
.recent-item > .icon { width: 14px; height: 14px; color: var(--ink-faint); }
.project-color { display: inline-block; width: 7px; height: 28px; border-radius: 5px; background: var(--project-color); }
.project-color.large { width: 9px; height: 32px; }
.rail-empty { display: flex; align-items: center; gap: 11px; margin: 0 14px 15px; padding: 13px; border-radius: 10px; color: var(--success); background: #f0f5f3; }
.rail-empty.compact { color: var(--ink-soft); background: var(--surface-muted); }
.rail-empty > .icon { width: 18px; height: 18px; }
.rail-empty span { display: grid; gap: 3px; }
.rail-empty strong { font-size: 12px; }
.rail-empty small { color: var(--ink-soft); font-size: 10px; }

.calendar-view { padding: 0 13px 15px; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(88px, 1fr)); }
.calendar-weekdays span { padding: 10px 9px; color: var(--ink-faint); font-size: 10px; font-weight: 720; text-align: right; }
.calendar-grid { overflow: hidden; border-top: 1px solid var(--line); border-left: 1px solid var(--line); border-radius: 8px; }
.calendar-cell { min-height: 108px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.calendar-cell.is-outside { background: #f5f4f0; }
.calendar-cell.is-outside > * { opacity: .45; }
.calendar-date { display: flex; align-items: center; justify-content: flex-end; gap: 5px; min-height: 24px; color: var(--ink-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.calendar-date small { color: var(--accent); font-size: 8px; font-weight: 750; }
.calendar-cell.is-today .calendar-date span { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: white; background: var(--accent); }
.calendar-events { display: grid; gap: 3px; margin-top: 3px; }
.calendar-event { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 20px; padding: 2px 5px; overflow: hidden; border: 0; border-left: 2px solid var(--project-color); border-radius: 3px; color: var(--ink-soft); background: color-mix(in srgb, var(--project-color) 11%, white); cursor: pointer; text-align: left; }
.calendar-event.is-shoot { color: color-mix(in srgb, var(--project-color) 65%, #1f2527); background: color-mix(in srgb, var(--project-color) 22%, white); font-weight: 700; }
.calendar-event .icon { width: 10px; height: 10px; }
.calendar-cell { min-width: 0; }
.calendar-event span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.more-events { padding-left: 6px; color: var(--ink-faint); font-size: 9px; }

.projects-surface {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
}
.projects-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.segmented.text-only button span { display: grid; place-items: center; min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px; color: var(--ink-faint); background: rgba(0,0,0,.05); font-size: 9px; }
.search-field { display: flex; align-items: center; gap: 8px; width: min(270px, 38vw); min-height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fafaf8; }
.search-field .icon { width: 16px; color: var(--ink-faint); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-field input::placeholder { color: var(--ink-faint); }
.project-table { width: 100%; }
.project-table-head,
.project-table-row { display: grid; grid-template-columns: minmax(180px, 1.35fr) .65fr 1fr 1fr 28px; align-items: center; gap: 18px; padding: 0 20px; }
.project-table-head { min-height: 40px; color: var(--ink-faint); background: #f7f7f4; font-size: 10px; font-weight: 720; letter-spacing: .04em; }
.project-table-row { width: 100%; min-height: 67px; border: 0; border-top: 1px solid var(--line-soft); background: white; cursor: pointer; text-align: left; }
.project-table-row:hover { background: #fafaf7; }
.project-table-row > span { min-width: 0; overflow: hidden; color: var(--ink-soft); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.project-name-cell { display: flex; align-items: center; gap: 10px; color: var(--ink) !important; }
.project-row-link { padding: 8px 0; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.project-table-row .is-overdue-text { color: var(--danger); }
.project-name-cell i { flex: 0 0 auto; width: 7px; height: 30px; border-radius: 4px; background: var(--project-color); }
.project-table-row > span:last-child { display: grid; place-items: center; }
.project-table-row > span:last-child .icon { width: 15px; color: var(--ink-faint); }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 20px; color: var(--ink-soft); background: #ecece8; font-size: 10px; font-weight: 720; white-space: nowrap; }
.status-拍摄中 { color: #315c6a; background: #dfecf0; }
.status-前期 { color: #6c5d83; background: #ede8f2; }
.status-后续 { color: #875d3f; background: #f4e9df; }
.status-待回款 { color: #4d7165; background: #e4efeb; }
.projects-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 360px; padding: 40px; color: var(--ink-soft); text-align: center; }
.projects-empty > .icon { width: 32px; height: 32px; margin-bottom: 14px; color: var(--ink-faint); }
.projects-empty strong { font-size: 16px; }
.projects-empty small { max-width: 350px; margin: 7px 0 18px; color: var(--ink-faint); line-height: 1.6; }

.placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 155px);
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.placeholder-symbol { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 22px; border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.placeholder-symbol .icon { width: 28px; height: 28px; }
.placeholder-card h2, .placeholder-card h1 { max-width: 520px; margin: 8px 0 0; font-size: clamp(23px, 3vw, 36px); letter-spacing: -.035em; }
.placeholder-card p:not(.eyebrow) { max-width: 480px; margin: 13px 0 24px; color: var(--ink-soft); line-height: 1.7; }
.error-page .placeholder-card > .icon { width: 36px; height: 36px; color: var(--danger); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(23, 29, 30, .25); backdrop-filter: blur(2px); animation: fade-in 160ms ease both; }
.project-drawer { position: fixed; top: 0; right: 0; z-index: 90; display: flex; flex-direction: column; width: min(450px, 100vw); height: 100dvh; background: var(--surface-raised); box-shadow: -20px 0 60px rgba(18, 24, 25, .18); animation: drawer-in 210ms cubic-bezier(.22,.78,.32,1) both; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 0 22px; border-bottom: 1px solid var(--line-soft); }
.drawer-head > div { display: flex; align-items: center; gap: 9px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 26px 26px 34px; }
.drawer-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.drawer-title-row h2 { margin: 5px 0 0; font-size: 25px; line-height: 1.24; letter-spacing: -.03em; }
.drawer-title-row .button { flex: 0 0 auto; min-height: 35px; padding: 0 11px; font-size: 11px; }
.drawer-title-row .icon { width: 14px; height: 14px; }
.detail-timeline { position: relative; display: grid; gap: 0; margin: 31px 0 28px; }
.detail-step { position: relative; display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 11px; min-height: 64px; }
.detail-step:not(:last-child)::before { content: ""; position: absolute; top: 25px; bottom: -2px; left: 10px; width: 1px; background: var(--line); }
.detail-step.is-done:not(:last-child)::before { background: #a9c2bb; }
.step-marker { position: relative; z-index: 2; display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--line); border-radius: 50%; background: white; }
.step-marker .icon { width: 11px; height: 11px; }
.detail-step.is-done .step-marker { color: white; border-color: var(--success); background: var(--success); }
.detail-step.is-current .step-marker { border: 5px solid var(--accent-soft); background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.detail-step.is-open .step-marker { border-style: dashed; }
.detail-step > span:last-child { display: grid; gap: 4px; align-content: start; padding-top: 1px; }
.detail-step small { color: var(--ink-faint); font-size: 10px; }
.detail-step strong { color: var(--ink-soft); font-size: 12px; }
.detail-label { margin: 0 0 7px; color: var(--ink-faint); font-size: 10px; font-weight: 720; letter-spacing: .08em; }
.detail-notes { padding: 15px; border-radius: 10px; background: var(--surface-muted); }
.detail-notes p:last-child { margin: 0; color: var(--ink-soft); line-height: 1.7; white-space: pre-wrap; }
.drawer-actions { display: grid; gap: 11px; padding: 17px 22px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; }
.finish-hint { color: var(--ink-soft); text-align: center; font-size: 11px; }
.detail-conflicts { margin-top: 20px; padding: 13px; border: 1px solid #e6b9b5; border-radius: 10px; background: #fff8f7; }
.detail-conflicts > strong { display: flex; gap: 8px; align-items: center; color: var(--danger); }
.detail-conflicts > p { color: var(--ink-soft); font-size: 12px; }
.detail-conflicts button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 0; border: 0; border-top: 1px solid #efdbd8; background: transparent; text-align: left; cursor: pointer; }
.detail-conflicts button > span:nth-child(2) { flex: 1; }
.detail-conflicts small { display: block; margin-top: 3px; color: var(--ink-soft); }
.completion-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.completion-actions .button { min-height: 38px; padding: 0 9px; font-size: 10px; }
.completion-actions .icon { width: 14px; height: 14px; }
.finish-button { width: 100%; }
.completed-note { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 41px; border-radius: 9px; color: var(--success); background: #eef5f2; font-size: 11px; font-weight: 700; }
.completed-note .icon { width: 15px; height: 15px; }

.modal {
  width: min(650px, calc(100vw - 32px));
  max-height: min(840px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-float);
}
.modal::backdrop { background: rgba(23, 29, 30, .42); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in 190ms cubic-bezier(.2,.8,.3,1) both; }
.modal-shell { display: flex; flex-direction: column; max-height: inherit; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 21px 23px 16px; border-bottom: 1px solid var(--line-soft); }
.modal-head h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.025em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 21px 23px; overflow-y: auto; }
.form-field { display: grid; align-content: start; gap: 7px; min-width: 0; }
.form-field.is-wide { grid-column: 1 / -1; }
.form-field > span { color: var(--ink-soft); font-size: 11px; font-weight: 680; }
.form-field em { color: var(--danger); font-style: normal; }
.form-field input, .form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fbfbf9; outline: 0; transition: border-color 120ms ease, box-shadow 120ms ease; }
.form-field input { height: 41px; padding: 0 11px; }
.form-field textarea { padding: 10px 11px; resize: vertical; line-height: 1.6; }
.form-field input:focus, .form-field textarea:focus { border-color: #7f9da6; box-shadow: 0 0 0 3px rgba(47,94,109,.1); }
.field-hint { min-height: 13px; color: var(--ink-faint); font-size: 9px; line-height: 1.4; }
.field-error { display: none; color: var(--danger); font-size: 10px; }
.form-field.has-error input, .form-field.has-error textarea { border-color: #ce7e79; background: #fffafa; }
.form-field.has-error .field-hint { display: none; }
.form-field.has-error .field-error { display: block; }
.form-status { min-height: 18px; padding: 0 23px; color: var(--danger); font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 23px 18px; border-top: 1px solid var(--line-soft); }
.modal[data-saving="true"] .form-grid { pointer-events: none; opacity: .75; }
.modal[data-saving="true"] [data-close] { opacity: .5; cursor: wait; }
.confirm-modal { width: min(460px, calc(100vw - 32px)); }
.confirm-copy { display: flex; align-items: center; gap: 13px; margin: 24px 23px 17px; padding: 13px; border-radius: 10px; background: var(--surface-muted); }
.confirm-copy p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.confirm-modal .form-field { margin: 0 23px 24px; }

.toast-region { position: fixed; right: 24px; bottom: 24px; z-index: 150; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; min-width: 230px; max-width: min(390px, calc(100vw - 32px)); padding: 12px 15px; border: 1px solid #c7d9d3; border-radius: 10px; color: #365c51; background: #f2f8f6; box-shadow: 0 10px 30px rgba(22,30,28,.14); opacity: 0; transform: translateY(8px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-error { color: var(--danger); border-color: #edc6c2; background: #fff5f4; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast .icon { width: 16px; height: 16px; }

@keyframes drawer-in { from { opacity: .5; transform: translateX(35px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

@media (max-width: 1190px) {
  .home-page, .page-pad { padding: 26px 24px 30px; }
  .home-layout { grid-template-columns: minmax(0, 1fr) 252px; gap: 14px; }
  .project-table-head, .project-table-row { grid-template-columns: minmax(160px, 1.25fr) .65fr 1fr 1fr 22px; gap: 11px; padding-inline: 15px; }
}

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; flex-direction: row; align-items: center; width: 100%; height: 64px; padding: 8px 14px; }
  .brand { padding: 0; }
  .brand small { display: none; }
  .nav-list { display: flex; gap: 4px; margin: 0 0 0 auto; }
  .nav-item { min-height: 40px; padding: 0 10px; }
  .nav-item.is-active::before { display: none; }
  .sidebar-create { width: auto; margin: 0 0 0 8px; padding: 0 12px; }
  .sidebar-foot { display: none; }
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .insight-rail { grid-template-columns: 1fr 1fr; }
  .timeline-scroll { max-height: 620px; }
}

@media (max-width: 720px) {
  .sidebar { overflow-x: auto; }
  .brand > span:last-child, .nav-item span, .sidebar-create span { display: none; }
  .brand { min-width: 38px; }
  .nav-list { margin-left: 8px; }
  .nav-item { padding: 0 11px; }
  .sidebar-create { width: 40px; padding: 0; }
  .home-page, .page-pad { padding: 20px 14px 24px; }
  .page-header { align-items: flex-start; margin-bottom: 17px; }
  .page-header h1 { font-size: 25px; }
  .segmented button { min-width: 38px; padding: 0 9px; }
  .segmented:not(.text-only) button { font-size: 0; }
  .segmented .icon { width: 18px; height: 18px; }
  .schedule-toolbar { flex-wrap: wrap; }
  .insight-rail { grid-template-columns: 1fr; }
  .calendar-view { overflow-x: auto; }
  .timeline-scroll { max-height: 60vh; }
  .calendar-weekdays, .calendar-grid { min-width: 700px; }
  .projects-tools { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; }
  .project-table { overflow-x: auto; }
  .project-table-head, .project-table-row { min-width: 760px; }
  .completion-actions { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.is-wide { grid-column: auto; }
  .modal { max-height: calc(100dvh - 16px); }
}

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

/* ── 多拍摄日与项目收入组件 ── */
.shoot-ranges-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}
.shoot-ranges-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shoot-ranges-head .field-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 680;
}
.shoot-ranges-list {
  display: grid;
  gap: 10px;
}
.shoot-range-card {
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-muted);
  display: grid;
  gap: 8px;
}
.shoot-range-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.shoot-range-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.shoot-range-num .icon {
  width: 13px;
  height: 13px;
  color: var(--ink-faint);
}
.shoot-range-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.remove-range-btn {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.remove-range-btn:hover {
  color: var(--danger);
  background: var(--danger-soft);
}
.add-range-btn {
  justify-self: start;
  font-size: 11px;
  min-height: 32px;
  padding: 0 12px;
  gap: 6px;
}
.input-currency-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-symbol {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  pointer-events: none;
}
.input-currency-wrapper input {
  padding-left: 30px !important;
  font-feature-settings: "tnum";
  font-weight: 700;
}
.detail-revenue-card {
  margin-top: 15px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #f0f7f4;
  border: 1px solid #d2e8de;
}
.detail-revenue-card .detail-label {
  margin-bottom: 4px;
  color: #3b735c;
}
.revenue-amount {
  margin: 0;
  font-size: 20px;
  color: #1e5a44;
  letter-spacing: -.02em;
}
.project-table.is-completed-table .project-table-head,
.project-table.is-completed-table .project-table-row {
  grid-template-columns: minmax(160px, 1.25fr) .65fr 1fr 1fr 1fr 24px;
}
.revenue-cell {
  font-weight: 720;
  color: #23654d !important;
  font-feature-settings: "tnum";
}

