:root {
  color-scheme: light;
  --ink: #14211d;
  --ink-2: #263832;
  --paper: #f2efe6;
  --surface: #fbfaf5;
  --surface-2: #e9e5da;
  --line: #d3cec0;
  --line-strong: #a9a497;
  --muted: #6c746f;
  --acid: #d8ff62;
  --acid-deep: #99c824;
  --copper: #c36f3e;
  --danger: #b84734;
  --sidebar-width: 208px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow: 0 18px 50px rgb(20 33 29 / 10%);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgb(153 200 36 / 46%); outline-offset: 3px; }
svg { display: block; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  translate: 0 -160%;
  border-radius: 8px;
  background: var(--acid);
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 800;
}
.skip-link:focus { translate: 0; }

.platform-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
}

.app-sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  min-width: 0;
  flex-direction: column;
  overflow-y: auto;
  background: var(--ink);
  color: #f8f6ee;
  padding: 16px 12px 14px;
  scrollbar-width: thin;
  scrollbar-color: rgb(255 255 255 / 18%) transparent;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 4px 16px;
}

.sidebar-brand > span { display: grid; min-width: 0; gap: 1px; }
.sidebar-brand strong { font-family: Bahnschrift, "Arial Narrow", sans-serif; font-size: 17px; letter-spacing: .12em; }
.sidebar-brand small { overflow: hidden; color: #aeb8b3; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand .platform-version { margin-top: 3px; color: #7f8c86; font-variant-numeric: tabular-nums; }

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  cursor: pointer;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--acid);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 30%);
}
.brand-mark svg { width: 27px; height: 27px; fill: currentColor; stroke: none; }

.rail-nav { display: grid; width: 100%; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.rail-item {
  position: relative;
  display: grid;
  min-height: 44px;
  cursor: pointer;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #98a49e;
  padding: 8px 10px;
  font-size: 11px;
  text-align: left;
  transition: background .18s ease, color .18s ease, translate .18s ease;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(440px, 1.22fr);
  min-height: 100dvh;
  background: var(--surface);
}

.platform-shell[hidden], .auth-screen[hidden] { display: none !important; }

.auth-brand {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: space-between;
  background: var(--ink);
  color: #f8f6ee;
  padding: clamp(34px, 6vw, 86px);
}

.auth-brand > div:nth-child(2) {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.auth-brand > div:nth-child(2) strong {
  font-size: clamp(34px, 5vw, 72px);
  letter-spacing: 0.08em;
}

.auth-brand > div:nth-child(2) span { color: #b9c1bd; font-size: 15px; }

.auth-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 14px;
  background: var(--acid);
  color: var(--ink);
  font-size: 36px;
  font-weight: 950;
}

.auth-brand > p {
  max-width: 34ch;
  margin: 64px 0 0;
  color: #cbd1ce;
  font-size: 14px;
  line-height: 1.9;
}

.auth-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(28px, 7vw, 110px);
}

.auth-panel-inner { width: min(460px, 100%); }

.auth-panel header { margin-bottom: 32px; }
.auth-panel header > span { color: var(--copper); font-size: 12px; font-weight: 900; }
.auth-panel h1 { margin: 9px 0 12px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -0.04em; text-wrap: balance; }
.auth-panel header p, .auth-panel-inner > footer { max-width: 46ch; color: var(--muted); font-size: 13px; line-height: 1.75; }
.auth-panel-inner > footer { margin-top: 28px; }

.auth-form { display: grid; gap: 18px; }
.auth-form label, .profile-password-form label { display: grid; gap: 8px; }
.auth-form label span, .profile-password-form label span { font-size: 12px; font-weight: 800; }
.auth-form input, .profile-password-form input, .customer-create-form input, .customer-row input, .customer-row select, .customer-password-reset input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  padding: 11px 13px;
}
.auth-form input:focus, .profile-password-form input:focus, .customer-create-form input:focus, .customer-row input:focus, .customer-row select:focus, .customer-password-reset input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(216 255 98 / 46%); }
.auth-submit { min-height: 52px; cursor: pointer; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 900; }
.auth-submit:hover { background: var(--ink-2); }
.auth-submit:disabled { cursor: wait; opacity: 0.65; }
.auth-recovery { margin: -4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.auth-recovery strong { color: var(--ink); }
.auth-error { margin: -12px 0 18px; border: 1px solid #d8a99f; border-radius: 10px; background: #fbe8e4; color: #7e3026; padding: 11px 13px; font-size: 12px; line-height: 1.6; }

.profile-password-form { display: grid; gap: 14px; }
.profile-password-form > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.text-danger-action { min-height: 40px; cursor: pointer; border: 0; background: transparent; color: var(--danger); font-weight: 800; }
.rail-item[hidden] { display: none !important; }
.rail-item:hover { background: rgb(255 255 255 / 7%); color: white; }
.rail-item.is-active { background: rgb(216 255 98 / 12%); color: var(--acid); }
.rail-item.is-active::before { position: absolute; left: -12px; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: var(--acid); content: ""; }
.rail-item svg { width: 20px; height: 20px; }
.network-pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgb(216 255 98 / 8%); }
.network-pulse[data-online="false"] { background: var(--danger); box-shadow: 0 0 0 5px rgb(184 71 52 / 12%); }
.mobile-avatar { display: grid; cursor: pointer; place-items: center; border: 1px solid rgb(255 255 255 / 18%); border-radius: 50%; background: #31433d; color: white; font-weight: 800; }
.scope-card { display: grid; gap: 6px; padding: 14px 4px; border-bottom: 1px solid rgb(255 255 255 / 10%); }
.sidebar-section-label { color: #7f8c86; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.scope-switch {
  display: flex;
  min-height: 52px;
  min-width: 0;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 9px;
  background: rgb(255 255 255 / 5%);
  color: #f8f6ee;
  padding: 8px 9px;
  text-align: left;
}
.scope-switch:hover { border-color: rgb(216 255 98 / 36%); background: rgb(216 255 98 / 7%); }
.scope-switch:disabled { cursor: default; opacity: .72; }
.scope-switch > span { display: grid; min-width: 0; gap: 3px; }
.scope-switch strong, .scope-switch small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-switch strong { font-size: 12px; }
.scope-switch small { color: #9aa6a0; font-size: 9px; }
.scope-switch svg, .mobile-scope svg { width: 18px; height: 18px; }
.sidebar-context { display: grid; gap: 7px; padding: 14px 4px; }
.context-nav { display: grid; gap: 4px; }
.context-link {
  display: grid;
  grid-template-columns: 21px minmax(0, 1fr) auto;
  min-height: 44px;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a49e;
  padding: 8px 9px;
  text-align: left;
}
.context-link i { color: #77837d; font-family: Bahnschrift, sans-serif; font-size: 9px; font-style: normal; }
.context-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 700; }
.context-link em { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.context-link:hover { background: rgb(255 255 255 / 7%); color: white; }
.context-link.is-active { background: rgb(216 255 98 / 12%); color: white; }
.context-link.is-active i { color: var(--acid); }
.context-link.is-active em { background: var(--acid); }
.sidebar-footer { display: flex; min-height: 44px; align-items: center; gap: 11px; margin-top: auto; border-top: 1px solid rgb(255 255 255 / 10%); color: #7f8c86; padding: 14px 8px 0; font-size: 8px; }

.workspace { grid-column: 2; min-width: 0; padding: 34px clamp(24px, 4vw, 64px) 110px; }
.workspace-head { display: flex; max-width: 1420px; align-items: flex-end; justify-content: space-between; gap: 28px; margin-inline: auto; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.workspace-head > div:first-child { min-width: 0; }
.section-code { display: block; margin-bottom: 8px; color: var(--copper); font-family: Bahnschrift, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.workspace-head h1 { margin: 0; font-family: "Microsoft YaHei UI", sans-serif; font-size: clamp(28px, 3.4vw, 46px); font-weight: 800; letter-spacing: -.055em; line-height: 1.05; }
.workspace-head p { max-width: 650px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.head-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.head-actions time { font-family: Bahnschrift, sans-serif; font-size: 18px; font-weight: 700; letter-spacing: .06em; }
.quiet-action { display: flex; height: 38px; cursor: pointer; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 0 12px; font-size: 11px; font-weight: 700; }
.quiet-action:hover { border-color: var(--ink); }
.quiet-action svg { width: 16px; height: 16px; }
.notification-trigger { position: relative; }
.notification-trigger > svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--danger);
  color: white;
  padding: 0 4px;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}
.notification-badge[hidden] { display: none; }
.notification-panel {
  position: fixed;
  z-index: 80;
  inset: 80px 26px auto auto;
  display: none;
  width: min(390px, calc(100vw - 32px));
  max-height: min(72dvh, 650px);
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
}
.notification-panel:popover-open { display: flex; }
.notification-panel::backdrop { background: transparent; }
.notification-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 18px 18px 14px; }
.notification-panel > header span { color: var(--copper); font-family: Bahnschrift, sans-serif; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.notification-panel h2 { margin: 3px 0 0; font-size: 21px; letter-spacing: -.03em; }
.notification-panel > header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.notification-close { display: grid; width: 36px; height: 36px; flex: 0 0 auto; cursor: pointer; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 20px; }
.notification-close:hover { border-color: var(--ink); }
.notification-list { min-height: 150px; overflow-y: auto; overscroll-behavior: contain; }
.notification-item { display: grid; gap: 12px; border-bottom: 1px solid var(--line); padding: 16px 18px; }
.notification-item.is-unread { background: #f1f5e4; box-shadow: inset 3px 0 0 var(--acid-deep); }
.notification-item-copy { display: grid; gap: 5px; }
.notification-item-copy > span { color: var(--muted); font-size: 10px; }
.notification-item-copy strong { font-size: 14px; line-height: 1.35; }
.notification-item-copy p { margin: 0; color: #58635e; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.notification-item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.notification-item-actions button, .notification-state button { min-height: 34px; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--ink); padding: 0 10px; font-size: 11px; font-weight: 700; }
.notification-item-actions button:first-child { border-color: var(--ink); background: var(--ink); color: white; }
.notification-item-actions button:hover, .notification-state button:hover { border-color: var(--ink); }
.notification-item-actions button:disabled { cursor: wait; opacity: .55; }
.notification-state { display: grid; min-height: 180px; place-content: center; justify-items: center; gap: 8px; color: var(--muted); padding: 24px; text-align: center; }
.notification-state strong { color: var(--ink); font-size: 14px; }
.notification-state span { max-width: 30ch; font-size: 12px; line-height: 1.55; }
.notification-state.is-error strong { color: var(--danger); }
.notification-panel > footer { border-top: 1px solid var(--line); color: var(--muted); padding: 10px 18px; font-size: 10px; line-height: 1.5; }
.view-region { width: 100%; max-width: 1420px; margin: 28px auto 0; }

@media (min-width: 761px) {
  .workspace[data-layout="canvas"] {
    display: grid;
    height: 100dvh;
    min-height: 720px;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: auto;
    padding: 24px clamp(16px, 2vw, 28px);
  }

  .workspace[data-layout="canvas"] .workspace-head {
    width: 100%;
    max-width: none;
    align-items: center;
    padding-bottom: 16px;
  }

  .view-region[data-layout="canvas"] {
    height: 100%;
    min-height: 0;
    max-width: none;
    margin-top: 16px;
  }

  .workspace[data-layout="plugin"] {
    display: grid;
    height: 100dvh;
    min-height: 720px;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    padding: 0;
  }

  .workspace[data-layout="plugin"] .workspace-head { display: none; }

  .view-region[data-layout="plugin"] {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: none;
    margin: 0;
  }
}

.loading-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 14px; }
.loading-grid div { min-height: 190px; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(110deg, var(--surface) 10%, #e8e4d8 20%, var(--surface) 30%) 0 0 / 240% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position-x: -240%; } }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .75fr); gap: 18px; }
.work-surface, .insight-surface, .status-card, .empty-surface, .profile-card, .ai-stage, .plugin-catalog { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: rgb(251 250 245 / 92%); box-shadow: 0 12px 35px rgb(20 33 29 / 4%); }
.work-surface { min-height: 420px; padding: clamp(20px, 3vw, 34px); }
.surface-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.surface-head h2, .insight-surface h2, .ai-stage h2, .plugin-catalog h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.surface-head small { color: var(--muted); font-size: 10px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; background: #e9efd4; color: #4c641c; padding: 6px 10px; font-size: 10px; font-weight: 800; }
.status-pill::before { width: 6px; height: 6px; border-radius: 50%; background: var(--acid-deep); content: ""; }
.today-axis { position: relative; display: grid; min-height: 285px; place-items: center; border-top: 1px solid var(--line); }
.today-axis::before { position: absolute; inset: 30px 0 auto; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 12px); content: ""; }
.zero-work { display: grid; max-width: 390px; justify-items: center; gap: 9px; text-align: center; }
.zero-mark { display: grid; width: 62px; height: 62px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); }
.zero-mark svg { width: 26px; height: 26px; }
.zero-work strong { margin-top: 6px; font-size: 15px; }
.zero-work p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.primary-action { min-height: 38px; cursor: pointer; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: white; padding: 0 14px; font-size: 11px; font-weight: 800; }
.primary-action:hover { background: var(--ink-2); translate: 0 -1px; }
.side-stack { display: grid; align-content: start; gap: 18px; }
.insight-surface { position: relative; overflow: hidden; padding: 24px; background: var(--ink); color: white; }
.insight-surface::after { position: absolute; right: -50px; bottom: -80px; width: 180px; height: 180px; border: 1px solid rgb(216 255 98 / 25%); border-radius: 50%; box-shadow: 0 0 0 28px rgb(216 255 98 / 4%), 0 0 0 56px rgb(216 255 98 / 3%); content: ""; }
.insight-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #aeb9b4; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.insight-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 5px rgb(216 255 98 / 10%); }
.insight-surface h2 { margin-top: 22px; }
.insight-surface p { max-width: 300px; margin: 9px 0 20px; color: #aeb9b4; font-size: 11px; line-height: 1.7; }
.engine-path { display: flex; align-items: center; gap: 7px; color: var(--acid); font-family: Bahnschrift, sans-serif; font-size: 10px; font-weight: 800; }
.engine-path span { color: #77857e; }
.status-card { display: grid; gap: 16px; padding: 21px 22px; }
.status-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.status-row > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: var(--surface-2); }
.status-row svg { width: 18px; height: 18px; }
.status-row div { display: grid; gap: 2px; }
.status-row strong { font-size: 11px; }
.status-row small { color: var(--muted); font-size: 9px; }
.status-row em { color: #587420; font-size: 9px; font-style: normal; font-weight: 800; }

.empty-surface { display: grid; min-height: 430px; place-items: center; padding: 34px; text-align: center; }
.empty-surface > div { display: grid; max-width: 440px; justify-items: center; gap: 12px; }
.empty-code { color: var(--copper); font-family: Bahnschrift, sans-serif; font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.empty-surface h2 { margin: 0; font-size: 22px; }
.empty-surface p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.work-list-surface { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: clamp(22px, 4vw, 38px); }
.work-list-surface h2 { margin: 0; font-size: 17px; }
.work-item-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.work-item-card { display: grid; min-width: 0; gap: 8px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); padding: 19px; }
.work-item-card > span { color: var(--copper); font: 800 9px Bahnschrift; letter-spacing: .1em; text-transform: uppercase; }
.work-item-card h3 { margin: 0; font-size: 14px; }
.work-item-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.work-item-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.work-item-card small { color: var(--muted); font-size: 9px; }
.work-item-card em { border-radius: 999px; background: #e9efd4; color: #587420; padding: 4px 7px; font-size: 9px; font-style: normal; font-weight: 800; }
.empty-diagram { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.empty-diagram i { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.empty-diagram span { width: 30px; border-top: 1px dashed var(--line-strong); }

.work-center-shell { position: relative; min-width: 0; }
.work-notice, .work-error { margin-bottom: 12px; border-radius: 10px; padding: 11px 14px; font-size: 11px; font-weight: 700; }
.work-notice { border: 1px solid #bad36f; background: #f2f7df; color: #425b0d; }
.work-error { border: 1px solid #d9a38d; background: #fff0ea; color: #8c3219; }
.work-overview { display: grid; grid-template-columns: 1.25fr repeat(3, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px 16px 0 0; background: var(--line); gap: 1px; }
.work-metric { position: relative; display: grid; min-height: 112px; align-content: center; gap: 5px; overflow: hidden; background: var(--surface); padding: 20px 23px; }
.work-metric.primary { background: var(--ink); color: white; }
.work-metric.primary::after { position: absolute; right: -32px; bottom: -52px; width: 130px; height: 130px; border: 1px solid rgb(216 255 98 / 24%); border-radius: 50%; box-shadow: 0 0 0 22px rgb(216 255 98 / 5%); content: ""; }
.work-metric.alert::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: #c84c2c; content: ""; }
.work-metric small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.work-metric.primary small { color: #aeb9b4; }
.work-metric strong { font-family: Bahnschrift, sans-serif; font-size: 28px; line-height: 1; }
.work-metric.primary strong { color: var(--acid); }
.work-metric span { color: var(--muted); font-size: 9px; }
.work-metric.primary span { color: #aeb9b4; }
.work-board { display: grid; min-height: 620px; grid-template-columns: minmax(440px, 1.12fr) minmax(360px, .88fr); overflow: hidden; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; background: var(--surface); box-shadow: var(--shadow); }
.work-list-pane { min-width: 0; border-right: 1px solid var(--line); }
.work-tabs { display: flex; min-width: 0; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.work-tabs::-webkit-scrollbar { display: none; }
.work-tab { display: flex; min-width: max-content; min-height: 52px; cursor: pointer; align-items: center; gap: 7px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 0 13px; font-size: 10px; font-weight: 700; }
.work-tab em { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 999px; background: var(--surface-2); font-size: 8px; font-style: normal; }
.work-tab:hover { color: var(--ink); }
.work-tab.is-active { border-bottom-color: var(--acid-deep); color: var(--ink); }
.work-tab.is-active em { background: var(--ink); color: var(--acid); }
.work-toolbar { display: grid; grid-template-columns: minmax(190px, 1fr) auto auto; gap: 8px; border-bottom: 1px solid var(--line); background: var(--paper); padding: 11px 13px; }
.work-search { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 0 10px; }
.work-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 2px rgb(216 255 98 / 35%); }
.work-search svg { width: 15px; color: var(--muted); }
.work-search input { min-width: 0; height: 36px; border: 0; outline: 0; background: transparent; font-size: 10px; }
.work-toolbar select { height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 0 9px; font-size: 10px; }
.work-create-button { height: 38px; cursor: pointer; border: 1px solid var(--ink); border-radius: 9px; background: var(--ink); color: white; padding: 0 13px; font-size: 10px; font-weight: 800; }
.work-create-button:hover { background: var(--ink-2); translate: 0 -1px; }
.work-list { max-height: 520px; overflow-y: auto; }
.work-list-loading, .detail-loading { display: grid; min-height: 250px; place-items: center; color: var(--muted); font-size: 11px; }
.work-list-empty { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.work-list-empty > span { color: var(--line-strong); font: 800 52px Bahnschrift; }
.work-list-empty strong { color: var(--ink); font-size: 14px; }
.work-list-empty p { margin: 0; font-size: 10px; }
.work-row { display: grid; width: 100%; min-width: 0; cursor: pointer; grid-template-columns: 39px minmax(0, 1fr) auto 18px; align-items: center; gap: 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 15px 13px; text-align: left; }
.work-row:hover { background: #f5f3ea; }
.work-row.is-active { background: #f0f4dd; box-shadow: inset 4px 0 var(--acid-deep); }
.work-row.is-overdue:not(.is-active) { box-shadow: inset 3px 0 #c84c2c; }
.work-priority { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 9px; font-weight: 900; }
.priority-urgent { background: #fee4d9; color: #9c3016; }
.priority-high { background: #f7ead3; color: #8b5a17; }
.priority-normal { background: #e9efd4; color: #587420; }
.work-row-main { display: grid; min-width: 0; gap: 4px; }
.work-row-main strong, .work-row-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-row-main strong { font-size: 12px; }
.work-row-main small { color: var(--muted); font-size: 9px; }
.work-row-main i { color: var(--copper); font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: .05em; }
.work-row-meta { display: grid; min-width: 82px; justify-items: end; gap: 7px; }
.work-row-meta > small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.work-status { display: inline-flex; width: fit-content; border-radius: 999px; background: var(--surface-2); color: var(--muted); padding: 5px 8px; font-size: 8px; font-style: normal; font-weight: 900; white-space: nowrap; }
.status-offered { background: #edf2d6; color: #536b1d; }
.status-accepted { background: #e5edf4; color: #345a73; }
.status-in_progress { background: #14211d; color: #d8ff62; }
.status-completed { background: #e2efe5; color: #27613a; }
.status-cancelled { background: #eeeae2; color: #77736c; }
.overdue-text { color: #b53b1e !important; font-weight: 800; }
.work-chevron { color: var(--line-strong); font-size: 24px; font-weight: 300; }
.work-detail { position: relative; display: grid; min-width: 0; height: 620px; grid-template-rows: auto minmax(0, 1fr) auto; background: #fbfaf5; }
.work-detail-zero { place-items: center; }
.work-detail-zero > div { display: grid; max-width: 260px; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }
.work-detail-zero span { color: var(--copper); font: 800 9px Bahnschrift; letter-spacing: .13em; }
.work-detail-zero strong { color: var(--ink); font-size: 18px; }
.work-detail-zero p { margin: 0; font-size: 10px; line-height: 1.7; }
.work-detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; border-bottom: 1px solid var(--line); padding: 22px 24px 18px; }
.work-detail-head > span { color: var(--copper); font: 800 9px Bahnschrift; letter-spacing: .1em; }
.work-detail-head h2, .work-detail-head p { grid-column: 1 / -1; }
.work-detail-head h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.035em; }
.work-detail-head p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.detail-close { display: none; }
.work-detail-scroll { min-height: 0; overflow-y: auto; padding: 0 24px 24px; }
.work-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-bottom: 1px solid var(--line); }
.work-facts div { display: grid; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 10px; }
.work-facts div:nth-child(even) { border-right: 0; }
.work-facts dt { color: var(--muted); font-size: 8px; }
.work-facts dd { margin: 0; font-size: 10px; font-weight: 800; }
.detail-section { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 9px; border-bottom: 1px solid var(--line); padding: 19px 0; }
.detail-index { color: var(--copper); font: 800 9px Bahnschrift; }
.detail-section h3 { margin: 0 0 11px; font-size: 12px; }
.detail-muted { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.instruction-list { display: grid; gap: 8px; margin: 0; padding: 0; counter-reset: step; list-style: none; }
.instruction-list li { position: relative; min-height: 26px; counter-increment: step; padding-left: 30px; color: var(--ink); font-size: 10px; line-height: 1.6; }
.instruction-list li::before { position: absolute; top: 0; left: 0; display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font: 700 8px Bahnschrift; content: counter(step, decimal-leading-zero); }
.work-timeline { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.work-timeline::before { position: absolute; top: 5px; bottom: 5px; left: 5px; border-left: 1px solid var(--line); content: ""; }
.timeline-entry { position: relative; display: grid; grid-template-columns: 11px minmax(0, 1fr); gap: 11px; padding: 0 0 16px; }
.timeline-entry > i { z-index: 1; width: 11px; height: 11px; border: 3px solid var(--surface); border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 1px var(--line); }
.timeline-entry.note > i { background: var(--acid-deep); }
.timeline-entry > div { display: grid; gap: 3px; }
.timeline-entry > div > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timeline-entry strong { font-size: 10px; }
.timeline-entry time, .timeline-entry small { color: var(--muted); font-size: 8px; }
.timeline-entry p { margin: 4px 0 0; border-left: 2px solid var(--acid-deep); background: var(--paper); padding: 7px 9px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.result-block, .closure-block { margin-top: 17px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 13px; }
.result-block strong, .closure-block strong { font-size: 10px; }
.result-block p { margin: 9px 0 0; color: #425b0d; font-size: 10px; line-height: 1.7; }
.result-block dl { display: grid; gap: 7px; margin: 9px 0 0; }
.result-block dl div { display: grid; grid-template-columns: minmax(72px, .35fr) 1fr; gap: 10px; border-top: 1px solid var(--line); padding-top: 7px; }
.result-block dt { color: var(--muted); font-size: 8px; }
.result-block dd { margin: 0; color: #425b0d; font-size: 9px; line-height: 1.6; }
.result-attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.result-attachments a { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #bacb93; border-radius: 7px; background: white; color: #425b0d; padding: 6px 8px; text-decoration: none; }
.result-attachments a:hover { border-color: var(--ink); }
.result-attachments a small { color: var(--muted); }
.closure-block { border-color: #e2c5b9; background: #fff5f0; }
.closure-block p { margin: 7px 0 0; color: #7d4939; font-size: 9px; line-height: 1.6; }
.work-detail-actions { display: flex; min-height: 66px; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: var(--paper); padding: 12px 18px; }
.secondary-action { min-height: 38px; cursor: pointer; border: 1px solid var(--line-strong); border-radius: 9px; background: transparent; color: var(--ink); padding: 0 13px; font-size: 10px; font-weight: 800; }
.secondary-action:hover { border-color: var(--ink); background: white; }
.secondary-action.danger { color: #a3371d; }
.work-closed-note { margin-right: auto; color: var(--muted); font-size: 9px; }
.work-dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100dvh - 32px); overflow: hidden; border: 0; border-radius: 17px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: 0 25px 80px rgb(20 33 29 / 30%); }
.work-dialog.compact { width: min(500px, calc(100% - 28px)); }
.work-dialog::backdrop { background: rgb(20 33 29 / 58%); backdrop-filter: blur(6px); }
.work-dialog form { display: grid; max-height: calc(100dvh - 32px); grid-template-rows: auto minmax(0, 1fr) auto; margin: 0; }
.work-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 22px 24px 18px; }
.work-dialog header h2 { margin: 5px 0 0; font-size: 20px; }
.work-dialog header p { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.work-dialog header > button { width: 34px; height: 34px; cursor: pointer; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; }
.work-dialog-body { display: grid; min-height: 0; overflow-y: auto; gap: 13px; padding: 18px 24px; }
.work-dialog-body label { display: grid; gap: 6px; }
.work-dialog-body label > span { font-size: 10px; font-weight: 800; }
.work-dialog-body label small { color: var(--muted); font-weight: 400; }
.work-dialog-body input, .work-dialog-body textarea, .work-dialog-body select { width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: white; color: var(--ink); padding: 10px 11px; font: 11px/1.5 "Microsoft YaHei UI", sans-serif; }
.work-dialog-body input:focus, .work-dialog-body textarea:focus, .work-dialog-body select:focus { border-color: var(--ink); box-shadow: 0 0 0 2px rgb(216 255 98 / 38%); }
.work-dialog-body textarea { resize: vertical; }
.work-result-submit-fields { display: grid; gap: 11px; }
.work-result-submit-fields:empty { display: none; }
.work-result-submit-field { display: grid; gap: 6px; }
.work-result-submit-field > span { font-size: 10px; font-weight: 800; }
.work-result-submit-field > span em { color: #a3371d; font-size: 8px; font-style: normal; }
.work-result-submit-field > small { color: var(--muted); font-size: 8px; }
.work-result-submit-field input[type="file"] { padding: 8px; font-size: 9px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-scope { display: flex; align-items: center; justify-content: space-between; border-radius: 9px; background: var(--ink); color: white; padding: 11px 13px; }
.dialog-scope span { color: #aeb9b4; font-size: 9px; }
.dialog-scope strong { color: var(--acid); font-size: 10px; }
.work-assignment-section { display: grid; gap: 9px; }
.work-assignment-section > h3 { margin: 0; font-size: 10px; }
.work-assignment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.assignment-loading, .single-assignment-note { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); padding: 12px 13px; color: var(--muted); font-size: 9px; }
.single-assignment-note { display: grid; gap: 3px; border-color: #bacb93; background: #f5fadd; }
.single-assignment-note strong { color: var(--ink); font-size: 11px; }
.single-assignment-note.is-error { border-color: #e2c5b9; background: #fff5f0; }
.assignment-choice { display: flex !important; min-height: 66px; cursor: pointer; grid-template-columns: auto 1fr; align-items: flex-start; gap: 10px !important; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 11px 12px; }
.assignment-choice:hover { border-color: var(--line-strong); }
.assignment-choice.is-selected { border-color: var(--ink); background: #f5fadd; box-shadow: inset 0 0 0 1px var(--ink); }
.assignment-choice input { width: 15px; margin: 2px 0 0; accent-color: var(--ink); }
.assignment-choice > span { display: grid; gap: 4px; }
.assignment-choice strong { font-size: 10px; }
.assignment-choice small { color: var(--muted); font-size: 8px; line-height: 1.55; }
.work-target-stores { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.work-target-stores[hidden] { display: none; }
.target-store-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 12px; }
.target-store-head > span { display: grid; gap: 2px; }
.target-store-head strong { font-size: 9px; }
.target-store-head small { color: var(--muted); font-size: 8px; }
.target-store-head label { display: flex; cursor: pointer; align-items: center; gap: 5px; font-size: 9px; font-weight: 700; }
.target-store-head input, .target-region input, .target-store-grid input { width: 14px; margin: 0; accent-color: var(--ink); }
.target-region-list { display: grid; gap: 1px; background: var(--line); }
.target-region { background: white; }
.target-region > header { display: flex; min-height: 49px; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; }
.target-region > header > label { display: flex; min-width: 0; cursor: pointer; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; }
.target-region > header > label > span { display: flex; min-width: 0; align-items: baseline; gap: 7px; }
.target-region > header strong { font-size: 10px; }
.target-region > header small { color: var(--muted); font-size: 8px; }
.target-region > header button { display: flex; height: 30px; cursor: pointer; align-items: center; gap: 4px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); padding: 0 7px; font-size: 8px; }
.target-region > header button:hover { background: var(--surface-2); color: var(--ink); }
.target-region > header button i { font-size: 13px; font-style: normal; transition: rotate 180ms ease-out; }
.target-region > header button[aria-expanded="true"] i { rotate: 180deg; }
.target-store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.target-store-grid[hidden] { display: none; }
.target-store-grid label { display: flex; min-width: 0; cursor: pointer; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; background: white; padding: 10px 12px; }
.target-store-grid label:hover { background: #f8f9ee; }
.target-store-grid span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.work-result-requirements { display: grid; gap: 7px; border-top: 1px solid var(--line); padding-top: 13px; }
.work-result-requirements h3 { margin: 0; font-size: 10px; }
.work-result-requirements > p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.work-result-requirements > div { display: flex; flex-wrap: wrap; gap: 7px; }
.work-result-requirements label { display: flex; min-width: 145px; cursor: pointer; flex: 1 1 145px; grid-template-columns: auto minmax(0, 1fr); align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 9px 10px; }
.work-result-requirements label:has(input:checked) { border-color: var(--ink); background: #f5fadd; }
.work-result-requirements input { width: 14px; margin: 2px 0 0; accent-color: var(--ink); }
.work-result-requirements label > span { display: grid; gap: 2px; }
.work-result-requirements strong { font-size: 9px; }
.work-result-requirements small { color: var(--muted); font-size: 8px; }
.form-error { min-height: 16px; margin: 0; color: #a3371d; font-size: 9px; }
.work-dialog footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 13px 24px; }
.zero-mark.has-work { border-color: var(--ink); background: var(--ink); color: var(--acid); font: 800 24px Bahnschrift; }

.ai-stage { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); min-height: 480px; overflow: hidden; }
.ai-intro { display: flex; flex-direction: column; justify-content: space-between; background: var(--ink); color: white; padding: 34px; }
.ai-glyph { display: grid; width: 74px; height: 74px; place-items: center; border-radius: 22px; background: var(--acid); color: var(--ink); rotate: -4deg; }
.ai-glyph svg { width: 34px; height: 34px; }
.ai-intro h2 { margin-top: 28px; font-size: 28px; letter-spacing: -.05em; }
.ai-intro p { color: #aeb9b4; font-size: 11px; line-height: 1.75; }
.ai-capabilities { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-capabilities span { border: 1px solid rgb(255 255 255 / 14%); border-radius: 999px; padding: 6px 9px; color: #c4cec9; font-size: 9px; }
.conversation-zero { display: grid; place-items: center; padding: 40px; }
.conversation-zero > div { display: grid; width: min(560px, 100%); gap: 18px; }
.conversation-zero h3 { margin: 0; font-size: 19px; }
.conversation-zero p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.prompt-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; border: 1px solid var(--line-strong); border-radius: 14px; background: white; padding: 8px; }
.prompt-box input { min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 10px; font-size: 12px; }
.prompt-box button { width: 42px; height: 42px; cursor: not-allowed; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.prompt-box svg { width: 18px; margin: auto; }

.plugin-catalog { padding: clamp(22px, 4vw, 38px); }
.catalog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.catalog-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.plugin-dropzone { display: grid; min-height: 300px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 13px; background: linear-gradient(135deg, rgb(233 229 218 / 55%), transparent); padding: 30px; text-align: center; }
.plugin-dropzone > div { display: grid; max-width: 430px; justify-items: center; gap: 10px; }
.plugin-plug { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 16px; background: var(--ink); color: var(--acid); }
.plugin-plug svg { width: 28px; height: 28px; }
.plugin-dropzone strong { margin-top: 7px; font-size: 15px; }
.plugin-dropzone p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.contract-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--line); }
.contract-strip div { display: grid; gap: 5px; background: var(--surface); padding: 15px; }
.contract-strip small { color: var(--muted); font-size: 9px; }
.contract-strip strong { font-size: 11px; }
.installed-plugin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.installed-plugin { position: relative; display: grid; min-width: 0; min-height: 145px; cursor: pointer; align-content: start; gap: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); padding: 20px; text-align: left; }
.installed-plugin:not(.plugin-package-card):hover:not(:disabled) { border-color: var(--ink); translate: 0 -2px; box-shadow: 0 12px 28px rgb(20 33 29 / 8%); }
.installed-plugin > span { color: var(--copper); font: 800 9px Bahnschrift; letter-spacing: .12em; }
.installed-plugin strong { font-size: 15px; }
.installed-plugin small { max-width: 90%; color: var(--muted); font-size: 10px; line-height: 1.55; }
.installed-plugin em { position: absolute; right: 14px; bottom: 14px; color: var(--line-strong); font: 700 9px Bahnschrift; font-style: normal; }
.installed-plugin:disabled { cursor: not-allowed; opacity: .55; }
.plugin-upload-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; border: 1px dashed var(--line-strong); border-radius: 13px; background: var(--surface-2); padding: 16px 18px; }
.plugin-upload-panel > div { display: grid; gap: 5px; }
.plugin-upload-panel strong { font-size: 12px; }
.plugin-upload-panel small { color: var(--muted); font-size: 9px; line-height: 1.6; }
.plugin-upload-panel label { flex: 0 0 auto; cursor: pointer; }
.plugin-package-card { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.plugin-package-open, .plugin-package-copy { position: relative; display: grid; min-width: 0; cursor: default; align-content: start; gap: 7px; border: 0; background: transparent; color: inherit; padding: 0; text-align: left; }
.plugin-package-open { cursor: pointer; }
.plugin-package-open:disabled { cursor: not-allowed; opacity: .55; }
.plugin-package-open > span, .plugin-package-copy > span { color: var(--copper); font: 800 9px Bahnschrift; letter-spacing: .12em; }
.plugin-package-open strong, .plugin-package-copy strong { font-size: 15px; }
.plugin-package-open small, .plugin-package-copy small { max-width: 90%; color: var(--muted); font-size: 10px; line-height: 1.55; }
.plugin-package-open em, .plugin-package-copy em { position: absolute; top: 0; right: 0; color: var(--line-strong); font: 700 9px Bahnschrift; font-style: normal; }
.plugin-package-card.has-open:hover { border-color: var(--ink); translate: 0 -2px; box-shadow: 0 12px 28px rgb(20 33 29 / 8%); }
.plugin-package-card .plugin-package-footer { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.plugin-package-card .plugin-package-footer b { color: var(--copper); font-size: 9px; }
.plugin-package-card .plugin-package-footer button { min-height: 34px; padding: 0 12px; }
.plugin-approval-note { margin: 12px 0 0; border-left: 3px solid var(--copper); color: var(--muted); padding-left: 10px; font-size: 11px; line-height: 1.6; }
.plugin-runtime-list { display: grid; gap: 9px; }
.plugin-runtime-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(150px, .45fr); align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 15px 17px; }
.plugin-runtime-list article > div { display: grid; gap: 4px; }
.plugin-runtime-list strong { font-size: 12px; }
.plugin-runtime-list small, .plugin-runtime-list em { color: var(--muted); font-size: 9px; font-style: normal; }
.plugin-runtime-list span { border-radius: 999px; background: var(--surface-2); padding: 6px 9px; color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.plugin-runtime-list span.is-running, .plugin-runtime-list span.is-enabled { background: #e9efd4; color: #4c641c; }
.plugin-runtime-list span.is-failed { background: #f7e2dc; color: #9f432f; }
.plugin-host { display: grid; min-width: 0; min-height: 620px; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.plugin-host > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); padding: 12px 14px; }
.plugin-host > header > div { display: grid; min-width: 0; gap: 3px; }
.plugin-host > header strong, .plugin-host > header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plugin-host > header strong { font-size: 12px; }
.plugin-host > header small { color: var(--muted); font-size: 9px; }
.plugin-host > header em { color: var(--muted); font-size: 9px; font-style: normal; }
.plugin-host iframe { width: 100%; height: 100%; min-height: 560px; border: 0; background: var(--paper); }
.plugin-frame-stage { position: relative; min-width: 0; min-height: 560px; overflow: hidden; background: var(--paper); }
.plugin-frame-stage iframe { position: absolute; inset: 0; visibility: hidden; }
.plugin-frame-stage.is-ready iframe { visibility: visible; }
.plugin-recovery { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--paper); padding: 24px; text-align: center; }
.plugin-recovery[hidden] { display: none !important; }
.plugin-recovery > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 16px; background: var(--ink); color: var(--lime); }
.plugin-recovery > span svg { width: 24px; animation: plugin-recovery-spin 1.1s linear infinite; }
.plugin-recovery strong { font-size: 16px; }
.plugin-recovery p { max-width: 34ch; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.plugin-recovery button { margin-top: 4px; }
@keyframes plugin-recovery-spin { to { transform: rotate(360deg); } }
.workspace[data-layout="plugin"] .plugin-host {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.workspace[data-layout="plugin"] .plugin-frame-stage { height: 100%; min-height: 0; }
.workspace[data-layout="plugin"] .plugin-host iframe { height: 100%; min-height: 0; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr); gap: 18px; }
.profile-card { padding: 28px; }
.profile-card h2 { margin: 0 0 22px; font-size: 17px; }
.profile-kicker { display: block; margin-bottom: 7px; color: var(--copper); font: 800 9px Bahnschrift; letter-spacing: .12em; }
.identity-mode-switch { display: grid; gap: 9px; margin: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.identity-mode-switch > span { font-size: 12px; font-weight: 900; }
.identity-mode-switch > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.identity-mode-switch > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.identity-mode-switch button { display: grid; gap: 5px; min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 14px; color: var(--ink); text-align: left; cursor: pointer; }
.identity-mode-switch button:hover:not(:disabled) { border-color: var(--ink); }
.identity-mode-switch button.is-active { border-color: var(--ink); background: var(--ink); color: var(--paper); cursor: default; }
.identity-mode-switch button strong { font-size: 13px; }
.identity-mode-switch button small { color: inherit; font-size: 10px; line-height: 1.5; opacity: .76; }
.pwa-install-card > p { margin: -10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.pwa-install-action { display: grid; gap: 10px; margin-top: 18px; }
.pwa-install-action button { justify-self: start; }
.pwa-install-action small { max-width: 58ch; color: var(--muted); font-size: 9px; line-height: 1.65; }
.development-identity { display: grid; gap: 10px; margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.development-identity label { display: grid; gap: 7px; }
.development-identity label > span { font-size: 10px; font-weight: 800; }
.development-identity select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 0 10px; font-size: 10px; }
.development-identity p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }

.dispatch-row .work-row-meta { min-width: 150px; }
.dispatch-row .work-row-meta small { white-space: normal; text-align: right; }
.dispatch-scope-note { margin: 18px 0 0; border: 1px solid #d9c687; background: #fffbed; padding: 12px 14px; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }
.dispatch-progress-section > div { width: 100%; }
.dispatch-progress-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 16px; }
.dispatch-progress-summary span { border: 1px solid var(--line); background: var(--surface); padding: 10px; color: var(--muted); font-size: 10px; }
.dispatch-progress-summary strong { display: block; margin-top: 4px; color: var(--ink); font-size: 18px; }
.dispatch-children { display: grid; gap: 8px; }
.dispatch-child { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: white; padding: 13px 14px; text-align: left; cursor: pointer; }
.dispatch-child:hover, .dispatch-child:focus-visible { border-color: var(--ink); outline: none; }
.dispatch-child span { display: grid; gap: 4px; }
.dispatch-child small, .dispatch-child i { color: var(--muted); font-size: 10px; font-style: normal; }
.dispatch-back { display: block; margin: 0 0 14px; border: 0; background: transparent; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.identity-row { display: flex; align-items: center; gap: 14px; }
.identity-avatar { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--acid); font-size: 18px; font-weight: 900; }
.identity-row div { display: grid; gap: 4px; }
.identity-row strong { font-size: 14px; }
.identity-row small { color: var(--muted); font-size: 10px; }
.setting-list { display: grid; gap: 1px; margin-top: 24px; border-block: 1px solid var(--line); }
.setting-row { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border: 0; }
.setting-row span { font-size: 11px; font-weight: 700; }
.setting-row em { color: var(--muted); font-size: 10px; font-style: normal; }

.mobile-header, .mobile-bottom-nav { display: none; }

.scope-dialog { width: min(680px, calc(100% - 28px)); max-height: min(86dvh, 820px); border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: var(--shadow); }
.scope-dialog::backdrop { background: rgb(20 33 29 / 52%); backdrop-filter: blur(5px); }
.scope-dialog form { display: flex; max-height: min(86dvh, 820px); flex-direction: column; margin: 0; }
.scope-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 22px 24px 18px; }
.scope-dialog header > div { max-width: 560px; }
.scope-kicker { color: #6f491f; font-size: 10px; font-weight: 800; }
.scope-dialog h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.02em; }
.scope-dialog header p { max-width: 60ch; margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.scope-dialog header button { width: 34px; height: 34px; cursor: pointer; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; }
.scope-account-context { display: grid; gap: 4px; border-bottom: 1px solid var(--line); background: #edf1e3; padding: 11px 24px; }
.scope-account-context strong { color: #42540f; font-size: 9px; }
.scope-account-context span { color: #58635e; font-size: 9px; line-height: 1.55; }
.scope-options { overflow-y: auto; padding: 0 22px; }
.scope-tenant-group { padding: 17px 0 19px; border-bottom: 1px solid var(--line); }
.scope-tenant-group:last-child { border-bottom: 0; }
.scope-tenant-group > header { display: block; border: 0; padding: 0 2px 10px; }
.scope-tenant-group > header span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.scope-tenant-group > header strong { font-size: 12px; }
.scope-tenant-group > header small { color: var(--muted); font-size: 9px; }
.scope-tenant-group > div { display: grid; gap: 7px; }
.scope-option { display: flex; min-height: 66px; cursor: pointer; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid transparent; border-radius: 11px; background: var(--paper); padding: 11px 13px; text-align: left; transition: border-color .18s ease, background .18s ease; }
.scope-option:hover { border-color: var(--line-strong); }
.scope-option.is-active { background: #f0f4e4; }
.scope-option.is-selected { border-color: var(--ink); }
.scope-option-copy { display: grid; min-width: 0; gap: 6px; }
.scope-option-copy > span { display: flex; align-items: center; gap: 8px; }
.scope-option-copy b { min-width: 38px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); padding: 4px 7px; font-size: 8px; text-align: center; }
.scope-option-copy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.scope-option-copy small { overflow: hidden; color: #58635e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.scope-option-state { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.scope-option-state em { color: #506313; font-size: 8px; font-style: normal; font-weight: 800; }
.scope-option-state i { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 11px; font-style: normal; }
.scope-option.is-selected .scope-option-state i { border-color: var(--acid-deep); background: var(--acid); }
.scope-dialog-error { min-height: 0; margin: 0; background: #fff0ea; color: var(--danger); font-size: 9px; }
.scope-dialog-error:not(:empty) { padding: 9px 24px; border-top: 1px solid #edc6ba; }
.scope-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); background: var(--surface); padding: 14px 22px; }
.scope-dialog-footer > div { display: grid; min-width: 0; gap: 4px; }
.scope-dialog-footer strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.scope-dialog-footer small { color: var(--muted); font-size: 8px; }
.scope-dialog-footer > span { display: flex; flex: 0 0 auto; gap: 8px; }
.platform-toast { position: fixed; z-index: 80; right: 24px; bottom: 24px; display: grid; max-width: min(420px, calc(100% - 28px)); gap: 3px; border-radius: 11px; background: var(--ink); color: white; padding: 13px 16px; box-shadow: 0 6px 8px rgb(20 33 29 / 16%); }
.platform-toast[hidden] { display: none; }
.platform-toast strong { color: var(--acid); font-size: 10px; }
.platform-toast span { font-size: 9px; line-height: 1.5; }

/* Work Center v2: calendar, company assignment total, and relation-driven actions. */
.work-v2-shell { display: grid; gap: 13px; }
.work-v2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.v2-section-tabs { display: flex; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.v2-section-tab { position: relative; min-height: 46px; cursor: pointer; border: 0; background: transparent; color: var(--muted); padding: 0 15px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.v2-section-tab::after { position: absolute; right: 15px; bottom: -1px; left: 15px; height: 2px; background: transparent; content: ""; }
.v2-section-tab.is-active { color: var(--ink); }
.v2-section-tab.is-active::after { background: var(--ink); }
.work-v2-create { min-height: 36px; cursor: pointer; border: 0; border-radius: 8px; background: var(--ink); color: white; padding: 0 15px; font-size: 10px; font-weight: 800; }
.work-v2-create:hover { background: var(--ink-2); }
.v2-time-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.v2-time-views { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.v2-time-views button { width: 42px; min-height: 34px; cursor: pointer; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 10px; font-weight: 800; }
.v2-time-views button:last-child { border-right: 0; }
.v2-time-views button.is-active { background: var(--ink); color: white; }
.v2-date-nav { display: flex; align-items: center; gap: 5px; }
.v2-date-nav button { min-width: 34px; min-height: 34px; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 10px; }
.v2-date-nav button:first-child, .v2-date-nav button:last-child { font-size: 20px; }
.v2-date-nav strong { min-width: 128px; font-size: 11px; text-align: center; }
.work-v2-board { display: grid; min-height: 610px; overflow: hidden; grid-template-columns: minmax(330px, .85fr) minmax(430px, 1.15fr); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.work-v2-list-pane { min-width: 0; max-height: 680px; overflow-y: auto; border-right: 1px solid var(--line); background: #f5f3ec; }
.work-v2-date-group > h3 { position: sticky; z-index: 2; top: 0; margin: 0; border-bottom: 1px solid var(--line); background: rgb(245 243 236 / 96%); color: var(--muted); padding: 9px 14px; font-size: 9px; backdrop-filter: blur(10px); }
.work-v2-date-group > div { display: grid; }
.v2-active-work-section > header { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); background: var(--surface-2); padding: 8px 16px; }
.v2-active-work-section > header strong { font-size: 10px; }
.v2-active-work-section > header span { color: var(--muted); font-size: 8px; }
.v2-active-work-section > div { display: grid; }
.v2-active-empty { min-height: 72px; margin: 0; color: var(--muted); padding: 24px 16px; font-size: 9px; }
.v2-finished-work-section { border-top: 1px solid var(--line); background: #efefeb; }
.v2-finished-toggle { display: flex; width: 100%; min-height: 56px; cursor: pointer; align-items: center; justify-content: space-between; gap: 12px; border: 0; background: transparent; padding: 8px 16px; text-align: left; }
.v2-finished-toggle:hover { background: #e7e7e2; }
.v2-finished-toggle > span { display: grid; gap: 4px; }
.v2-finished-toggle strong { color: #46504c; font-size: 10px; }
.v2-finished-toggle small { color: #707874; font-size: 8px; }
.v2-finished-toggle em { display: flex; align-items: center; gap: 8px; color: #59615e; font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.v2-finished-toggle i { font-size: 13px; font-style: normal; transition: transform 180ms ease-out; }
.v2-finished-work-section.is-expanded .v2-finished-toggle i { transform: rotate(180deg); }
.v2-finished-work-section > div { display: grid; border-top: 1px solid var(--line); background: #f6f6f3; }
.v2-finished-more { min-height: 44px; cursor: pointer; border: 0; border-bottom: 1px solid var(--line); background: #eceeea; color: #44504b; padding: 8px 16px; font-size: 8px; font-weight: 800; text-align: left; }
.v2-finished-more:hover { background: #e3e7e2; }
.v2-finished-work-section .work-v2-row { min-height: 68px; padding-block: 8px; }
.v2-finished-work-section .v2-row-copy > strong { color: #4f5955; }
.work-v2-row.is-history .v2-priority.is-finished { background: #dfe4e1; color: #40504a; font-size: 12px; }
.work-v2-row.is-history .v2-row-copy em, .work-v2-row.is-history .v2-row-state em { background: #e7e9e7; color: #56605c; }
.work-v2-row { display: grid; width: 100%; min-height: 86px; cursor: pointer; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 13px 14px; text-align: left; }
.work-v2-row:hover { background: white; }
.work-v2-row.is-active { background: white; box-shadow: inset 3px 0 0 var(--ink); }
.work-v2-row.is-overdue { background: #fff8f4; }
.v2-priority { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 8px; font-weight: 900; }
.v2-priority.priority-urgent { background: #f7d8ce; color: #8e2d1d; }
.v2-priority.priority-high { background: #f2e3b1; color: #68510c; }
.v2-row-copy { display: grid; min-width: 0; gap: 5px; }
.v2-row-copy > span { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.v2-row-copy em, .v2-row-copy b { border-radius: 999px; background: var(--surface-2); color: var(--muted); padding: 3px 6px; font-size: 7px; font-style: normal; }
.v2-row-copy b { background: #edf3cf; color: #40500d; }
.v2-row-copy b.danger { background: #ffe5dc; color: var(--danger); }
.v2-row-copy strong, .v2-row-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-row-copy strong { font-size: 11px; }
.v2-row-copy small { color: var(--muted); font-size: 8px; }
.v2-row-copy small.v2-row-responsibility { color: var(--ink); font-weight: 750; }
.v2-row-state { display: grid; min-width: 84px; justify-items: end; gap: 6px; }
.v2-row-state em { border-radius: 999px; background: var(--surface-2); padding: 5px 8px; font-size: 8px; font-style: normal; font-weight: 800; white-space: nowrap; }
.v2-row-state small { max-width: 120px; color: var(--muted); font-size: 7px; text-align: right; }
.work-v2-empty { display: grid; min-height: 280px; place-content: center; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }
.work-v2-empty strong { color: var(--ink); font-size: 14px; }
.work-v2-empty p { margin: 0; font-size: 9px; }
.work-v2-empty button { min-height: 34px; margin-top: 4px; cursor: pointer; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: white; padding: 0 12px; font-size: 9px; font-weight: 800; }
.work-v2-empty button:hover { background: var(--ink-2); }
.recurring-board { display: grid; gap: 14px; }
.recurring-board > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 16px 18px; background: var(--surface); }
.recurring-board > header strong { color: var(--ink); font-size: 15px; }
.recurring-board > header p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.recurring-board > header > span { border-radius: 999px; background: var(--surface-2); padding: 5px 9px; color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.recurring-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.recurring-card { display: grid; align-content: start; gap: 10px; min-height: 260px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 18px; box-shadow: 0 8px 24px rgb(20 33 29 / 5%); }
.recurring-card.is-ended { opacity: .7; }
.recurring-card-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 800; }
.recurring-card-state em { border-radius: 999px; background: var(--surface-2); padding: 5px 8px; color: var(--ink); font-style: normal; }
.recurring-card.is-active .recurring-card-state em { background: rgb(216 255 98 / 35%); color: var(--ink); }
.recurring-card h3 { margin: 2px 0 0; font-size: 18px; line-height: 1.25; }
.recurring-card > p { min-height: 30px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.recurring-card dl { display: grid; margin: 0; border-top: 1px solid var(--line); }
.recurring-card dl > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); padding: 8px 0; font-size: 9px; }
.recurring-card dt { color: var(--muted); }
.recurring-card dd { margin: 0; color: var(--ink); font-weight: 700; }
.recurring-card .recurring-card-error { min-height: auto; border-radius: 7px; background: #fff1ed; color: #9b3525; padding: 8px; }
.recurring-card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.recurring-card-actions button { min-height: 32px; cursor: pointer; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 0 11px; color: var(--ink); font-size: 9px; font-weight: 800; }
.recurring-card-actions button:hover { border-color: var(--ink); }
.recurring-card-actions button.is-danger { margin-left: auto; color: #a03b2b; }
.recurring-empty { min-height: 430px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.recurring-dialog .work-dialog-body { gap: 15px; }
.recurring-dialog .recurring-rule-fields, .recurring-dialog .recurring-work-fields { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8f7f1; padding: 14px; }
.recurring-dialog section > h3 { margin: 0; font-size: 12px; }
.recurring-weekdays { display: grid; gap: 7px; }
.recurring-weekdays > span { font-size: 9px; font-weight: 800; }
.recurring-weekdays > div { display: flex; flex-wrap: wrap; gap: 6px; }
.recurring-weekdays label { position: relative; cursor: pointer; }
.recurring-weekdays input { position: absolute; opacity: 0; }
.recurring-weekdays label span { display: grid; min-width: 52px; min-height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 9px; font-weight: 800; }
.recurring-weekdays input:checked + span { border-color: var(--ink); background: var(--ink); color: white; }
.recurring-scope-mode { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; border: 0; padding: 0; }
.recurring-scope-mode legend { width: 100%; margin-bottom: 3px; font-size: 9px; font-weight: 800; }
.recurring-scope-mode label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 9px 10px; font-size: 9px; }
.work-v2-calendar-layout { position: relative; display: grid; gap: 24px; }
.v2-overdue-strip { overflow: hidden; border: 1px solid #e2b7a9; border-radius: 12px; background: #fff1ec; padding: 16px; }
.v2-overdue-strip > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v2-overdue-strip > header > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.v2-overdue-strip > header strong { font-size: 13px; }
.v2-overdue-strip > header span { color: #7b625a; font-size: 10px; }
.v2-overdue-strip > header em { color: #7b3021; font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.v2-overdue-track { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.v2-calendar-card { display: grid; min-width: 0; cursor: pointer; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 10px 12px; text-align: left; }
.v2-calendar-card:hover { border-color: var(--line-strong); background: var(--surface-2); }
.v2-calendar-card:focus-visible, .v2-week-day-head:focus-visible, .v2-month-day-head:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.v2-calendar-card.priority-high { border-color: #d9c58d; background: #fffaf0; }
.v2-calendar-card.priority-urgent, .v2-calendar-card.is-overdue { border-color: #deb2a4; background: #fff7f3; }
.v2-calendar-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.v2-calendar-card span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.v2-overdue-track .v2-calendar-card { width: 260px; min-width: 260px; scroll-snap-align: start; }
.v2-calendar-frame { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.v2-calendar-scroll { overflow-x: auto; }
.v2-week-grid { display: grid; min-width: 784px; grid-template-columns: repeat(7, minmax(112px, 1fr)); }
.v2-week-day { min-width: 0; border-left: 1px solid var(--line); background: var(--surface); }
.v2-week-day:first-child { border-left: 0; }
.v2-week-day.is-selected { box-shadow: inset 0 0 0 2px #326b97; }
.v2-week-day-head { display: grid; width: 100%; min-height: 68px; cursor: pointer; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; border: 0; border-bottom: 1px solid var(--line); background: var(--surface-2); padding: 12px; text-align: left; }
.v2-week-day-head span { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.v2-week-day-head strong { font-size: 13px; line-height: 1.2; white-space: nowrap; }
.v2-week-day-head small { min-width: 0; align-self: center; overflow: hidden; color: var(--muted); font-size: 8px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.v2-week-day.is-today .v2-week-day-head strong { width: fit-content; border-radius: 999px; background: var(--ink); color: white; padding: 4px 8px; }
.v2-week-items { display: grid; min-height: 460px; align-content: start; gap: 8px; padding: 12px; }
.v2-week-items > p { margin: 4px 0; color: var(--muted); font-size: 9px; }
.v2-calendar-more { min-height: 28px; cursor: pointer; border: 0; background: transparent; color: var(--muted); padding: 4px 0; font-size: 8px; text-align: left; }
.v2-calendar-more:hover { color: var(--ink); text-decoration: underline; }
.v2-calendar-completed { min-height: 28px; cursor: pointer; border: 0; border-top: 1px solid var(--line); background: transparent; color: #66706b; padding: 8px 0 4px; font-size: 8px; font-weight: 800; text-align: left; }
.v2-calendar-completed::before { margin-right: 4px; content: "✓"; }
.v2-calendar-completed:hover { color: var(--ink); }
.v2-month-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.v2-month-weekdays span { padding: 12px 8px; color: var(--muted); font-size: 9px; font-weight: 800; text-align: center; }
.v2-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.v2-month-day { min-width: 0; min-height: 132px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.v2-month-day:nth-child(7n) { border-right: 0; }
.v2-month-day:nth-last-child(-n+7) { border-bottom: 0; }
.v2-month-day.is-outside { background: #f5f5f2; }
.v2-month-day.is-selected { box-shadow: inset 0 0 0 2px #326b97; }
.v2-month-day-head { display: flex; width: 100%; min-height: 36px; cursor: pointer; align-items: center; justify-content: space-between; border: 0; background: transparent; padding: 8px; text-align: left; }
.v2-month-day-head strong { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 50%; font-size: 11px; }
.v2-month-day-head small { color: var(--muted); font-size: 8px; }
.v2-month-day.is-outside .v2-month-day-head { opacity: .45; }
.v2-month-day.is-today .v2-month-day-head strong { background: var(--ink); color: white; }
.v2-month-items { display: grid; gap: 6px; padding: 0 8px 8px; }
.v2-month-items .v2-calendar-card { min-height: 32px; padding: 7px 8px; }
.v2-month-items .v2-calendar-card span { display: none; }
.v2-month-dots { display: none; }
.v2-selected-date { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.v2-selected-date > header { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 16px; }
.v2-selected-date > header > div { display: flex; align-items: baseline; gap: 8px; }
.v2-selected-date > header span { color: var(--muted); font-size: 9px; }
.v2-selected-date > header strong { font-size: 15px; }
.v2-selected-date > header em { color: var(--muted); font-size: 9px; font-style: normal; }
.v2-selected-date > div { display: grid; }
.v2-selected-empty { min-height: 96px; margin: 0; color: var(--muted); padding: 24px 16px; font-size: 10px; }
.work-v2-calendar-layout > .work-v2-detail { position: fixed; z-index: 60; inset: 0 0 0 auto; width: min(560px, 100vw); height: 100dvh; box-shadow: -8px 0 28px rgb(20 33 29 / 18%); }
.work-v2-calendar-layout > .work-v2-detail .v2-detail-head > button { display: grid; place-items: center; }
.work-v2-detail { display: grid; min-width: 0; min-height: 610px; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); }
.work-v2-detail.is-empty { place-items: center; }
.work-v2-detail.is-empty > div { display: grid; justify-items: center; gap: 7px; color: var(--muted); text-align: center; }
.work-v2-detail.is-empty strong { color: var(--ink); font-size: 15px; }
.work-v2-detail.is-empty p { margin: 0; font-size: 9px; }
.v2-detail-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; border-bottom: 1px solid var(--line); padding: 20px 22px 17px; }
.v2-detail-head > button { position: absolute; top: 14px; right: 16px; display: none; width: 34px; height: 34px; cursor: pointer; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 20px; }
.v2-detail-head > span { color: var(--copper); font-size: 8px; font-weight: 800; }
.v2-detail-head > em { margin-right: 34px; border-radius: 999px; background: var(--surface-2); padding: 4px 7px; font-size: 8px; font-style: normal; }
.v2-detail-head h2, .v2-detail-head p { grid-column: 1 / -1; }
.v2-detail-head h2 { margin: 5px 0 0; font-size: 20px; letter-spacing: -.025em; text-wrap: balance; }
.v2-detail-head p { max-width: 65ch; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; text-wrap: pretty; }
.v2-detail-scroll { min-height: 0; overflow-y: auto; padding: 0 22px 22px; }
.v2-change-alert { display: grid; gap: 6px; margin: 16px 0 0; border: 1px solid #b6c875; border-radius: 9px; background: #f2f7d8; padding: 12px 13px; }
.v2-change-alert strong { font-size: 10px; }
.v2-change-alert p { margin: 0; color: #586230; font-size: 8px; line-height: 1.6; }
.v2-change-alert button { width: fit-content; cursor: pointer; border: 0; border-radius: 7px; background: var(--ink); color: white; padding: 7px 10px; font-size: 8px; font-weight: 800; }
.v2-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.v2-facts > div { display: grid; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 9px; }
.v2-facts > div:nth-child(even) { border-right: 0; }
.v2-facts dt { color: var(--muted); font-size: 7px; }
.v2-facts dd { margin: 0; font-size: 9px; font-weight: 800; }
.v2-detail-section { padding: 17px 0; border-bottom: 1px solid var(--line); }
.v2-detail-section > h3, .v2-section-title h3 { margin: 0 0 10px; font-size: 10px; }
.v2-detail-section > p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.v2-detail-section > ol:not(.v2-history) { display: grid; gap: 7px; margin: 0; padding-left: 20px; font-size: 9px; line-height: 1.55; }
.v2-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-section-title h3 { margin: 0; }
.v2-section-title span { color: var(--muted); font-size: 8px; }
.v2-target-grouping { display: inline-flex; gap: 3px; margin-top: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); padding: 3px; }
.v2-target-grouping button { cursor: pointer; border: 0; border-radius: 5px; background: transparent; padding: 5px 8px; color: var(--muted); font-size: 8px; font-weight: 800; }
.v2-target-grouping button.is-active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(26, 35, 45, .08); }
.v2-scope-warning { margin: 10px 0 !important; border: 1px solid #d9c687; border-radius: 8px; background: #fffbed; color: #64581d !important; padding: 9px 10px; }
.v2-target-groups { display: grid; gap: 12px; margin-top: 12px; }
.v2-target-groups > section { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: white; }
.v2-target-groups > section.target-lane-completed, .v2-target-groups > section.target-lane-ended { background: #f6f6f3; }
.v2-target-groups > section.target-lane-completed > header, .v2-target-groups > section.target-lane-ended > header { color: #59615e; }
.v2-target-groups > section > header { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); padding: 8px 10px; }
.v2-target-groups header strong { font-size: 9px; }
.v2-target-groups header span { color: var(--muted); font-size: 8px; }
.v2-target-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 12px; border-top: 1px solid var(--line); padding: 10px; }
.v2-target-row:first-child { border-top: 0; }
.v2-target-row > span { display: grid; min-width: 0; gap: 3px; }
.v2-target-row > span strong { font-size: 9px; }
.v2-target-row > span small { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.v2-target-row > span small.v2-target-assignee { color: var(--ink); font-size: 8px; font-weight: 750; }
.v2-target-row > em { color: var(--muted); font-size: 8px; font-style: normal; }
.v2-target-row > div { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 6px; }
.v2-target-row button, .v2-personal-state button { cursor: pointer; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; padding: 6px 8px; font-size: 8px; font-weight: 800; }
.v2-target-row button:hover, .v2-personal-state button:hover { border-color: var(--ink); }
.v2-target-row button.is-danger, .v2-personal-state button.is-danger { border-color: #e1b1a2; color: var(--danger); }
.v2-execution-items { display: grid; grid-column: 1 / -1; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.v2-execution-items > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2-execution-items > header strong { font-size: 9px; }
.v2-execution-items > header span { color: var(--muted); font-size: 8px; }
.v2-execution-items > div { display: grid; gap: 8px; }
.v2-execution-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 12px; }
.v2-execution-item.status-remediation { border-color: #e1b1a2; background: #fff8f4; }
.v2-execution-item.status-completed { background: #f1f4f1; }
.v2-execution-item.status-source_invalidated { opacity: .72; background: #f1f1ee; }
.v2-execution-item > div { display: grid; min-width: 0; gap: 4px; }
.v2-execution-item b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.v2-execution-item small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.v2-execution-item > em { align-self: start; border-radius: 999px; background: var(--surface-2); color: var(--muted); padding: 4px 8px; font-size: 8px; font-style: normal; white-space: nowrap; }
.v2-execution-item.status-remediation > em { background: #f7d8ce; color: var(--danger); }
.v2-execution-item.status-completed > em { background: #dfe8df; color: #35543a; }
.v2-execution-item > p { grid-column: 1 / -1; margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.v2-execution-item > p.is-returned { color: var(--danger); }
.v2-item-evidence { display: grid; grid-column: 1 / -1; gap: 7px; margin-top: 5px; border-top: 1px solid var(--line); padding-top: 9px; }
.v2-item-evidence > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.v2-item-evidence > header strong { font-size: 8px; }
.v2-item-evidence > header span { color: var(--muted); font-size: 7px; }
.v2-item-evidence > div { display: grid; gap: 6px; }
.v2-item-attempt { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: white; }
.v2-item-attempt[open] { border-color: #bfc8b9; }
.v2-item-attempt summary { display: grid; cursor: pointer; gap: 3px; padding: 8px 9px; list-style-position: inside; }
.v2-item-attempt summary span { font-size: 8px; font-weight: 800; }
.v2-item-attempt summary small { padding-left: 15px; color: var(--muted); font-size: 7px; }
.v2-item-attempt-body { display: grid; gap: 8px; border-top: 1px solid var(--line); padding: 9px; }
.v2-item-attempt-body dl { display: grid; gap: 6px; margin: 0; }
.v2-item-attempt-body dl > div { display: grid; grid-template-columns: minmax(70px, auto) minmax(0, 1fr); gap: 8px; }
.v2-item-attempt-body dt { color: var(--muted); font-size: 7px; }
.v2-item-attempt-body dd { margin: 0; font-size: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.v2-evidence-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 7px; }
.v2-evidence-photos button { display: grid; min-width: 0; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--ink); padding: 0; text-align: left; }
.v2-evidence-photos button:hover, .v2-evidence-photos button:focus-visible { border-color: var(--ink); outline: 0; box-shadow: 0 0 0 2px rgb(216 255 98 / 38%); }
.v2-evidence-photos img { width: 100%; height: 84px; object-fit: cover; background: var(--surface-2); }
.v2-evidence-photos span { overflow: hidden; padding: 5px 6px; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.v2-image-preview-dialog { width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; border: 0; border-radius: 17px; background: var(--surface); color: var(--ink); padding: 0; box-shadow: 0 25px 80px rgb(20 33 29 / 38%); }
.v2-image-preview-dialog::backdrop { background: rgb(8 20 16 / 78%); backdrop-filter: blur(6px); }
.v2-image-preview-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); padding: 18px 20px 15px; }
.v2-image-preview-dialog h2 { margin: 4px 0 0; font-size: 18px; }
.v2-image-preview-dialog header p { max-width: 70vw; overflow: hidden; margin: 5px 0 0; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.v2-image-preview-dialog header button { width: 36px; height: 36px; flex: 0 0 auto; cursor: pointer; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 22px; }
.v2-image-preview-stage { display: grid; min-height: 240px; max-height: calc(100dvh - 190px); place-items: center; overflow: auto; background: #10211c; padding: 18px; }
.v2-image-preview-stage img { display: block; max-width: 100%; max-height: calc(100dvh - 226px); object-fit: contain; }
.v2-image-preview-dialog > footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 12px 20px; }
.v2-image-preview-dialog > footer a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.v2-evidence-files { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-evidence-files a { border-radius: 6px; background: var(--surface-2); color: var(--ink); padding: 6px 8px; font-size: 7px; text-decoration: none; }
.v2-item-empty-evidence, .v2-item-audit, .v2-item-review-reason { margin: 0; font-size: 7px; line-height: 1.55; }
.v2-item-empty-evidence, .v2-item-audit { color: var(--muted); }
.v2-item-review-reason { border-left: 2px solid #d58a73; background: #fff3ee; color: var(--danger); padding: 6px 8px; }
.v2-execution-item > footer { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.v2-target-expand { width: 100%; cursor: pointer; border: 0; border-top: 1px solid var(--line); background: white; padding: 8px; color: var(--muted); font-size: 8px; font-weight: 800; }
.v2-target-expand:hover { background: var(--surface-2); color: var(--ink); }
.v2-personal-state { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v2-personal-state > span { font-size: 9px; font-weight: 800; }
.v2-personal-state > div { display: flex; flex-wrap: wrap; gap: 7px; }
.v2-submissions { display: grid; gap: 8px; }
.v2-submissions article { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 10px; }
.v2-submissions header { display: flex; justify-content: space-between; gap: 10px; }
.v2-submissions strong { font-size: 9px; }
.v2-submissions header span { color: var(--muted); font-size: 8px; }
.v2-submissions p, .v2-submissions small { color: var(--muted); font-size: 8px; line-height: 1.55; }
.v2-submissions p { margin: 7px 0; }
.v2-submissions article > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.v2-submissions a { border-radius: 6px; background: var(--surface-2); color: var(--ink); padding: 5px 7px; font-size: 8px; text-decoration: none; }
.v2-history { position: relative; display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.v2-history::before { position: absolute; top: 5px; bottom: 5px; left: 4px; width: 1px; background: var(--line); content: ""; }
.v2-history li { position: relative; display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 9px; padding: 7px 0; }
.v2-history li > span { z-index: 1; width: 9px; height: 9px; margin-top: 2px; border: 2px solid var(--surface); border-radius: 50%; background: var(--line-strong); }
.v2-history li > div { display: grid; gap: 3px; }
.v2-history strong { font-size: 8px; }
.v2-history small { color: var(--muted); font-size: 7px; }
.v2-history p { margin: 2px 0 0; color: var(--muted); font-size: 8px; }
.v2-detail-footer { display: flex; min-height: 58px; align-items: center; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 10px 16px; }
.v2-detail-footer button { cursor: pointer; border: 0; border-radius: 7px; background: var(--ink); color: white; padding: 8px 11px; font-size: 8px; font-weight: 800; }
.v2-detail-footer span { margin-right: auto; color: var(--muted); font-size: 8px; }
.work-error button { margin-left: 8px; cursor: pointer; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: 900; text-decoration: underline; }
.v2-create-kind { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.v2-create-kind > label { display: flex; min-height: 64px; cursor: pointer; grid-template-columns: auto 1fr; align-items: flex-start; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 10px; }
.v2-create-kind > label:has(input:checked) { border-color: var(--ink); background: #f3f7df; }
.v2-create-kind input { width: 14px; margin: 2px 0 0; accent-color: var(--ink); }
.v2-create-kind label > span, .v2-fixed-kind { display: grid; gap: 3px; }
.v2-create-kind strong, .v2-fixed-kind strong { font-size: 10px; }
.v2-create-kind small, .v2-fixed-kind small { color: var(--muted); font-size: 8px; }
.v2-fixed-kind { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); padding: 10px 11px; }
.v2-company-fields { display: grid; gap: 12px; }
.v2-company-fields[hidden] { display: none; }
.v2-target-picker { display: grid; gap: 8px; }
.v2-target-picker > div:first-child { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 11px; }
.v2-target-picker > div:first-child strong { font-size: 9px; }
.v2-target-picker > div:first-child small { color: var(--muted); font-size: 8px; }
#workV2Targets { min-width: 0; }
.v2-result-contract { display: grid; gap: 7px; border-top: 1px solid var(--line); padding-top: 12px; }
.v2-result-contract h3 { margin: 0; font-size: 10px; }
.v2-result-contract > p { margin: 0; color: var(--muted); font-size: 8px; }
.v2-result-contract > div { display: flex; flex-wrap: wrap; gap: 7px; }
.v2-result-contract label { display: grid; min-width: 140px; cursor: pointer; flex: 1 1 140px; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: white; padding: 9px; }
.v2-result-contract label:has(input:checked) { border-color: var(--ink); background: #f3f7df; }
.v2-result-contract input { width: 14px; margin: 2px 0 0; accent-color: var(--ink); }
.v2-result-contract label > span { display: grid; gap: 2px; }
.v2-result-contract strong { font-size: 8px; }
.v2-result-contract small { color: var(--muted); font-size: 7px; }
.v2-action-confirm { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.v2-action-status { min-height: 16px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.v2-result-fields { display: grid; gap: 11px; }
.v2-result-fields label { display: grid; gap: 6px; }
.v2-result-fields label > span { font-size: 9px; font-weight: 800; }
.work-v2-dialog [hidden] { display: none !important; }

@media (max-width: 1080px) {
  :root { --sidebar-width: 192px; }
  .workspace { padding-inline: 28px; }
  .overview-grid { grid-template-columns: 1fr; }
  .side-stack { grid-template-columns: 1fr 1fr; }
  .ai-stage { grid-template-columns: 1fr; }
  .ai-intro { min-height: 250px; }
  .work-board { grid-template-columns: 1fr; }
  .work-list-pane { border-right: 0; }
  .work-detail-zero { display: none; }
  .work-detail.is-open, .work-detail:has(.detail-loading) { position: fixed; z-index: 60; inset: 0 0 0 auto; width: min(520px, 100vw); height: 100dvh; box-shadow: -25px 0 70px rgb(20 33 29 / 24%); }
  .detail-close { position: absolute; z-index: 1; top: 12px; right: 12px; display: grid; width: 32px; height: 32px; cursor: pointer; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); font-size: 19px; }
  .work-detail-head { padding-right: 58px; }
}

@media (max-width: 760px) {
  :root {
    --mobile-header: calc(58px + env(safe-area-inset-top, 0px));
    --mobile-bottom-nav-height: calc(71px + var(--safe-bottom));
  }
  body { background-size: 28px 28px; }
  .platform-shell { display: block; padding-top: var(--mobile-header); }
  .app-sidebar { display: none; }
  .mobile-header {
    position: fixed;
    z-index: 50;
    inset: 0 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: var(--mobile-header);
    align-items: end;
    gap: 10px;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    background: var(--ink);
    color: white;
    padding: env(safe-area-inset-top, 0px) 14px 9px;
  }
  .mobile-brand { display: flex; cursor: pointer; align-items: center; gap: 7px; border: 0; background: transparent; color: white; padding: 0; }
  .mobile-brand > span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 9px; background: var(--acid); color: var(--ink); font-family: Bahnschrift, sans-serif; font-size: 17px; font-weight: 900; }
  .mobile-brand strong { font-family: Bahnschrift, sans-serif; font-size: 13px; letter-spacing: .1em; }
  .mobile-scope { display: flex; min-width: 0; cursor: pointer; align-items: center; justify-content: center; gap: 3px; border: 0; background: transparent; color: #cbd3cf; padding: 4px 7px; }
  .mobile-scope > span { display: grid; min-width: 0; justify-items: center; gap: 1px; }
  .mobile-scope strong, .mobile-scope small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-scope strong { color: white; font-size: 10px; }
  .mobile-scope small { color: #9eaaa4; font-size: 8px; }
  .mobile-header-actions { display: flex; align-items: center; gap: 5px; }
  .mobile-notification-trigger { display: grid; width: 44px; height: 44px; cursor: pointer; place-items: center; border: 0; background: transparent; color: white; padding: 0; }
  .mobile-notification-trigger svg { width: 20px; height: 20px; }
  .mobile-notification-trigger .notification-badge { top: 1px; right: 1px; border-color: var(--ink); }
  .mobile-avatar { width: 32px; height: 32px; font-size: 11px; }
  .workspace { min-height: calc(100dvh - var(--mobile-header)); padding: 21px 14px calc(100px + var(--safe-bottom)); }
  .workspace-head { display: block; padding-bottom: 17px; }
  .workspace-head h1 { font-size: 29px; }
  .workspace-head p { max-width: 92%; font-size: 10px; }
  .head-actions { position: absolute; top: calc(var(--mobile-header) + 24px); right: 15px; }
  .head-actions time { display: none; }
  .head-actions #desktopNotificationButton { display: none; }
  .quiet-action { width: 36px; padding: 0; justify-content: center; background: transparent; }
  .quiet-action span { display: none; }
  .view-region { margin-top: 18px; }
  .workspace[data-layout="plugin"] {
    display: grid;
    height: calc(100dvh - var(--mobile-header) - var(--mobile-bottom-nav-height));
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
    padding: 0;
  }
  .workspace[data-layout="plugin"] .workspace-head { display: none; }
  .view-region[data-layout="plugin"] {
    height: 100%;
    min-height: 0;
    margin: 0;
  }
  .loading-grid { grid-template-columns: 1fr; }
  .loading-grid div { min-height: 120px; }
  .work-surface { min-height: 360px; padding: 20px 16px; }
  .surface-head { align-items: flex-start; }
  .today-axis { min-height: 245px; }
  .side-stack { grid-template-columns: 1fr; }
  .insight-surface { padding: 21px; }
  .ai-stage { min-height: auto; border-radius: 14px; }
  .ai-intro { min-height: 270px; padding: 25px; }
  .ai-intro h2 { font-size: 25px; }
  .conversation-zero { padding: 26px 18px; }
  .contract-strip { grid-template-columns: 1fr 1fr; }
  .installed-plugin-grid { grid-template-columns: 1fr; }
  .plugin-upload-panel { align-items: stretch; flex-direction: column; }
  .plugin-upload-panel label { justify-content: center; }
  .plugin-runtime-list article { grid-template-columns: minmax(0, 1fr) auto; }
  .plugin-runtime-list article > em { grid-column: 1 / -1; }
  .plugin-host { min-height: calc(100dvh - 190px); border-radius: 12px; }
  .plugin-host > header { grid-template-columns: auto minmax(0, 1fr); }
  .plugin-host > header em { display: none; }
  .plugin-host iframe { min-height: calc(100dvh - 250px); }
  .plugin-frame-stage { min-height: calc(100dvh - 250px); }
  .workspace[data-layout="plugin"] .plugin-host {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .workspace[data-layout="plugin"] .plugin-host iframe {
    height: 100%;
    min-height: 0;
  }
  .workspace[data-layout="plugin"] .plugin-frame-stage {
    height: 100%;
    min-height: 0;
  }
  .profile-grid { grid-template-columns: 1fr; }
  .work-item-list { grid-template-columns: 1fr; }
  .work-overview { grid-template-columns: 1fr 1fr; border-radius: 13px 13px 0 0; }
  .work-metric { min-height: 90px; padding: 14px 15px; }
  .work-metric strong { font-size: 23px; }
  .work-metric span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .work-board { min-height: calc(100dvh - 300px); border-radius: 0 0 13px 13px; }
  .work-tabs { padding-inline: 2px; }
  .work-tab { min-height: 47px; padding-inline: 10px; }
  .work-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .work-toolbar select { max-width: 105px; }
  .work-create-button { grid-column: 1 / -1; }
  .work-list { max-height: none; }
  .work-row { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; padding: 13px 10px; }
  .work-priority { width: 32px; height: 32px; border-radius: 8px; }
  .work-row-meta { min-width: 62px; }
  .work-row-meta > small { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
  .dispatch-row .work-row-meta { min-width: 88px; }
  .dispatch-row .work-row-meta > small { max-width: 100px; }
  .dispatch-progress-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dispatch-child { grid-template-columns: minmax(0, 1fr) auto; }
  .dispatch-child > i { grid-column: 1 / -1; }
  .work-chevron { display: none; }
  .work-detail.is-open, .work-detail:has(.detail-loading) { z-index: 45; inset: var(--mobile-header) 0 var(--mobile-bottom-nav-height) 0; width: 100%; height: auto; box-shadow: 0 -15px 60px rgb(20 33 29 / 18%); }
  .work-detail-head { padding: 18px 54px 15px 17px; }
  .work-detail-head h2 { font-size: 19px; }
  .work-detail-scroll { padding: 0 17px 18px; }
  .work-detail-actions { min-height: 63px; overflow-x: auto; justify-content: flex-start; padding: 10px 13px; }
  .work-detail-actions .primary-action, .work-detail-actions .secondary-action { flex: 1 0 auto; }
  .work-dialog { width: calc(100% - 18px); max-height: calc(100dvh - 20px); border-radius: 16px; }
  .work-dialog form { max-height: calc(100dvh - 20px); }
  .work-dialog header { padding: 18px 17px 15px; }
  .work-dialog-body { padding: 15px 17px; }
  .work-dialog footer { padding: 12px 17px; }
  .work-assignment-options, .target-store-grid { grid-template-columns: 1fr; }
  .form-pair { grid-template-columns: 1fr; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 50;
    inset: auto 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    height: var(--mobile-bottom-nav-height);
    border-top: 1px solid var(--line);
    background: rgb(251 250 245 / 96%);
    box-shadow: 0 -12px 35px rgb(20 33 29 / 8%);
    backdrop-filter: blur(18px);
    padding: 5px 5px var(--safe-bottom);
  }
  .mobile-bottom-nav button[hidden] { display: none !important; }
  .mobile-bottom-nav button { position: relative; display: grid; min-width: 0; cursor: pointer; place-items: center; align-content: center; gap: 3px; border: 0; background: transparent; color: var(--muted); padding: 2px; font-size: 9px; }
  .mobile-bottom-nav button > svg { width: 20px; height: 20px; }
  .mobile-bottom-nav button.is-active { color: var(--ink); font-weight: 800; }
  .mobile-bottom-nav button.is-active::after { position: absolute; top: 0; width: 18px; height: 3px; border-radius: 0 0 3px 3px; background: var(--acid-deep); content: ""; }
  .mobile-bottom-nav .mobile-ai { translate: 0 -14px; }
  .mobile-ai i { display: grid; width: 47px; height: 47px; place-items: center; border: 5px solid var(--surface); border-radius: 50%; background: var(--ink); color: var(--acid); box-shadow: 0 7px 16px rgb(20 33 29 / 24%); }
  .mobile-ai i svg { width: 21px; height: 21px; }
  .mobile-ai span { translate: 0 2px; }
  .scope-dialog { width: calc(100% - 18px); max-height: 88dvh; margin-bottom: calc(12px + var(--safe-bottom)); }
  .scope-dialog form { max-height: 88dvh; }
  .scope-dialog header { padding: 18px 18px 15px; }
  .scope-dialog header p { font-size: 11px; }
  .scope-account-context { padding: 10px 18px; }
  .scope-options { padding-inline: 14px; }
  .scope-tenant-group > header span { display: grid; gap: 3px; }
  .scope-option-copy small { max-width: 245px; }
  .scope-option-state em { display: none; }
  .scope-dialog-footer { display: grid; padding: 12px 14px calc(12px + var(--safe-bottom)); }
  .scope-dialog-footer > span { display: grid; grid-template-columns: .8fr 1.2fr; }
  .scope-dialog-footer button { min-height: 44px; }
  .platform-toast { right: 14px; bottom: calc(82px + var(--safe-bottom)); left: 14px; }
}

@media (max-width: 1080px) {
  .work-v2-board { grid-template-columns: 1fr; }
  .work-v2-list-pane { max-height: none; border-right: 0; }
  .work-v2-detail.is-empty { display: none; }
  .work-v2-detail.is-open, .work-v2-detail:has(.work-list-loading) { position: fixed; z-index: 60; inset: 0 0 0 auto; width: min(560px, 100vw); height: 100dvh; box-shadow: -8px 0 28px rgb(20 33 29 / 18%); }
  .v2-detail-head > button { display: grid; place-items: center; }
  .recurring-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .work-v2-head { align-items: stretch; }
  .v2-section-tabs { margin-left: -8px; }
  .v2-section-tab { min-height: 44px; padding-inline: 10px; }
  .v2-section-tab::after { right: 10px; left: 10px; }
  .work-v2-create { min-width: 88px; align-self: center; }
  .v2-time-controls { align-items: stretch; flex-direction: column; }
  .v2-time-views { width: fit-content; }
  .v2-time-views button { min-height: 44px; }
  .v2-date-nav { justify-content: space-between; }
  .v2-date-nav button { min-width: 44px; min-height: 44px; }
  .v2-date-nav strong { min-width: 112px; }
  .work-v2-calendar-layout { gap: 16px; }
  .v2-overdue-strip { margin-inline: -6px; padding: 12px; }
  .v2-overdue-track .v2-calendar-card { width: 82vw; min-width: 82vw; min-height: 68px; }
  .v2-week-grid { min-width: max-content; grid-template-columns: repeat(7, 78vw); }
  .v2-week-day { scroll-snap-align: start; }
  .v2-calendar-scroll { scroll-snap-type: x mandatory; }
  .v2-week-items { min-height: 360px; }
  .v2-month-weekdays span { padding: 10px 2px; font-size: 8px; }
  .v2-month-day { min-height: 72px; }
  .v2-month-day-head { min-height: 34px; padding: 5px 3px; }
  .v2-month-day-head strong { min-width: 22px; height: 22px; font-size: 9px; }
  .v2-month-day-head small { max-width: 28px; overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
  .v2-month-items { display: flex; min-height: 18px; align-items: center; padding: 0 5px 5px; }
  .v2-month-items .v2-calendar-card, .v2-month-items .v2-calendar-more { display: none; }
  .v2-week-items .v2-calendar-completed { min-height: 44px; }
  .v2-month-day:has(.v2-calendar-completed) { min-height: 86px; }
  .v2-month-items .v2-calendar-completed { min-height: 44px; padding: 8px 0; }
  .v2-month-dots { display: flex; flex-wrap: wrap; gap: 3px; }
  .v2-month-dots i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #9ca39f; }
  .v2-month-dots i.priority-high { background: #9f7c19; }
  .v2-month-dots i.priority-urgent { background: var(--danger); }
  .v2-selected-date > header { min-height: 60px; padding: 10px 12px; }
  .v2-selected-date > header > div { display: grid; gap: 3px; }
  .v2-selected-date > header strong { font-size: 13px; }
  .work-v2-board { min-height: calc(100dvh - 310px); border-radius: 10px; }
  .work-v2-row { min-height: 81px; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; padding: 11px 9px; }
  .v2-priority { width: 31px; height: 31px; }
  .v2-row-state { min-width: 63px; }
  .v2-row-state small { display: none; }
  .work-v2-detail.is-open, .work-v2-detail:has(.work-list-loading) { z-index: 45; inset: var(--mobile-header) 0 var(--mobile-bottom-nav-height) 0; width: 100%; height: auto; box-shadow: 0 -8px 24px rgb(20 33 29 / 16%); }
  .work-v2-calendar-layout > .work-v2-detail { z-index: 45; inset: var(--mobile-header) 0 var(--mobile-bottom-nav-height); width: 100%; height: auto; }
  .v2-detail-head { padding: 17px 51px 14px 15px; }
  .v2-detail-head h2 { font-size: 18px; }
  .v2-detail-scroll { padding: 0 15px 18px; }
  .v2-detail-footer { overflow-x: auto; justify-content: flex-start; padding: 9px 12px; }
  .v2-facts { grid-template-columns: 1fr; }
  .v2-facts > div { border-right: 0; }
  .v2-target-row { grid-template-columns: minmax(0, 1fr) auto; }
  .v2-execution-item { padding: 11px 10px; }
  .v2-item-attempt summary { min-height: 44px; align-content: center; }
  .v2-evidence-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-evidence-photos img { height: 112px; }
  .v2-execution-item > footer button { min-height: 44px; flex: 1 1 120px; }
  .v2-create-kind { grid-template-columns: 1fr; }
  .v2-result-contract > div { display: grid; grid-template-columns: 1fr; }
  .v2-result-contract label { min-width: 0; }
  .recurring-board > header { padding: 13px; }
  .recurring-card { min-height: 0; border-radius: 10px; padding: 14px; }
  .recurring-card dl > div { grid-template-columns: 64px minmax(0, 1fr); }
  .recurring-card-actions button { min-height: 44px; }
  .recurring-weekdays label span { min-width: 44px; min-height: 44px; }
  .recurring-scope-mode { display: grid; }
  .notification-panel { inset: calc(var(--mobile-header) + 8px) 12px auto auto; width: calc(100vw - 24px); max-height: calc(100dvh - var(--mobile-header) - 84px); border-radius: 12px; }
  .notification-panel > header { padding: 16px 15px 13px; }
  .notification-close { width: 44px; height: 44px; }
  .notification-item { padding: 15px; }
  .notification-item-actions button, .notification-state button { min-height: 44px; padding-inline: 13px; }
}

.operations-page { display: grid; gap: 24px; }
.customer-create-form { display: grid; gap: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.customer-create-form > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.customer-create-form > header div { display: grid; gap: 4px; }
.customer-create-form > header small { color: var(--muted); }
.customer-create-form > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.customer-create-form label, .customer-row label { display: grid; gap: 7px; }
.customer-create-form label span, .customer-row label span, .customer-admin > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.customer-list { display: grid; gap: 10px; }
.customer-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.8fr) minmax(160px, auto); align-items: end; gap: 14px; border-bottom: 1px solid var(--line); padding: 16px 0; }
.customer-row-title { display: flex; align-items: center; gap: 12px; align-self: center; }
.customer-row-title > span { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: var(--ink); color: var(--acid); font-weight: 900; }
.customer-row-title > div, .customer-admin { display: grid; gap: 4px; }
.customer-row-title small, .customer-admin small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-admin { align-self: center; min-width: 0; }
.customer-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.credential-receipt { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.3fr); gap: 20px; border: 1px solid #b8c691; border-radius: 14px; background: #f2f8df; padding: 20px; }
.credential-receipt > div { display: grid; align-content: start; gap: 5px; }
.credential-receipt h3 { margin: 0; font-size: 20px; }
.credential-receipt p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.credential-receipt dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; background: #cdd6b5; }
.credential-receipt dl div { display: grid; align-content: center; gap: 5px; background: #f9fbe9; padding: 12px; }
.credential-receipt dt { color: var(--muted); font-size: 10px; }
.credential-receipt dd { min-width: 0; margin: 0; }
.credential-receipt code { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.credential-receipt footer { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 10px; }
.customer-password-reset { display: grid; gap: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 20px; box-shadow: 0 18px 50px rgb(20 33 29 / 10%); }
.customer-password-reset header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.customer-password-reset header > div { display: grid; gap: 4px; }
.customer-password-reset h3, .customer-password-reset p { margin: 0; }
.customer-password-reset p { color: var(--muted); font-size: 11px; }
.customer-password-reset header > button { border: 0; background: transparent; color: var(--ink); font-size: 24px; }
.customer-password-reset > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.customer-password-reset label { display: grid; gap: 7px; }
.customer-password-reset label span { color: var(--muted); font-size: 11px; font-weight: 700; }
.customer-password-reset footer { display: flex; justify-content: flex-end; gap: 10px; }
.store-application-list { display: grid; gap: 14px; }
.store-application-card { display: grid; gap: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); padding: 20px; }
.store-application-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.store-application-card > header div { display: grid; gap: 4px; }
.store-application-card > header small { color: var(--muted); }
.store-application-card > header h3 { margin: 0; font-size: 22px; }
.plugin-application-list .store-application-card > header h3 em { color: var(--muted); font-size: 12px; font-style: normal; }
.store-application-card > header > span { border-radius: 999px; background: var(--surface-strong); padding: 7px 11px; font-size: 12px; font-weight: 800; }
.store-application-card.is-pending > header > span { background: #fff3cb; color: #6d5311; }
.store-application-card.is-approved > header > span { background: #e8f3e6; color: #2d6337; }
.store-application-card.is-rejected > header > span { background: #fbe8e4; color: #8b3d32; }
.store-application-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.store-application-card dl div { display: grid; gap: 5px; background: var(--paper); padding: 12px 14px; }
.store-application-card dt { color: var(--muted); font-size: 12px; }
.store-application-card dd { margin: 0; font-weight: 700; }
.store-application-card footer { display: flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 760px) {
  .identity-mode-switch > div { grid-template-columns: 1fr; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { min-height: 220px; justify-content: flex-start; padding: 28px 22px; }
  .auth-brand > div:nth-child(2) { margin-top: 28px; }
  .auth-brand > div:nth-child(2) strong { font-size: 34px; }
  .auth-brand > p { display: none; }
  .auth-panel { place-items: start stretch; padding: 30px 22px max(34px, var(--safe-bottom)); }
  .auth-panel h1 { font-size: 34px; }
  .customer-create-form > header { align-items: stretch; flex-direction: column; }
  .customer-create-form > div, .customer-row, .customer-password-reset > div { grid-template-columns: 1fr; }
  .customer-row { align-items: stretch; }
  .credential-receipt, .credential-receipt dl { grid-template-columns: 1fr; }
  .credential-receipt footer { align-items: stretch; flex-direction: column; }
  .profile-password-form > div { align-items: stretch; flex-direction: column; }
  .store-application-card { border-radius: 14px; padding: 16px; }
  .store-application-card dl { grid-template-columns: 1fr; }
  .store-application-card footer button { min-height: 44px; flex: 1; }
}

.sales-page { display: grid; gap: 22px; }
.sales-mobile-tabs { display: none; }
.sales-page-head { display: flex; min-height: 132px; align-items: flex-end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--ink); padding: 8px 0 20px; }
.sales-page-head > div { display: grid; gap: 7px; }
.sales-page-head small, .sales-section-title small { color: var(--copper); font: 800 10px/1.2 Bahnschrift, sans-serif; letter-spacing: .16em; }
.sales-page-head h2 { max-width: 720px; margin: 0; font-size: clamp(30px, 5vw, 58px); line-height: .98; letter-spacing: -.055em; }
.sales-page-head p { max-width: 68ch; margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.sales-page-head > span { flex: 0 0 auto; border: 1px solid var(--ink); border-radius: 999px; padding: 8px 12px; font-size: 11px; font-weight: 900; }
.sales-metrics { display: grid; grid-template-columns: 1.35fr repeat(3, minmax(120px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--line); }
.sales-metrics article { display: grid; min-height: 130px; align-content: space-between; background: var(--surface); padding: 18px; }
.sales-metrics article.is-primary { background: var(--acid); }
.sales-metrics span, .sales-metrics small { color: var(--muted); font-size: 10px; font-weight: 800; }
.sales-metrics strong { font: 700 clamp(32px, 4vw, 54px)/1 Bahnschrift, sans-serif; letter-spacing: -.04em; }
.sales-policy-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-radius: 12px; background: var(--ink); color: #f8f6ee; padding: 13px 15px; }
.sales-policy-strip strong { margin-right: 5px; color: var(--acid); font-size: 11px; }
.sales-policy-strip span { border-left: 1px solid rgb(255 255 255 / 22%); padding-left: 10px; color: #d9ddd9; font-size: 10px; line-height: 1.5; }
.sales-section-title { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 8px; }
.sales-section-title > div { display: grid; gap: 4px; }
.sales-section-title h3 { margin: 0; font-size: 22px; }
.sales-visit-list, .sales-compact-list, .sales-staff-list { display: grid; gap: 12px; }
.sales-visit-card { display: grid; gap: 15px; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 4px 16px 16px 4px; background: var(--surface); padding: 18px; box-shadow: 0 7px 26px rgb(20 33 29 / 5%); }
.sales-visit-card.is-submitted { border-left-color: var(--acid-deep); }
.sales-visit-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.sales-visit-card > header > div { display: grid; gap: 4px; }
.sales-visit-card > header small { color: var(--muted); font-size: 10px; font-weight: 800; }
.sales-visit-card h3 { margin: 0; font-size: 23px; letter-spacing: -.02em; }
.sales-visit-card > header p { margin: 0; color: var(--muted); font-size: 11px; }
.sales-state { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); padding: 7px 10px; font-size: 10px; font-weight: 900; }
.sales-visit-objective, .sales-visit-result { display: grid; gap: 5px; border-top: 1px solid var(--line); padding-top: 13px; }
.sales-visit-objective span, .sales-visit-result span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.sales-visit-objective strong { font-size: 13px; line-height: 1.55; }
.sales-visit-result p { margin: 0; font-size: 12px; line-height: 1.7; }
.sales-visit-result strong { color: #446018; font-size: 11px; }
.sales-checkin-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--line); gap: 1px; }
.sales-checkin-facts > div { display: grid; gap: 4px; background: var(--paper); padding: 10px 12px; }
.sales-checkin-facts dt { color: var(--muted); font-size: 9px; }
.sales-checkin-facts dd { margin: 0; font-size: 11px; font-weight: 900; }
.sales-visit-card > footer, .sales-checkin-panel footer, .sales-result-form footer, .sales-editor > footer, .sales-review-actions { display: flex; justify-content: flex-end; gap: 9px; }
.sales-visit-card > footer:empty { display: none; }
.sales-visit-card a.secondary-action { display: inline-grid; align-items: center; text-decoration: none; }
.sales-checkin-panel, .sales-result-form { display: grid; gap: 15px; border: 1px solid var(--ink); border-radius: 12px; background: #f5fadd; padding: 16px; }
.sales-checkin-panel > div, .sales-result-form > header { display: grid; gap: 4px; }
.sales-checkin-panel p, .sales-result-form small { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.sales-photo-field { display: grid; gap: 7px; }
.sales-photo-field span { font-size: 10px; font-weight: 900; }
.sales-photo-field input { width: 100%; border: 1px dashed var(--line-strong); border-radius: 10px; background: white; padding: 11px; font-size: 11px; }
.sales-sampling-status { border-radius: 8px; background: var(--ink); color: white !important; padding: 10px 12px; }
.sales-editor { display: grid; gap: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 19px; }
.sales-editor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.sales-editor > header > div { display: grid; gap: 4px; }
.sales-editor > header strong { font-size: 16px; }
.sales-editor > header small { color: var(--muted); font-size: 10px; }
.sales-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.sales-form-grid label { display: grid; align-content: start; gap: 7px; }
.sales-form-grid label.is-wide { grid-column: 1 / -1; }
.sales-form-grid label > span, .sales-search > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.sales-form-grid input, .sales-form-grid select, .sales-form-grid textarea, .sales-search input { width: 100%; min-height: 43px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: white; color: var(--ink); padding: 9px 11px; font-size: 11px; }
.sales-form-grid textarea { min-height: 84px; resize: vertical; line-height: 1.6; }
.sales-form-grid input:focus, .sales-form-grid select:focus, .sales-form-grid textarea:focus, .sales-search input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(216 255 98 / 42%); }
.sales-form-grid input[readonly] { background: var(--surface-2); color: var(--muted); }
.sales-location-button, .sales-location-lock { align-self: end; margin: 0; }
.sales-location-lock { border-left: 3px solid var(--copper); padding: 9px 10px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.sales-location-pending { margin: 0; border-left: 3px solid var(--copper); background: #fff3cb; color: #6d5311; padding: 9px 11px; font-size: 10px; font-weight: 800; line-height: 1.5; }
.sales-form-guidance, .sales-form-error { margin: 0; padding: 9px 11px; font-size: 10px; line-height: 1.5; }
.sales-form-guidance { color: var(--muted); background: var(--surface-soft); }
.sales-form-error { color: #7b2819; background: #fff0ea; border: 1px solid #e8b6a8; font-weight: 700; }
.sales-customer-row { display: grid; grid-template-columns: 44px minmax(190px, 1.3fr) minmax(260px, 1fr) auto; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.sales-customer-mark, .sales-person-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 10px; background: var(--ink); color: var(--acid); font-weight: 900; }
.sales-customer-row > div:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.sales-customer-row small { color: var(--copper); font-size: 9px; font-weight: 900; }
.sales-customer-row h3 { margin: 0; font-size: 15px; }
.sales-customer-row p { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sales-customer-row dl { display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 14px; margin: 0; }
.sales-customer-row dl > div { display: grid; gap: 4px; }
.sales-customer-row dt { color: var(--muted); font-size: 9px; }
.sales-customer-row dd { margin: 0; font-size: 10px; font-weight: 800; }
.sales-customer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.sales-conversion { display: flex; align-items: center; gap: 6px; }
.sales-conversion select { min-height: 38px; max-width: 160px; border: 1px solid var(--line-strong); border-radius: 9px; background: white; padding: 0 9px; font-size: 10px; }
.sales-search { display: grid; width: min(300px, 45vw); gap: 5px; }
.sales-empty { display: grid; min-height: 130px; place-content: center; gap: 5px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); padding: 22px; text-align: center; }
.sales-empty strong { color: var(--ink); }
.sales-empty p { margin: 0; font-size: 11px; }
.sales-review-actions { margin: -13px 14px 0; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--surface-2); padding: 10px 12px; }
.sales-staff-list article { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); padding: 13px 0; }
.sales-staff-list article > div { display: grid; gap: 3px; }
.sales-staff-list small { color: var(--copper); font-size: 9px; font-weight: 900; }
.sales-staff-list strong { font-size: 14px; }
.sales-staff-list p { margin: 0; color: var(--muted); font-size: 10px; }
.sales-staff-list em { border-radius: 999px; background: #e8f3e6; color: #2d6337; padding: 6px 9px; font-size: 9px; font-style: normal; font-weight: 900; }
.sales-staff-list em.is-disabled { background: #fbe8e4; color: #8b3d32; }

@media (max-width: 900px) {
  .sales-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-customer-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .sales-customer-row dl { display: none; }
}

@media (max-width: 760px) {
  .sales-mobile-tabs { display: flex; position: sticky; z-index: 6; top: var(--mobile-header); overflow-x: auto; gap: 6px; margin: -7px -14px 14px; border-bottom: 1px solid var(--line); background: rgb(242 239 230 / 96%); padding: 9px 14px; scrollbar-width: none; }
  .sales-mobile-tabs::-webkit-scrollbar { display: none; }
  .sales-mobile-tabs button { min-height: 38px; flex: 0 0 auto; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 0 13px; font-size: 10px; font-weight: 800; }
  .sales-mobile-tabs button.is-active { border-color: var(--ink); background: var(--ink); color: var(--acid); }
  .sales-page { gap: 16px; }
  .sales-page-head { min-height: 0; align-items: flex-start; flex-direction: column; gap: 14px; padding: 4px 0 16px; }
  .sales-page-head h2 { font-size: 36px; }
  .sales-page-head > span { align-self: flex-start; }
  .sales-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 12px; }
  .sales-metrics article { min-height: 108px; padding: 14px; }
  .sales-policy-strip { display: grid; gap: 7px; }
  .sales-policy-strip span { border-left: 0; padding-left: 0; }
  .sales-visit-card { gap: 13px; border-radius: 3px 12px 12px 3px; padding: 14px; }
  .sales-visit-card > header { display: grid; }
  .sales-state { justify-self: start; }
  .sales-checkin-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-visit-card > footer, .sales-checkin-panel footer, .sales-result-form footer, .sales-editor > footer { align-items: stretch; flex-direction: column; }
  .sales-visit-card button, .sales-visit-card a.secondary-action, .sales-editor > footer button, .sales-review-actions button { min-height: 46px; justify-content: center; text-align: center; }
  .sales-editor { border-radius: 12px; padding: 14px; }
  .sales-editor > header { align-items: stretch; flex-direction: column; }
  .sales-form-grid { grid-template-columns: 1fr; }
  .sales-form-grid label.is-wide { grid-column: auto; }
  .sales-form-grid input, .sales-form-grid select { min-height: 48px; }
  .sales-section-title { align-items: stretch; flex-direction: column; }
  .sales-search { width: 100%; }
  .sales-customer-row { grid-template-columns: 40px minmax(0, 1fr); }
  .sales-customer-actions { grid-column: 1 / -1; align-items: stretch; flex-direction: column; }
  .sales-customer-actions > button { min-height: 44px; }
  .sales-conversion { align-items: stretch; flex-direction: column; }
  .sales-conversion select, .sales-conversion button { width: 100%; max-width: none; min-height: 44px; }
  .sales-customer-mark { width: 40px; height: 40px; }
  .sales-review-actions { margin-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
