* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --brand: #14756c;
  --brand-strong: #0a574f;
  --brand-soft: #e2f2ee;
  --brand-faint: #f2f8f6;
  --blue: #315fd6;
  --blue-soft: #edf2ff;
  --amber: #b86f16;
  --amber-soft: #fff5e6;
  --coral: #d6604f;
  --coral-soft: #fff0ed;
  --red: #cf3f4f;
  --red-soft: #fff0f2;
  --green: #278052;
  --green-soft: #eaf7f0;
  --ink: #182620;
  --ink-2: #43534c;
  --muted: #74827c;
  --line: #dfe7e3;
  --line-strong: #cfdad5;
  --bg: #f2f5f3;
  --surface: #ffffff;
  --side: #fbfcfc;
  --shadow: 0 1px 2px rgba(24, 38, 32, 0.04), 0 7px 20px rgba(24, 38, 32, 0.035);
  --shadow-raised: 0 2px 4px rgba(24, 38, 32, 0.045), 0 12px 28px rgba(24, 38, 32, 0.055);
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #cde9e3;
  color: var(--brand-strong);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex: 0 0 232px;
  flex-direction: column;
  width: 232px;
  height: 100vh;
  background: var(--side);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 28px rgba(24, 38, 32, 0.025);
  transition: width 0.18s ease, transform 0.18s ease;
}

.brand {
  display: flex;
  align-items: center;
  min-height: 72px;
  padding: 14px 18px;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.brand-mark {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: inset 0 -3px 0 #d9a03a, 0 6px 16px rgba(20, 117, 108, 0.2);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.brand-copy strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.side nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

.nav-section {
  padding: 14px 10px 6px;
  color: #92a099;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.side nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 2px 0;
  padding: 9px 10px;
  gap: 10px;
  border-radius: 7px;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.side nav a:hover {
  background: #edf3f0;
  color: var(--ink);
}

.side nav a.active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  box-shadow: inset 3px 0 0 var(--brand);
}

.side nav a.active svg {
  color: var(--brand);
  stroke-width: 2.25;
}

.side nav svg,
.side-action svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.side-action {
  padding: 12px;
  border-top: 1px solid var(--line);
}

.side-btn {
  width: 100%;
  justify-content: center;
  white-space: nowrap;
}

.side-foot {
  display: flex;
  align-items: center;
  padding: 0 18px 14px;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
}

.status-dot {
  display: inline-block;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2fa866;
  box-shadow: 0 0 0 3px #dff4e8;
}

.main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 64px;
  padding: 0 24px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(24, 38, 32, 0.025);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.topbar-left,
.topbar-right,
.account,
.logout {
  display: flex;
  align-items: center;
}

.topbar-left {
  min-width: 0;
  gap: 12px;
}

.topbar h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.page-context {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.page-context:empty {
  display: none;
}

.topbar-right {
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.account {
  gap: 8px;
}

.logout {
  gap: 6px;
  color: var(--ink-2);
  font-weight: 600;
}

.logout:hover {
  color: var(--brand);
}

.logout svg,
.icon-btn svg,
.btn svg,
.flash svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.content {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 24px 34px;
}

.scrim {
  display: none;
}

.burger {
  display: none;
}

.btn {
  display: inline-flex;
  min-height: 36px;
  padding: 8px 14px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(20, 117, 108, 0.16);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  box-shadow: 0 7px 18px rgba(20, 117, 108, 0.22);
  transform: translateY(-1px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 117, 108, 0.14);
}

.btn.gray,
.btn.secondary {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(24, 38, 32, 0.04);
}

.btn.gray:hover,
.btn.secondary:hover {
  background: var(--brand-faint);
  border-color: #a9c8bf;
  color: var(--ink);
  box-shadow: 0 5px 14px rgba(24, 38, 32, 0.07);
}

.btn.danger {
  background: #fff;
  border-color: #fecaca;
  color: var(--red);
  box-shadow: none;
}

.btn.danger:hover {
  background: var(--red-soft);
  border-color: #fca5a5;
}

.btn.small {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
}

.icon-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(24, 38, 32, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--brand-faint);
  border-color: #a9c8bf;
  color: var(--brand-strong);
}

.card {
  margin-bottom: 16px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card-title,
.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 1.35;
}

.section-head h2::before {
  width: 3px;
  height: 16px;
  border-radius: 2px;
  background: var(--brand);
  content: "";
}

.section-head p {
  margin-top: 3px;
}

.toolbar,
.page-actions,
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar,
.page-actions {
  margin-bottom: 16px;
}

.toolbar .grow,
.page-actions .grow {
  flex: 1;
}

.page-actions {
  justify-content: space-between;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #edf2f0;
  box-shadow: inset 0 1px 2px rgba(24, 38, 32, 0.04);
}

.segmented a,
.segmented button {
  display: inline-flex;
  min-height: 30px;
  padding: 5px 11px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.segmented a.active,
.segmented a.on,
.segmented button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 9px rgba(20, 117, 108, 0.2);
}

.stat-row,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-row {
  margin-bottom: 16px;
}

.stat-box,
.metric-card {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-raised);
}

.stat-box .big,
.metric-value {
  color: var(--ink);
  font-size: 28px;
  font-weight: 750;
  line-height: 1.15;
}

.stat-box .label,
.metric-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.metric-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--brand);
  content: "";
}

.metric-card:nth-child(1)::before {
  background: var(--green);
}

.metric-card:nth-child(3)::before {
  background: var(--blue);
}

.metric-card:nth-child(4)::before {
  background: var(--amber);
}

.metric-card:nth-child(1) .metric-value {
  color: var(--green);
}

.metric-card:nth-child(2) .metric-value {
  color: var(--brand-strong);
}

.metric-card:nth-child(3) .metric-value {
  color: var(--blue);
}

.metric-card:nth-child(4) .metric-value {
  color: var(--amber);
}

.metric-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  border: 1px solid #cce6e0;
  background: var(--brand-soft);
  color: var(--brand);
}

.metric-icon.blue {
  border-color: #d6e0ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.metric-icon.amber {
  border-color: #f2ddbb;
  background: var(--amber-soft);
  color: var(--amber);
}

.metric-icon.green {
  border-color: #cee9da;
  background: var(--green-soft);
  color: var(--green);
}

.metric-icon svg {
  width: 19px;
  height: 19px;
}

.metric-value {
  font-size: 25px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.num {
  color: var(--brand);
  font-size: 17px;
  font-weight: 750;
}

.plus {
  color: var(--green);
  font-weight: 750;
}

.tag,
.pill,
.badge {
  display: inline-flex;
  min-height: 24px;
  padding: 3px 9px;
  align-items: center;
  border: 1px solid #bfe4ce;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.tag.none,
.pill.none,
.badge.warning {
  border-color: #f1d2a6;
  background: var(--amber-soft);
  color: var(--amber);
}

.badge.neutral {
  border-color: var(--line);
  background: #f5f8f6;
  color: var(--ink-2);
}

.flash,
.notice {
  display: flex;
  margin-bottom: 16px;
  padding: 12px 14px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #bfe4ce;
  border-radius: 7px;
  background: var(--green-soft);
  color: #21643f;
  font-size: 13px;
  line-height: 1.6;
}

.notice {
  border-color: #c8d6fa;
  background: var(--blue-soft);
  color: #294ba9;
}

.notice.warning {
  border-color: #fed7aa;
  background: var(--amber-soft);
  color: #92400e;
}

input,
select {
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(24, 38, 32, 0.035);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input:hover,
select:hover {
  border-color: #b8c8c1;
}

input::placeholder {
  color: #a5afbd;
}

label {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
}

.field {
  margin-bottom: 16px;
}

.field-hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.form-actions {
  padding-top: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: #f3f7f5;
  color: #65746d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f5faf8;
}

.table-wrap {
  overflow-x: auto;
}

.empty-state {
  padding: 34px 18px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}

.empty-state h3 {
  font-size: 14px;
}

.empty-state p {
  margin: 4px 0 14px;
}

.share-panel {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.share-panel img {
  width: 112px;
  height: 112px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(24, 38, 32, 0.08);
}

.share-copy h3 {
  margin-bottom: 4px;
  font-size: 14px;
}

.share-actions {
  display: flex;
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.assignment-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.assignment-row select {
  width: auto;
  min-width: 150px;
  margin: 0;
}

.entity-card {
  padding: 0;
  overflow: hidden;
}

.entity-head {
  display: flex;
  padding: 17px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.entity-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.entity-title .avatar {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  border: 1px solid #cce6e0;
  background: var(--brand-soft);
  color: var(--brand);
}

.entity-title h2 {
  font-size: 15px;
}

.entity-title p {
  margin-top: 2px;
}

.entity-body {
  padding: 18px;
}

.entity-topline {
  display: flex;
  margin-bottom: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sub-list {
  display: flex;
  margin-top: 8px;
  gap: 7px;
  flex-wrap: wrap;
}

.sub-list .w,
.person-chip,
.chk {
  display: inline-flex;
  min-height: 34px;
  padding: 6px 9px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(24, 38, 32, 0.025);
}

.sub-list a {
  color: var(--brand);
  font-weight: 700;
}

.chk {
  cursor: pointer;
}

.chk:has(input:checked) {
  border-color: #94cfc4;
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.chk input {
  width: 15px;
  min-height: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.task-card {
  display: flex;
  padding: 15px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #f0d2a7;
  border-left: 3px solid #d88b26;
  border-radius: 7px;
  background: #fffaf2;
  box-shadow: 0 5px 16px rgba(184, 111, 22, 0.06);
}

.task-card strong {
  display: block;
  font-size: 13px;
}

.task-card p {
  margin-top: 3px;
}

.create-layout {
  align-items: stretch;
}

.create-result-guide {
  margin-bottom: 16px;
}

.purpose-list {
  display: grid;
  gap: 18px;
}

.purpose-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
}

.purpose-row + .purpose-row {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.purpose-row strong {
  display: block;
  margin: 2px 0 3px;
  font-size: 14px;
}

.purpose-kicker {
  display: inline-flex;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.purpose-row.data .purpose-kicker,
.data-delivery .purpose-kicker {
  color: var(--blue);
}

.compact-notice {
  margin: 20px 0 0;
  padding: 10px 12px;
  font-size: 12px;
}

.detail-actions {
  margin-bottom: 14px;
}

.created-banner {
  display: flex;
  margin-bottom: 16px;
  padding: 15px 17px;
  align-items: center;
  gap: 12px;
  border: 1px solid #bfe4ce;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--green-soft);
  color: #215d3d;
}

.created-banner strong {
  display: block;
  color: #174c31;
  font-size: 14px;
}

.created-banner p {
  margin-top: 2px;
  font-size: 12px;
}

.created-icon {
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--green);
}

.created-icon svg {
  width: 20px;
  height: 20px;
}

.profile-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.profile-metrics {
  display: flex;
  align-items: center;
  gap: 26px;
}

.profile-metrics span {
  display: flex;
  min-width: 74px;
  flex-direction: column;
  align-items: flex-end;
}

.profile-metrics b {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.profile-metrics small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.delivery-jump {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
  gap: 8px;
}

.delivery-jump a {
  display: flex;
  min-height: 46px;
  padding: 9px 12px;
  align-items: center;
  gap: 9px;
  border: 1px solid #cfe5da;
  border-radius: 8px;
  background: var(--green-soft);
  color: #21643f;
  font-size: 12px;
  font-weight: 800;
}

.delivery-jump a.data {
  border-color: #d6e0ff;
  background: var(--blue-soft);
  color: #294ba9;
}

.delivery-jump svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.delivery-jump span,
.delivery-jump small {
  display: block;
}

.delivery-jump small {
  margin-bottom: 1px;
  opacity: .75;
  font-size: 10px;
}

.delivery-jump a:focus-visible,
.advanced-actions > summary:focus-visible,
.link-security > summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 117, 108, 0.14);
}

.delivery-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-top: 3px solid var(--green);
  scroll-margin-top: 78px;
}

.delivery-card.data-delivery {
  border-top-color: var(--blue);
}

.delivery-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.delivery-head h2 {
  margin: 2px 0 4px;
  font-size: 16px;
}

.delivery-head p {
  color: var(--muted);
  font-size: 12px;
}

.delivery-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #cee9da;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.delivery-icon.data {
  border-color: #d6e0ff;
  background: var(--blue-soft);
  color: var(--blue);
}

.delivery-icon svg {
  width: 20px;
  height: 20px;
}

.delivery-preview {
  display: grid;
  min-height: 278px;
  margin: 18px 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.card-preview img {
  width: 228px;
  max-width: calc(100% - 24px);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 7px 22px rgba(24, 38, 32, 0.09);
}

.dashboard-preview {
  grid-template-columns: 156px minmax(0, 1fr);
  min-height: 278px;
  padding: 22px;
  gap: 20px;
  background: var(--blue-soft);
}

.dashboard-preview img {
  width: 156px;
  height: 156px;
  border: 8px solid #fff;
  border-radius: 8px;
  box-shadow: 0 7px 22px rgba(49, 95, 214, 0.12);
}

.dashboard-preview-copy strong,
.dashboard-preview-copy span {
  display: block;
}

.dashboard-preview-copy strong {
  color: #244aa9;
  font-size: 14px;
}

.dashboard-preview-copy span {
  margin-top: 5px;
  color: #53668f;
  font-size: 12px;
  line-height: 1.6;
}

.delivery-actions {
  display: flex;
  margin-top: auto;
  gap: 8px;
  flex-wrap: wrap;
}

.data-btn {
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 5px 14px rgba(49, 95, 214, 0.16);
}

.data-btn:hover {
  border-color: #244aa9;
  background: #244aa9;
  box-shadow: 0 7px 18px rgba(49, 95, 214, 0.22);
}

.advanced-actions {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.advanced-actions > summary {
  display: flex;
  min-height: 48px;
  padding: 12px 16px;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.advanced-actions > summary::-webkit-details-marker {
  display: none;
}

.advanced-actions > summary svg {
  width: 16px;
  height: 16px;
}

.advanced-actions > summary .chevron {
  margin-left: auto;
  transition: transform 0.15s ease;
}

.advanced-actions[open] > summary .chevron {
  transform: rotate(180deg);
}

.advanced-body {
  display: flex;
  padding: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  background: #fffafa;
}

.inline-hint {
  margin: 0;
}

.share-kind {
  display: inline-flex;
  min-height: 24px;
  margin-bottom: 7px;
  padding: 3px 8px;
  align-items: center;
  gap: 5px;
  border: 1px solid #d6e0ff;
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.share-kind svg {
  width: 13px;
  height: 13px;
}

.share-kind.compact {
  margin: 0;
  white-space: nowrap;
}

.link-security {
  margin-top: 12px;
  font-size: 12px;
}

.link-security > summary {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.link-security form {
  margin-top: 8px;
}

.people-section,
.assignment-form {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.person-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.person-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  min-height: 60px;
  padding: 10px 12px;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.person-row + .person-row {
  border-top: 1px solid var(--line);
}

.person-row:hover {
  background: var(--brand-faint);
}

.person-identity,
.person-actions {
  display: flex;
  align-items: center;
}

.person-identity {
  min-width: 0;
  gap: 9px;
}

.person-identity > span:last-child,
.person-identity strong,
.person-identity small {
  display: block;
}

.person-identity strong {
  color: var(--ink);
  font-size: 13px;
}

.person-identity small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.person-avatar {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: var(--brand-soft);
  color: var(--brand);
}

.person-avatar svg {
  width: 15px;
  height: 15px;
}

.person-actions {
  gap: 7px;
}

.assignment-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.assignment-options .chk {
  width: 100%;
  align-items: flex-start;
}

.assignment-options .chk > span,
.assignment-options .chk strong,
.assignment-options .chk small {
  display: block;
}

.assignment-options .chk small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.selection-count {
  min-width: 86px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.danger-zone {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #fecaca;
}

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

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 7px;
  background: #173d37;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.guest-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background: #edf3f0;
}

.guest-shell > .flash {
  position: fixed;
  top: 20px;
}

.login-card {
  width: min(400px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(24, 38, 32, 0.12);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.login-brand h1 {
  font-size: 18px;
}

.login-brand p {
  color: var(--muted);
  font-size: 11px;
}

.login-copy {
  margin: 26px 0 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.login-copy h2 {
  font-size: 17px;
}

.login-copy p {
  margin-top: 4px;
}

.login-foot {
  margin-top: 18px;
  color: #92a099;
  font-size: 11px;
  text-align: center;
}

body.collapsed .side {
  flex-basis: 72px;
  width: 72px;
}

body.collapsed .brand {
  justify-content: center;
  padding-inline: 10px;
}

body.collapsed .brand-copy,
body.collapsed .nav-section,
body.collapsed .side nav a span,
body.collapsed .side-action span,
body.collapsed .side-foot span:last-child {
  display: none;
}

body.collapsed .side nav a {
  justify-content: center;
  padding-inline: 0;
}

@media (max-width: 980px) {
  .metric-grid,
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }

  .delivery-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .side,
  body.collapsed .side {
    position: fixed;
    left: 0;
    width: 232px;
    transform: translateX(-100%);
  }

  body.nav-open .side {
    transform: translateX(0);
    box-shadow: 18px 0 40px rgba(24, 38, 32, 0.2);
  }

  body.collapsed .brand-copy,
  body.collapsed .nav-section,
  body.collapsed .side nav a span,
  body.collapsed .side-action span,
  body.collapsed .side-foot span:last-child {
    display: flex;
  }

  body.collapsed .nav-section {
    display: block;
  }

  body.collapsed .side nav a {
    justify-content: flex-start;
    padding-inline: 10px;
  }

  .scrim {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(24, 38, 32, 0.48);
  }

  body.nav-open .scrim {
    display: block;
  }

  .burger {
    display: inline-grid;
  }

  .content {
    padding: 18px;
  }

  .topbar {
    padding: 0 18px;
  }
}

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

  .topbar {
    min-height: 58px;
    padding: 0 14px;
  }

  .topbar h1 {
    font-size: 16px;
  }

  .account span:last-child,
  .logout span {
    display: none;
  }

  .topbar-right {
    gap: 10px;
  }

  .card {
    padding: 15px;
  }

  .metric-grid,
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card,
  .stat-box {
    padding: 12px;
  }

  .metric-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
  }

  .metric-value,
  .stat-box .big {
    font-size: 22px;
  }

  .page-actions,
  .toolbar {
    align-items: stretch;
  }

  .page-actions > *,
  .filter-bar,
  .filter-bar input,
  .filter-bar select {
    width: 100% !important;
  }

  .action-group {
    width: 100%;
  }

  .action-group .btn {
    flex: 1;
  }

  .segmented {
    width: 100%;
  }

  .segmented a {
    flex: 1;
  }

  .share-panel {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
  }

  .share-panel img {
    width: 84px;
    height: 84px;
  }

  .entity-head,
  .entity-body {
    padding: 14px;
  }

  .entity-head {
    align-items: flex-start;
  }

  .inline-hint {
    width: 100%;
  }

  .person-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .person-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .person-actions .btn {
    flex: 1;
  }

  .assignment-options {
    grid-template-columns: 1fr;
  }

  .profile-summary,
  .advanced-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-metrics {
    width: 100%;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }

  .profile-metrics span {
    align-items: flex-start;
  }

  .delivery-preview {
    min-height: auto;
    padding: 16px;
  }

  .card-preview img {
    width: 190px;
  }

  .dashboard-preview {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 190px;
    padding: 16px;
    gap: 14px;
  }

  .dashboard-preview img {
    width: 112px;
    height: 112px;
    border-width: 6px;
  }

  .delivery-actions .btn {
    flex: 1 1 100%;
  }

  .task-card {
    align-items: flex-start;
    flex-direction: column;
  }

  th,
  td {
    padding: 10px 8px;
  }

  .hide-mobile {
    display: none;
  }
}
