:root {
  color-scheme: light;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Inter", system-ui, sans-serif;
  font-size: 14px;
  --canvas: #f3f7f6;
  --paper: #fff;
  --ink: #142d2a;
  --muted: #607772;
  --quiet: #6d837d;
  --border: #dce8e4;
  --border-light: #e9f0ee;
  --accent: #0b7863;
  --accent-deep: #096450;
  --accent-soft: #e1f4ec;
  --rail: #102d2b;
  --rail-muted: #a4bcb5;
  --rail-width: 234px;
  --radius: 16px;
  --shadow: 0 2px 4px #0f3c2a04, 0 10px 26px #0f3c2a05;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
img, svg { vertical-align: middle; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: #b1e4d0; color: #133b31; }
:focus-visible {
  outline: 3px solid #2aa88b;
  outline-offset: 3px;
}
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 70;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  border-radius: 7px;
  background: var(--paper);
}

[data-tone="teal"]   { --tone-text: #096e5b; --tone-bg: #e4f4ee; --tone-dot: #249981; }
[data-tone="blue"]   { --tone-text: #295d9c; --tone-bg: #eaf2fb; --tone-dot: #5d92d0; }
[data-tone="orange"] { --tone-text: #92501d; --tone-bg: #fff0df; --tone-dot: #df914a; }
[data-tone="purple"] { --tone-text: #6a50a0; --tone-bg: #f1ecfb; --tone-dot: #9277c7; }
[data-tone="muted"]  { --tone-text: #576c67; --tone-bg: #edf2f0; --tone-dot: #849b94; }
[data-tone="green"]  { --tone-text: #286b46; --tone-bg: #e8f5ea; --tone-dot: #54a46e; }
[data-tone="rose"]   { --tone-text: #98495a; --tone-bg: #fcecef; --tone-dot: #d17487; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  height: 100dvh;
  padding: 26px 14px 16px;
  overflow-y: auto;
  background: radial-gradient(ellipse at 0 0, #1a423a 0, transparent 54%), var(--rail);
  color: #eef7f3;
  scrollbar-color: #47635d transparent;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}
.brand-icon {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid #a4e4cd;
  border-radius: 12px;
  background: #9be0c6;
  color: #133f35;
}
.brand-icon svg { width: 22px; height: 22px; }
.brand-name, .brand-sub { display: block; }
.brand-name { color: #f2fcf8; font-size: 1.21rem; font-weight: 750; letter-spacing: -.02em; }
.brand-dot { color: #9be0c6; }
.brand-sub { margin-top: 2px; color: var(--rail-muted); font-size: .76rem; }
.rail-caption {
  margin: 42px 0 11px;
  padding-inline: 10px;
  color: #a1b6ae;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.navigation { display: grid; align-content: start; gap: 5px; margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: flex;
  width: 100%;
  min-height: 45px;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #c4d6d0;
  font-weight: 530;
  text-align: left;
  transition: color .18s, background-color .18s, border-color .18s;
}
.nav-link svg { width: 19px; height: 19px; flex: 0 0 19px; color: #a5c7bb; }
.nav-label { flex: 1; }
.nav-link:hover { background: #ffffff0d; color: #fff; }
.nav-link:is(.active, .is-active, [aria-current="page"], [aria-selected="true"]) {
  border-color: #528d7c66;
  background: #255046;
  color: #effff8;
  font-weight: 650;
}
.nav-link:is(.active, .is-active, [aria-current="page"], [aria-selected="true"]) svg { color: #9ce2cb; }
.nav-count {
  min-width: 24px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ffffff14;
  color: #c5e1d7;
  font-size: .77rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.side-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--rail-muted);
  font-size: .81rem;
}
.role-select {
  display: flex;
  min-height: 51px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #ffffff22;
  border-radius: 10px;
  background: #ffffff09;
  text-align: left;
}
.role-select select {
  width: 100%;
  min-width: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: #effaf6;
  font-size: .91rem;
  cursor: pointer;
}
.role-select option { background-color: var(--rail); color: #fff; }
.role-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 8px;
  background: #285248;
  color: #a8dccc;
}
.role-icon svg { width: 16px; height: 16px; }
.role-label { flex: 1; color: #f2fbf8; font-weight: 650; }
.role-label small { display: block; color: var(--rail-muted); font-weight: 400; }
.role-select > svg { width: 16px; height: 16px; flex: 0 0 16px; }

.workspace { min-width: 0; min-height: 100vh; margin-left: var(--rail-width); }
.topbar {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 34px;
  border-bottom: 1px solid var(--border-light);
  background: #fcfdfd;
}
.breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.breadcrumb svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--quiet); }
.breadcrumb strong, .breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 700; }
.topbar-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.icon-btn, .mobile-toggle {
  position: relative;
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--paper);
  color: #4a655f;
  transition: background-color .18s, border-color .18s, color .18s;
}
.icon-btn:hover, .mobile-toggle:hover { border-color: #aed3c6; background: #eaf5f0; color: var(--accent-deep); }
.icon-btn svg, .mobile-toggle svg { width: 18px; height: 18px; }
.notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #df9255;
}
.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  place-items: center;
  padding: 0;
  border: 1px solid #cde7dd;
  border-radius: 50%;
  background: #e1f1eb;
  color: #1b6957;
  font-size: .86rem;
  font-weight: 750;
}
.avatar svg { width: 16px; height: 16px; }
.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 29px;
  padding: 4px 10px;
  border: 1px solid #dcece4;
  border-radius: 999px;
  background: #f1f8f5;
  color: #336c59;
  font-size: .81rem;
  font-weight: 620;
  white-space: nowrap;
}
.demo-tag svg { width: 14px; height: 14px; }
.demo-tag::before { width: 6px; height: 6px; border-radius: 50%; background: #57a78d; content: ""; }
.demo-tag:has(svg)::before { display: none; }
.mobile-toggle { display: none; }
.page { width: min(100%, 1560px); margin-inline: auto; padding: 29px 34px 42px; }
.page > h1, .page-header h1, .page-heading h1 { font-size: clamp(1.65rem, 2.4vw, 2.15rem); font-weight: 750; line-height: 1.28; }
.page > h1 + p, .page-header p, .page-heading p { margin-top: 5px; color: var(--muted); }
.page-header, .page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.list-page, .detail-page { min-width: 0; }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 207px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 29px 35px;
  border: 1px solid #c4e3d7;
  border-radius: 21px;
  background:
    radial-gradient(ellipse at 93% 36%, #acdecb 0, #cff0df91 42%, transparent 76%),
    linear-gradient(106deg, #e4f4ed, #d7efe2 73%, #d7eee2);
}
.hero-copy { position: relative; z-index: 1; max-width: 59%; }
.hero-copy > :is(.eyebrow, .hero-kicker, small) {
  display: block;
  margin-bottom: 8px;
  color: #306b5b;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
}
.hero-copy > .hero-kicker { display: flex; align-items: center; gap: 6px; }
.hero h1 {
  color: #12352d;
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  font-weight: 770;
  letter-spacing: -.035em;
  line-height: 1.22;
  text-wrap: balance;
}
.hero p { margin-top: 10px; color: #486c60; line-height: 1.65; }
.hero .action-row { margin-top: 20px; }
.hero-art {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 auto;
  width: 42%;
  display: grid;
  place-items: center;
  color: #0d624f;
  pointer-events: none;
}
.hero-art::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(#528d7570 .8px, transparent .8px);
  background-size: 15px 15px;
  mask-image: radial-gradient(ellipse at 58% 48%, #000 6%, transparent 76%);
  content: "";
}
.hero-art::after {
  position: absolute;
  z-index: -1;
  width: 80%;
  aspect-ratio: 1;
  border: 1px solid #79b99d60;
  border-radius: 50%;
  box-shadow: 0 0 0 27px #93c8af2b, 0 0 0 54px #93c8af20;
  content: "";
}
.hero-art > svg { width: min(100%, 365px); height: 94%; overflow: visible; }
.film-card {
  position: relative;
  display: grid;
  width: clamp(122px, 60%, 252px);
  aspect-ratio: 1.43;
  place-items: center;
  padding: 12px;
  border: 1px solid #689f8e;
  border-radius: 15px;
  background: linear-gradient(145deg, #2a7862, #133e35 76%);
  color: #d0f7e7;
  box-shadow: -11px 11px 0 #93cbb7, -12px 12px 0 1px #85baa7, 0 14px 28px #215c4733;
  transform: rotate(-7deg);
}
.film-card > svg { width: 30%; height: auto; }
.hero-art .film-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(115px, 58%, 231px);
}
.film-card-back {
  aspect-ratio: 1.65;
  border-color: #77b39e;
  background: #a6d7c3;
  box-shadow: 0 5px 12px #25594b22;
  transform: translate(-39%, -46%) rotate(10deg);
}
.film-card-front {
  grid-template-rows: 1fr auto;
  gap: 8px;
  aspect-ratio: 1.52;
  padding: 9px;
  box-shadow: 0 14px 28px #215c4744;
  transform: translate(-56%, -51%) rotate(-7deg);
}
.film-window {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px solid #83ceaf70;
  border-radius: 8px;
  background: radial-gradient(ellipse at 60% 34%, #6fba9b 0, #3b947c 55%, #226a58 100%);
}
.film-window svg {
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid #c6f1deba;
  border-radius: 50%;
  background: #dbf9e73b;
  color: #edfff5;
}
.film-timeline {
  display: grid;
  width: 100%;
  grid-template-columns: 1.3fr 1fr .7fr;
  gap: 4px;
}
.film-timeline i { height: 7px; border-radius: 3px; background: #81c7ac; }
.film-timeline i:nth-child(2) { background: #4c9e87; }
.film-timeline i:nth-child(3) { background: #d1efca; }
.cut-mark {
  position: absolute;
  top: 23%;
  right: 17%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 7px;
  border: 1px solid #c1e5d1;
  border-radius: 11px;
  background: #eaf9ed;
  color: #236653;
  box-shadow: 0 6px 16px #245a4726;
  transform: rotate(11deg);
}
.cut-mark svg { width: 100%; height: 100%; }
.hero-art .cut-mark {
  top: 34%;
  right: auto;
  left: 16%;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: #7fbfa7;
  box-shadow: none;
  transform: rotate(29deg);
}
.hero-art .cut-mark-two { top: 74%; left: 80%; width: 8px; height: 8px; background: #75b79e; }
.hero-spark {
  position: absolute;
  top: 20%;
  right: 16%;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid #d6f4e4;
  border-radius: 13px;
  background: #edf9eb;
  color: #39846b;
  box-shadow: 0 6px 16px #245a4730;
  transform: rotate(10deg);
}
.hero-spark svg { width: 26px; height: 26px; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.primary-btn, .secondary-btn, .text-btn, .filter-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1.35;
  text-align: center;
  transition: background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}
:is(.primary-btn, .secondary-btn, .text-btn, .filter-btn) svg { width: 17px; height: 17px; flex: 0 0 17px; }
.primary-btn { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 1px 2px #0d544b22; }
.primary-btn:not(:disabled):hover { border-color: var(--accent-deep); background: var(--accent-deep); box-shadow: 0 3px 9px #0d544b29; }
.secondary-btn { border-color: #c9ddd5; background: #ffffffec; color: #264f43; }
.secondary-btn:not(:disabled):hover { border-color: #a0cbb9; background: #f5fbf8; }
.text-btn { min-height: 30px; padding: 3px 5px; background: transparent; color: var(--accent); }
.text-btn:not(:disabled):hover { background: var(--accent-soft); color: var(--accent-deep); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-block: 17px; }
.kpi-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 3px 8px;
  min-width: 0;
  min-height: 114px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color .18s, box-shadow .18s;
}
.kpi-card:hover { border-color: #a2cdbd; box-shadow: 0 7px 18px #245e4516; }
.kpi-card > :is(.kpi-label, .kpi-value, .kpi-note) { grid-column: 1; }
.kpi-icon, .next-icon, .flow-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--tone-bg, var(--accent-soft));
  color: var(--tone-text, var(--accent));
}
.kpi-icon { grid-column: 2; grid-row: 1 / 3; align-self: start; }
:is(.kpi-icon, .next-icon, .flow-icon) svg { width: 19px; height: 19px; }
.kpi-label { color: var(--muted); font-size: .87rem; font-weight: 620; }
.kpi-value {
  color: var(--ink);
  font-size: clamp(1.57rem, 2.62vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.kpi-note { color: var(--muted); font-size: .78rem; }

.flow-bar {
  display: grid;
  grid-auto-columns: minmax(115px, 1fr);
  grid-auto-flow: column;
  gap: 5px;
  margin-bottom: 17px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafefc;
  scrollbar-color: #aecbc0 transparent;
  scrollbar-width: thin;
}
.flow-step {
  display: flex;
  min-width: 0;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #31544a;
  white-space: nowrap;
}
button.flow-step:hover, .flow-step:is(.active, .is-active, [aria-current="step"]) { border-color: #d5e9e1; background: #edf7f2; }
.flow-icon { width: 27px; height: 27px; flex-basis: 27px; border-radius: 7px; }
.flow-icon svg { width: 15px; height: 15px; }
.flow-label { font-size: .85rem; font-weight: 650; }
.flow-count {
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  place-items: center;
  padding: 0 3px;
  border-radius: 6px;
  background: #eff4f2;
  color: #52726a;
  font-size: .77rem;
  font-variant-numeric: tabular-nums;
}

.lower-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .39fr); gap: 15px; }
.panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel-heading {
  display: flex;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 13px 17px;
}
.panel-title { color: var(--ink); font-size: 1.11rem; font-weight: 730; line-height: 1.3; }
.panel-caption { margin-top: 3px; color: var(--muted); font-size: .81rem; }
.panel-emblem {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 9px;
  background: var(--tone-bg, var(--accent-soft));
  color: var(--tone-text, var(--accent));
}
.table-wrap { width: 100%; overflow-x: auto; scrollbar-color: #adcbc0 transparent; scrollbar-width: thin; }
.job-table { width: 100%; min-width: 500px; border-collapse: collapse; font-size: .87rem; text-align: left; }
.job-table th, .job-table td { padding: 10px 11px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.job-table :is(th, td):first-child { padding-left: 16px; }
.job-table :is(th, td):last-child { padding-right: 16px; }
.job-table th {
  padding-block: 8px;
  background: #f5f9f7;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 650;
  white-space: nowrap;
}
.job-table tr:last-child td { border-bottom: 0; }
.job-table tbody tr:hover { background: #f8fcfa; }
.job-table tr[data-id], .job-table tr[data-action] { cursor: pointer; }
.job-table td:not(:first-child) { white-space: nowrap; }
.job-table .text-btn { min-height: 25px; padding-block: 2px; font-size: .82rem; }
.row-main { display: flex; min-width: 0; align-items: center; gap: 9px; }
button.row-main {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
}
button.row-main:hover .job-title { color: var(--accent-deep); }
.row-open { min-width: 30px; min-height: 28px; padding: 4px; border-color: transparent; background: transparent; }
.row-thumb {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dcefe7;
  border-radius: 8px;
  background: var(--tone-bg, #eaf5ee);
  color: var(--tone-text, var(--accent));
}
.row-thumb svg { width: 16px; height: 16px; }
.row-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.job-title { color: var(--ink); font-size: .9rem; font-weight: 690; overflow-wrap: anywhere; }
button.job-title { padding: 0; border: 0; background: transparent; text-align: left; }
a.job-title:hover, button.job-title:hover { color: var(--accent); }
.job-sub { display: block; margin-top: 2px; color: var(--muted); font-size: .77rem; overflow-wrap: anywhere; }
.status-pill, .priority-pill {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tone-bg, #ecf3f0);
  color: var(--tone-text, #536d65);
  font-size: .77rem;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.status-pill::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--tone-dot, #769c90);
  content: "";
}
.priority-pill svg { width: 13px; height: 13px; }
.next-list { display: grid; gap: 0; margin: 0; padding: 0 15px 12px; list-style: none; }
.next-item {
  display: flex;
  width: 100%;
  min-height: 60px;
  align-items: center;
  gap: 9px;
  padding: 9px 1px;
  border: 0;
  border-top: 1px solid var(--border-light);
  background: transparent;
  color: var(--ink);
  text-align: left;
}
.next-item:hover { color: var(--accent-deep); }
.next-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 8px; }
.next-icon svg { width: 17px; height: 17px; }
.next-copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.next-copy > :is(strong, .job-title) { display: block; font-weight: 690; }
.next-copy > :is(p, small, .job-sub) { display: block; margin-top: 3px; color: var(--muted); font-size: .76rem; }
.next-item > svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--quiet); }
.empty {
  display: grid;
  min-height: 126px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}
.empty svg { width: 31px; height: 31px; color: var(--accent); }

.toolbar {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block: 15px;
}
.filter-group { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 7px; }
.search-box {
  display: flex;
  min-width: min(100%, 245px);
  min-height: 41px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
}
.search-box svg { width: 17px; height: 17px; flex: 0 0 17px; }
.search-box input { width: 100%; padding-block: 9px; border: 0; background: transparent; color: var(--ink); }
.search-box input:focus { outline: none; }
.search-box:focus-within { outline: 2px solid #2aa88b; outline-offset: 2px; }
.filter-btn {
  min-height: 37px;
  border-color: var(--border);
  background: var(--paper);
  color: var(--muted);
}
.filter-btn:hover { border-color: #add2c5; color: var(--accent-deep); }
.filter-btn:is(.active, .is-active, [aria-pressed="true"], [aria-selected="true"]) {
  border-color: #acd6c6;
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.input, .field :is(input, select, textarea) {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #ccdcd7;
  border-radius: 9px;
  background: var(--paper);
  line-height: 1.45;
}
.field :is(input, select, textarea)::placeholder, .search-box input::placeholder { color: #71837d; }
.field textarea { min-height: 92px; resize: vertical; }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: #d48390; background: #fffafb; }

.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.work-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color .18s, box-shadow .18s;
}
.work-card:is(button, a, [data-action], [data-id]):hover {
  border-color: #a2cdbd;
  box-shadow: 0 9px 23px #245e4520;
}
.work-card h2, .work-card h3 { font-size: 1.13rem; line-height: 1.36; }
.work-card p { color: var(--muted); overflow-wrap: anywhere; }
.work-card .action-row { margin-top: auto; }
.card-top {
  position: relative;
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: #e4f0ea;
}
.card-top img { display: block; width: 100%; aspect-ratio: 1.95; object-fit: cover; }
.card-top .row-thumb { width: 37px; height: 37px; }
.card-top .row-thumb svg { width: 19px; height: 19px; }
.work-play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 1px solid #c7ebda73;
  border-radius: 9px;
  background: #153c33dc;
  color: #ecfff4;
}
.work-play svg { width: 20px; height: 20px; }
.work-card-copy { display: grid; justify-items: start; gap: 6px; min-width: 0; }
.work-card-copy strong, .work-card-copy p { overflow-wrap: anywhere; }
.work-card-copy > small { color: var(--muted); }
.back-button { margin: -1px 0 10px -5px; }
.back-button svg { transform: rotate(180deg); }
.detail-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.detail-heading { align-items: center; }
.detail-actions { justify-content: flex-end; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(260px, 1fr); align-items: start; gap: 15px; margin-block: 17px; }
.detail-panel { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.detail-panel > :is(h2, h3) { margin-bottom: 12px; font-size: 1.11rem; }
.detail-panel > .panel-heading { min-height: 0; margin-bottom: 12px; padding: 0; }
.detail-column { display: grid; min-width: 0; gap: 15px; }
.owner-line, .detail-brief {
  min-width: 0;
  margin-top: 12px;
  padding: 11px;
  border-radius: 8px;
  background: #f4f8f6;
  overflow-wrap: anywhere;
}
.review-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f1ded0;
  border-radius: 8px;
  background: #fcf4ec;
  color: #754626;
  overflow-wrap: anywhere;
}
.review-note p { margin-top: 4px; }
.compact-empty { min-height: 85px; border: 1px dashed var(--border); border-radius: 10px; }
.asset-video {
  display: block;
  width: 100%;
  max-height: min(65vh, 380px);
  margin-bottom: 12px;
  border-radius: 10px;
  background: #12302b;
  object-fit: contain;
}
.asset-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f4f9f6;
  color: var(--accent-deep);
  font-weight: 650;
}
.asset-link:hover { background: var(--accent-soft); }
.field-grid, .metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-grid > * { min-width: 0; padding: 10px 11px; border-radius: 8px; background: #f4f8f6; overflow-wrap: anywhere; }
.field-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.metric-grid { margin-block: 12px; }
.metric-grid > * { min-width: 0; padding: 12px; border: 1px solid var(--border-light); border-radius: 10px; background: #f5f9f7; }
.metric-grid strong { display: block; color: var(--accent-deep); font-size: 1.4rem; line-height: 1.2; }
.metric-grid small { color: var(--muted); }
.stepper {
  display: grid;
  grid-auto-columns: minmax(105px, 1fr);
  grid-auto-flow: column;
  gap: 5px;
  margin: 0 0 13px;
  overflow-x: auto;
  padding: 2px 2px 7px;
  list-style: none;
  scrollbar-color: #aecbc0 transparent;
  scrollbar-width: thin;
}
.step {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #f6f9f8;
  color: var(--muted);
  font-size: .83rem;
  text-align: center;
}
.step:is(.current, .active, .is-active, [aria-current="step"]) { border-color: #a8d5c5; background: #ddf3e9; color: #135e4b; font-weight: 700; }
.step:is(.done, .complete, .completed, .is-complete, [data-state="complete"]) { background: #eef8f3; color: #286851; }
.step svg { width: 16px; height: 16px; flex: 0 0 16px; }
.timeline { display: grid; margin: 5px 0 0; padding: 0; list-style: none; }
.timeline-item {
  position: relative;
  min-width: 0;
  min-height: 54px;
  padding: 0 0 14px 20px;
  overflow-wrap: anywhere;
}
.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: var(--border);
  content: "";
}
.timeline-item::after {
  position: absolute;
  top: 7px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone-dot, #76b39f);
  content: "";
}
.timeline-item strong { color: var(--ink); font-size: .91rem; }
.timeline-item :is(p, small, time) { color: var(--muted); font-size: .81rem; }
.script-box {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: #f5f9f7;
  color: #35564d;
  font: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.dialog-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow-y: auto;
  padding: 16px;
  background: #0c272369;
}
.dialog {
  width: min(100%, 615px);
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 1px solid #cde1d9;
  border-radius: 17px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 65px #102e2c38;
  scrollbar-color: #adcbc0 transparent;
  scrollbar-width: thin;
}
dialog.dialog::backdrop { background: #0c272369; }
.dialog-head, .dialog-actions { display: flex; align-items: center; gap: 12px; padding: 15px 20px; }
.dialog-head { justify-content: space-between; border-bottom: 1px solid var(--border-light); }
.dialog-head h2 { font-size: 1.24rem; line-height: 1.28; }
.dialog-head p { margin-top: 4px; color: var(--muted); font-size: .86rem; }
.dialog-body { padding: 17px 20px; }
.dialog-intro { margin-bottom: 14px; color: var(--muted); line-height: 1.65; }
.dialog-actions { justify-content: end; flex-wrap: wrap; border-top: 1px solid var(--border-light); background: #fafcfb; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; min-width: 0; align-content: start; gap: 5px; font-weight: 650; }
.field :is(input, select, textarea) { font-weight: 400; }
.field > :is(label, span):first-child { color: #31554b; font-size: .9rem; font-weight: 680; }
.field small { color: var(--muted); font-size: .8rem; }
.checkbox-field { display: flex; align-items: center; gap: 7px; margin-top: 13px; color: #31554b; cursor: pointer; }
.checkbox-field input { width: 17px; height: 17px; accent-color: var(--accent); }
.script-editor { line-height: 1.65; }
.form-grid .full, .field-grid .full, .metric-grid .full { grid-column: 1 / -1; }
.error-note {
  margin-block: 8px;
  padding: 8px 10px;
  border: 1px solid #efd0d8;
  border-radius: 8px;
  background: #fcf0f3;
  color: #97384e;
  font-size: .87rem;
}
.error-note:empty { display: none; }
.toast {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 22px;
  display: flex;
  max-width: min(420px, calc(100vw - 32px));
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #70ac96;
  border-radius: 11px;
  background: #214b40;
  color: #edfaf6;
  box-shadow: 0 8px 29px #153b303b;
  overflow-wrap: anywhere;
}
.toast:empty { display: none; }
.toast svg { width: 18px; height: 18px; flex: 0 0 18px; color: #aee5cd; }

@media (max-width: 1200px) {
  .topbar { padding-inline: 25px; }
  .page { padding-inline: 25px; }
}

@media (max-width: 1090px) {
  :root { --rail-width: 212px; }
  .lower-grid { grid-template-columns: minmax(0, 1fr); }
  .next-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 870px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero { padding-inline: 24px; }
  .hero-copy { max-width: 65%; }
  .hero-art { width: 37%; }
}

@media (max-width: 760px) {
  :root { --rail-width: min(280px, calc(100vw - 45px)); }
  .sidebar {
    visibility: hidden;
    box-shadow: 13px 0 35px #0d302840;
    transform: translateX(-105%);
    transition: visibility .2s, transform .2s;
  }
  .sidebar:is(.open, .is-open, [data-open="true"]),
  .app-shell:is(.nav-open, .sidebar-open) .sidebar,
  body:is(.nav-open, .sidebar-open) .sidebar {
    visibility: visible;
    transform: translateX(0);
  }
  .app-shell:is(.nav-open, .sidebar-open)::before,
  body:is(.nav-open, .sidebar-open) .app-shell::before {
    position: fixed;
    z-index: 15;
    inset: 0;
    background: #122c2860;
    content: "";
  }
  .workspace { margin-left: 0; }
  .topbar { min-height: 60px; gap: 10px; padding-inline: 16px; }
  .topbar-actions { gap: 7px; }
  .mobile-toggle { display: inline-grid; flex: 0 0 auto; }
  .breadcrumb { flex: 1; gap: 6px; overflow: hidden; }
  .page { padding: 17px 16px 30px; }
  .hero { min-height: 175px; padding-block: 20px; border-radius: 17px; }
}

@media (max-width: 490px) {
  .hero { min-height: 0; padding: 19px 15px; }
  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: clamp(1.52rem, 8vw, 2rem); text-wrap: wrap; }
  .hero p { max-width: 95%; }
  .hero .action-row { margin-top: 15px; }
  .hero-art { width: 58%; opacity: .16; }
  .kpi-grid { margin-block: 12px; }
  .kpi-card { min-height: 100px; padding: 11px; }
  .kpi-icon { width: 29px; height: 29px; border-radius: 8px; }
  .kpi-icon svg { width: 16px; height: 16px; }
  .kpi-note { grid-column: 1 / -1 !important; }
  .flow-bar { margin-bottom: 12px; }
  .next-list, .work-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .panel-heading { padding-inline: 13px; }
  .page-header, .page-heading { flex-wrap: wrap; align-items: flex-start; }
  .detail-actions { justify-content: flex-start; }
  .toolbar, .search-box { width: 100%; }
  .dialog-backdrop { padding: 10px; }
  .dialog { max-width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .dialog-head, .dialog-body, .dialog-actions { padding-inline: 14px; }
  .toast { right: 12px; bottom: 12px; }
}

@media (max-width: 365px) {
  .demo-tag { display: none; }
  .page { padding-inline: 12px; }
}

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