:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --line: #e5e7eb;
  --ink: #111827;
  --muted: #6b7280;
  --accent: #123f4a;
  --accent-2: #b45309;
  --danger: #b42318;
  --soft: #eef4f5;
  --shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  border-radius: 6px;
  padding: 9px 13px;
  cursor: pointer;
}

button.secondary {
  background: white;
  color: var(--accent);
}

button:hover {
  filter: brightness(0.97);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  filter: none;
}

a.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 9px 13px;
  text-decoration: none;
  white-space: nowrap;
}

a.button-link:hover {
  filter: brightness(0.97);
}

a.button-link.secondary {
  background: white;
  color: var(--accent);
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-brand,
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.auth-brand span,
.brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.brand span img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: inherit;
}

.auth-brand h1,
.auth-brand p,
.brand strong,
.brand small {
  margin: 0;
}

.auth-brand p,
.brand small,
.topbar p,
.panel-head span {
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0 14px;
}

.auth-tab {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.auth-tab.active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

.auth-form,
.form-grid {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.check-row input {
  width: auto;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px;
  min-width: 0;
}

textarea {
  resize: vertical;
}

.form-error {
  color: var(--danger);
  min-height: 20px;
}

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

.sidebar {
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

nav {
  display: grid;
  gap: 14px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-title {
  margin: 8px 0 4px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav-admin-group {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.nav,
.logout {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
}

.nav:hover {
  background: var(--soft);
  border-color: var(--line);
  color: var(--accent);
}

.nav.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.logout {
  margin-top: auto;
  color: var(--danger);
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.topbar h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
}

.collector-home-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #d6e2e5;
  border-radius: 8px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #eef4f5 100%);
  box-shadow: 0 10px 26px rgba(18, 63, 74, 0.08);
}

.collector-home-copy {
  min-width: 0;
}

.collector-home-copy h3 {
  margin: 4px 0 6px;
  font-size: 20px;
}

.collector-home-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.collector-home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.collector-home-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.82);
  color: #374151;
  font-size: 13px;
}

.collector-home-meta code {
  color: var(--accent);
  font-family: inherit;
  font-weight: 700;
}

.collector-home-action {
  min-width: 128px;
  min-height: 42px;
  font-weight: 700;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric b {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  color: var(--accent);
}

.panel {
  padding: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 17px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.panel-actions select {
  min-width: 190px;
}

.reminder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.reminder-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  padding: 14px;
}

.reminder-card:hover {
  border-color: var(--accent);
  filter: none;
}

.reminder-name {
  font-weight: 700;
}

.reminder-status {
  justify-self: end;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
}

.reminder-status.connected {
  color: var(--accent);
}

.reminder-status.error {
  color: var(--danger);
  background: #fef3f2;
}

.reminder-status.stale {
  color: var(--accent-2);
  background: #fff7ed;
}

.reminder-card strong {
  font-size: 30px;
  color: var(--accent);
  line-height: 1;
}

.reminder-card small {
  color: var(--muted);
}

.business-reminder-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.business-reminder-card,
.business-reminder-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.business-reminder-card {
  display: grid;
  gap: 10px;
  text-align: left;
  color: var(--ink);
}

.business-reminder-card:hover {
  border-color: var(--accent);
  filter: none;
}

.business-reminder-card h4 {
  margin: 0;
  font-size: 16px;
}

.business-reminder-card p {
  margin: 0;
  color: #374151;
  line-height: 1.55;
}

.business-reminder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.business-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.business-reminder-actions button {
  min-height: 34px;
  padding: 7px 10px;
}

.business-reminder-empty {
  color: var(--muted);
  line-height: 1.6;
}

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

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

.span-2 {
  grid-column: 1 / -1;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

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

th {
  color: var(--muted);
  font-weight: 600;
  background: #f9fafb;
}

td code {
  font-size: 12px;
}

.tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 12px;
}

.tag.warn {
  color: var(--accent-2);
  background: #fff7ed;
}

.json-box {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  overflow: auto;
  max-height: 360px;
  white-space: pre-wrap;
}

.guard-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.collector-download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: var(--soft);
}

.collector-download p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.compact-steps {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.diagnostics {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.diagnostic-line {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #f9fafb;
}

.provider-admin {
  display: flex;
  gap: 24px;
  align-items: start;
}

.provider-admin > div:first-child {
  flex: 0 0 280px;
  max-width: 280px;
}

.provider-admin > form {
  flex: 1 1 auto;
  min-width: 0;
}

.provider-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.provider-card {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 6px;
}

.provider-card.active {
  border-color: var(--accent);
  background: var(--soft);
}

.provider-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.provider-card strong {
  overflow-wrap: anywhere;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}

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

.ocr-hero-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.ocr-method-strip {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ocr-method-strip span {
  border: 1px solid #d9e3e5;
  border-radius: 999px;
  background: #f7fbfb;
  color: var(--accent);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.ocr-hero-panel h3,
.ocr-hero-panel p {
  margin: 0;
}

.ocr-hero-panel h3 {
  margin-top: 6px;
  font-size: 22px;
}

.ocr-hero-panel p {
  margin-top: 8px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.ocr-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: start;
}

.ocr-left,
.ocr-right {
  display: grid;
  gap: 16px;
}

.ocr-form {
  display: grid;
  gap: 14px;
}

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

.ocr-drop-zone {
  min-height: 260px;
  border: 1.5px dashed #b8c5ca;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdfd 0%, #f4f9f9 100%);
  display: grid;
  place-items: center;
  gap: 9px;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.ocr-drop-zone strong {
  color: var(--ink);
  font-size: 17px;
}

.ocr-drop-zone.dragging,
.ocr-drop-zone:focus,
.ocr-drop-zone.recognizing {
  border-color: var(--accent);
  background: #eef6f7;
  box-shadow: 0 0 0 3px rgba(18, 63, 74, 0.08);
  outline: none;
}

.ocr-drop-zone.has-preview {
  border-style: solid;
}

.ocr-drop-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin: 2px 0 4px;
}

.ocr-drop-hint span {
  border: 1px solid #d9e3e5;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 12px;
}

.ocr-drop-icon {
  width: 54px;
  height: 42px;
  border: 2px solid var(--accent);
  border-radius: 7px;
  position: relative;
  opacity: 0.9;
}

.ocr-drop-icon::before,
.ocr-drop-icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
}

.ocr-drop-icon::before {
  width: 18px;
  height: 2px;
  left: 17px;
  top: 18px;
}

.ocr-drop-icon::after {
  width: 2px;
  height: 18px;
  left: 25px;
  top: 10px;
}

.ocr-preview-panel img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.ocr-status-pill {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--muted);
  font-size: 12px;
  background: #f9fafb;
}

.ocr-status-pill.recognizing,
.ocr-status-pill.analyzing {
  color: var(--accent);
  border-color: #b8c5ca;
  background: #eef6f7;
}

.ocr-empty-state,
.ocr-mini-empty,
.ocr-loading-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
  padding: 22px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

.ocr-empty-state strong,
.ocr-loading-card strong {
  color: var(--ink);
}

.ocr-loading-card span {
  width: 26px;
  height: 26px;
  border: 3px solid #d8e2e4;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ocrSpin 1s linear infinite;
}

.ocr-empty-warning {
  border: 1px solid #f5d08a;
  background: #fff8e7;
  color: #7a4b00;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  font-size: 13px;
}

button.ocr-clear-button {
  border-color: #d9c6c2;
  background: #fffafa;
  color: #8a4b45;
}

.ocr-review-head {
  align-items: flex-start;
  gap: 16px;
}

.ocr-review-actions {
  margin-left: auto;
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: min(100%, 430px);
}

.ocr-action-tools,
.ocr-action-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ocr-action-tools button {
  padding: 7px 11px;
  border-color: #d9e3e5;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
}

.ocr-action-tools .ocr-clear-button {
  color: #8a4b45;
}

.ocr-action-flow {
  padding-top: 2px;
}

.ocr-action-flow #ocrSaveReviewBtn {
  min-width: 96px;
}

.ocr-action-flow #ocrAnalyzeBtn {
  min-width: 138px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(18, 63, 74, 0.12);
}

.ocr-message-editor {
  display: grid;
  gap: 12px;
}

.ocr-main-message-list,
.ocr-low-priority-list {
  display: grid;
  gap: 10px;
}

.ocr-section-empty {
  border: 1px dashed #cfdcdf;
  border-radius: 8px;
  background: #f8fbfb;
  color: var(--muted);
  padding: 14px;
  font-size: 13px;
}

.ocr-review-summary {
  border: 1px solid #d9e3e5;
  border-radius: 8px;
  background: #f7fbfb;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.ocr-review-summary strong {
  color: var(--ink);
}

.ocr-review-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: flex-end;
}

.ocr-message-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  display: grid;
  gap: 9px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
}

.ocr-message-card.low-priority {
  background: #fbfcfc;
  border-color: #dbe4e6;
}

.ocr-message-card.not-accepted:not(.low-priority) {
  border-color: #d9e3e5;
}

.ocr-message-card:focus-within {
  border-color: #b8c5ca;
  box-shadow: 0 0 0 3px rgba(18, 63, 74, 0.06);
}

.ocr-message-topline {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.ocr-seq {
  width: 38px;
  height: 34px;
  border-radius: 6px;
  background: var(--soft);
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
  flex: 0 0 auto;
}

.ocr-direction-field,
.ocr-sender-field,
.ocr-message-body-field,
.ocr-message-detail-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ocr-direction-field {
  width: 160px;
}

.ocr-sender-field {
  flex: 1 1 210px;
  min-width: 180px;
}

.ocr-message-body-field textarea {
  min-height: 64px;
  resize: vertical;
}

.ocr-message-topline select,
.ocr-message-topline input {
  min-height: 34px;
}

.ocr-remove-message {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.ocr-accepted {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid #d9e3e5;
  border-radius: 8px;
  background: #f8fbfb;
}

.ocr-message-card.is-accepted .ocr-accepted {
  border-color: #cfe4dc;
  background: #f3faf7;
  color: #1f6f54;
}

.ocr-message-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.ocr-message-details {
  border-top: 1px solid #eef2f3;
  padding-top: 6px;
}

.ocr-message-details summary,
.ocr-low-priority-panel > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  list-style: none;
}

.ocr-message-details summary::-webkit-details-marker,
.ocr-low-priority-panel > summary::-webkit-details-marker {
  display: none;
}

.ocr-message-details summary::before,
.ocr-low-priority-panel > summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--soft);
}

.ocr-message-details[open] summary::before,
.ocr-low-priority-panel[open] > summary::before {
  content: "-";
}

.ocr-message-details .detail-close-label,
.ocr-message-details[open] .detail-open-label {
  display: none;
}

.ocr-message-details[open] .detail-close-label {
  display: inline;
}

.ocr-message-detail-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 10px;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fbfb;
}

.ocr-message-detail-grid textarea {
  min-height: 56px;
  resize: vertical;
}

.ocr-low-priority-panel {
  border: 1px solid #d9e3e5;
  border-radius: 8px;
  background: #f7fbfb;
  padding: 10px 12px;
}

.ocr-low-priority-panel[open] {
  display: grid;
  gap: 10px;
}

.ocr-analysis-result {
  border: 1px solid #cfdcdf;
  border-radius: 8px;
  background: #f7fbfb;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.ocr-analysis-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.ocr-analysis-head strong {
  color: var(--ink);
}

.ocr-analysis-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ocr-analysis-grid span {
  border: 1px solid var(--line);
  background: white;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}

.ocr-analysis-grid span.active {
  color: var(--accent);
  border-color: #b8c5ca;
  background: #eef6f7;
}

.ocr-analysis-notes {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.ocr-analysis-notes strong {
  color: var(--ink);
}

.ocr-batch-list {
  display: grid;
  gap: 8px;
}

.ocr-batch-item {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.ocr-batch-item span {
  color: var(--muted);
  font-size: 12px;
}

.ocr-batch-item small {
  color: var(--muted);
  font-size: 11px;
}

.ocr-clear-backdrop {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: rgba(17, 24, 39, 0.32);
  display: grid;
  place-items: center;
  padding: 20px;
}

.ocr-clear-backdrop.open {
  animation: ocrGuideBackdropIn 240ms ease-out both;
}

.ocr-clear-backdrop.closing {
  animation: ocrGuideBackdropOut 220ms ease-in both;
}

.ocr-clear-modal {
  position: relative;
  width: min(460px, 100%);
  max-height: min(420px, 88vh);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.2);
  opacity: 0;
  padding: 22px;
  transform: scale(0.96);
  transform-origin: center;
}

.ocr-clear-backdrop.open .ocr-clear-modal {
  animation: ocrClearModalIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ocr-clear-backdrop.closing .ocr-clear-modal {
  animation: ocrClearModalOut 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ocr-clear-copy {
  display: grid;
  gap: 9px;
  padding-right: 28px;
}

.ocr-clear-copy h3 {
  margin: 0;
  font-size: 20px;
}

.ocr-clear-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ocr-clear-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: var(--line);
  background: white;
  color: var(--muted);
}

.ocr-clear-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

button.ocr-clear-confirm-button {
  border-color: #a64b42;
  background: #a64b42;
  color: white;
}

.ocr-analyze-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(17, 24, 39, 0.32);
  display: grid;
  place-items: center;
  padding: 20px;
}

.ocr-analyze-backdrop.open {
  animation: ocrGuideBackdropIn 240ms ease-out both;
}

.ocr-analyze-backdrop.closing {
  animation: ocrGuideBackdropOut 220ms ease-in both;
}

.ocr-analyze-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(880px, 92vw);
  max-height: 84vh;
  min-height: min(680px, 84vh);
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.2);
  opacity: 0;
  padding: 0;
  transform: scale(0.96);
  transform-origin: center;
}

.ocr-analyze-backdrop.open .ocr-analyze-modal {
  animation: ocrClearModalIn 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ocr-analyze-backdrop.closing .ocr-analyze-modal {
  animation: ocrClearModalOut 220ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.ocr-analyze-copy {
  display: grid;
  flex: 0 0 auto;
  gap: 9px;
  padding: 24px 60px 14px 24px;
}

.ocr-analyze-copy h3 {
  margin: 0;
  font-size: 22px;
}

.ocr-analyze-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ocr-analyze-preview-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 0 24px 18px;
}

.ocr-analyze-count,
.ocr-analyze-empty,
.ocr-analyze-more {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 12px;
}

.ocr-analyze-count {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 8px;
}

.ocr-analyze-count strong {
  color: var(--primary);
  font-size: 22px;
}

.ocr-analyze-count span,
.ocr-analyze-empty,
.ocr-analyze-more {
  color: var(--muted);
}

.ocr-analyze-empty {
  margin-bottom: 16px;
}

.ocr-chat-preview {
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  min-height: 280px;
  max-height: 58vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 1px solid #d8e5e6;
  border-radius: 8px;
  background: linear-gradient(180deg, #f4f8f7 0%, #eef5f3 100%);
}

.ocr-chat-preview::-webkit-scrollbar {
  width: 10px;
}

.ocr-chat-preview::-webkit-scrollbar-thumb {
  background: #c5d4d5;
  border: 3px solid #eef5f3;
  border-radius: 999px;
}

.ocr-chat-preview-row {
  display: flex;
  width: 100%;
}

.ocr-chat-row-self {
  justify-content: flex-end;
}

.ocr-chat-row-customer,
.ocr-chat-row-unknown {
  justify-content: flex-start;
}

.ocr-chat-bubble {
  max-width: min(72%, 540px);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.ocr-bubble-self {
  background: #dff4e7;
  border-color: #b8dfc6;
}

.ocr-bubble-customer,
.ocr-bubble-group_member {
  background: #ffffff;
  border-color: #d9e3e5;
}

.ocr-bubble-unknown {
  background: #f5f7f7;
  border-color: #d7dddf;
  color: #4b5563;
}

.ocr-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.ocr-bubble-meta small {
  color: var(--muted);
  font-weight: 600;
}

.ocr-bubble-quote {
  margin-bottom: 7px;
  border-left: 3px solid #b7d7c2;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.ocr-chat-bubble p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ocr-analyze-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.ocr-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: var(--line);
  background: white;
  color: var(--muted);
}

.ocr-guide-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(17, 24, 39, 0.44);
  display: grid;
  place-items: center;
  padding: 24px;
}

.ocr-guide-backdrop.open {
  animation: ocrGuideBackdropIn 240ms ease-out both;
}

.ocr-guide-backdrop.closing {
  animation: ocrGuideBackdropOut 240ms ease-in both;
}

.ocr-guide-modal {
  width: min(1080px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
  opacity: 0;
  padding: 20px;
  transform: translate(18px, -14px) scale(0.96);
  transform-origin: top right;
}

.ocr-guide-backdrop.open .ocr-guide-modal {
  animation: ocrGuideModalIn 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ocr-guide-backdrop.closing .ocr-guide-modal {
  animation: ocrGuideModalOut 260ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.ocr-guide-head h3 {
  margin: 6px 0 0;
  font-size: 21px;
}

.ocr-guide-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(420px, 1.22fr);
  gap: 18px;
}

.ocr-guide-copy,
.ocr-step-list,
.ocr-example-grid {
  display: grid;
  gap: 12px;
}

.ocr-step-list div {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.ocr-step-list strong {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: white;
}

.ocr-example-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.ocr-example-card strong {
  color: var(--ink);
}

.ocr-example-card.good {
  border-color: #b8c5ca;
  background: #f5faf9;
}

.ocr-example-card.bad {
  background: #fffafa;
}

.ocr-guide-animation {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fa;
  position: relative;
  overflow: hidden;
  padding: 16px;
}

.demo-chat-shell {
  position: absolute;
  inset: 16px 16px 104px;
  border: 1px solid #d9e0e2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.demo-browser-bar {
  height: 30px;
  border-bottom: 1px solid #e7eaee;
  background: #f4f6f8;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #9aa3af;
  font-size: 11px;
}

.demo-browser-bar span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d4dae0;
}

.demo-browser-bar em {
  margin-left: auto;
  font-style: normal;
}

.demo-chat-window {
  height: calc(100% - 30px);
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
}

.demo-contact-list {
  border-right: 1px solid #e7eaee;
  background: #f8fafb;
  padding: 12px 9px;
  display: grid;
  align-content: start;
  gap: 9px;
  color: #9aa3af;
  font-size: 11px;
}

.demo-contact-list span {
  height: 28px;
  border-radius: 7px;
  background: #e9edf1;
}

.demo-contact-list em {
  font-style: normal;
}

.demo-conversation {
  position: relative;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 34px;
  min-width: 0;
  background: #fffdf8;
}

.demo-chat-header {
  border-bottom: 1px solid #e7eaee;
  background: #ffffff;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px 12px;
}

.demo-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #d9f1ef;
  color: var(--accent);
  font-weight: 800;
}

.demo-chat-header strong,
.demo-chat-header small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-chat-header strong {
  color: var(--ink);
  font-size: 12px;
}

.demo-chat-header small {
  color: var(--muted);
  font-size: 10px;
}

.demo-message-area {
  position: relative;
  padding: 10px 12px 8px;
  overflow: hidden;
}

.demo-message-area::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 22px;
  width: 4px;
  height: 92px;
  border-radius: 999px;
  background: #d7dce2;
}

.demo-date-pill {
  width: max-content;
  margin: 0 auto 8px;
  border: 1px solid #e6eaef;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  padding: 3px 9px;
  font-size: 10px;
}

.demo-bubble {
  width: max-content;
  max-width: 72%;
  border-radius: 8px;
  padding: 7px 9px;
  margin-bottom: 7px;
  font-size: 11px;
  line-height: 1.35;
  box-shadow: 0 2px 5px rgba(17, 24, 39, 0.04);
}

.demo-bubble strong {
  display: block;
  margin-bottom: 2px;
  color: #4f46e5;
  font-size: 10px;
}

.demo-bubble.left {
  background: #ffffff;
  border: 1px solid #e8ecef;
}

.demo-bubble.right {
  background: #d8f6d2;
  margin-left: auto;
}

.demo-bubble.small {
  max-width: 58%;
}

.demo-quote {
  width: 58%;
  margin-left: auto;
  margin-bottom: 6px;
  border-left: 3px solid #9ad0a1;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 10px;
}

.demo-input-bar {
  border-top: 1px solid #e7eaee;
  background: #ffffff;
  color: #9aa3af;
  font-size: 11px;
  padding: 9px 12px;
}

.demo-crop-box {
  position: absolute;
  left: 7px;
  top: 7px;
  right: 18px;
  bottom: 42px;
  box-sizing: border-box;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: rgba(18, 63, 74, 0.055);
  box-shadow: 0 0 0 999px rgba(17, 24, 39, 0.08);
  animation: ocrCrop 7.2s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}

.demo-crop-box::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 2px;
  border-radius: 0 0 8px 8px;
  background: var(--accent);
}

.demo-crop-box span {
  position: absolute;
  left: 10px;
  top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d9e3e5;
  color: var(--accent);
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
}

.demo-cursor {
  position: absolute;
  width: 16px;
  height: 16px;
  border-left: 9px solid #111827;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  left: 10px;
  top: 10px;
  transform: rotate(-12deg);
  animation: ocrCursor 7.2s ease-in-out infinite;
}

.demo-upload-card {
  position: absolute;
  left: 26px;
  bottom: 18px;
  width: 172px;
  min-height: 66px;
  border-radius: 8px;
  background: white;
  border: 1px solid #d9e0e2;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
  color: var(--accent);
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.12);
  animation: ocrCardFly 7.2s ease-in-out infinite;
  z-index: 5;
}

.demo-upload-card strong,
.demo-upload-card span {
  display: block;
}

.demo-upload-card span {
  color: var(--muted);
  font-size: 12px;
}

.demo-result-list {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: min(290px, calc(100% - 230px));
  display: grid;
  gap: 7px;
  opacity: 0;
  animation: ocrResultFade 7.2s ease-in-out infinite;
  z-index: 6;
}

.demo-result-list span {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 11px;
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

.demo-result-list b {
  color: var(--accent);
}

@keyframes ocrGuideBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ocrGuideBackdropOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes ocrGuideModalIn {
  from { opacity: 0; transform: translate(18px, -14px) scale(0.96); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}

@keyframes ocrGuideModalOut {
  from { opacity: 1; transform: translate(0, 0) scale(1); }
  to { opacity: 0; transform: translate(18px, -14px) scale(0.96); }
}

@keyframes ocrClearModalIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ocrClearModalOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.96); }
}

@keyframes ocrSpin {
  to { transform: rotate(360deg); }
}

@keyframes ocrCursor {
  0%, 10% { left: 118px; top: 48px; }
  28%, 100% { left: calc(100% - 34px); top: 306px; }
}

@keyframes ocrCrop {
  0%, 12% { opacity: 0; transform: scale(0.96); }
  25%, 58% { opacity: 1; transform: scale(1); }
  68%, 100% { opacity: 0; transform: scale(0.99); }
}

@keyframes ocrCardFly {
  0%, 46% { opacity: 0; transform: translate(118px, -198px) scale(0.82); }
  58%, 74% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(70px, 0) scale(0.94); }
}

@keyframes ocrResultFade {
  0%, 68% { opacity: 0; transform: translateY(10px); }
  82%, 100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ocr-guide-backdrop.open,
  .ocr-guide-backdrop.closing,
  .ocr-guide-backdrop.open .ocr-guide-modal,
  .ocr-guide-backdrop.closing .ocr-guide-modal,
  .ocr-clear-backdrop.open,
  .ocr-clear-backdrop.closing,
  .ocr-clear-backdrop.open .ocr-clear-modal,
  .ocr-clear-backdrop.closing .ocr-clear-modal {
    animation-duration: 1ms;
  }
}

.platform-label {
  display: inline-grid;
  gap: 3px;
  min-width: 0;
}

.platform-label > span {
  color: #18324f;
  font-weight: 650;
}

.platform-label code,
.platform-id-detail code,
.platform-raw-detail code {
  color: #60758d;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.platform-admin-table,
.platform-audit-table {
  min-width: 1080px;
}

.platform-admin-table td,
.platform-audit-table td,
.platform-role-table td {
  vertical-align: top;
}

.platform-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 270px;
}

.platform-inline-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #586b82;
  font-size: 12px;
}

.platform-inline-field select {
  min-width: 210px;
}

.platform-permission-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform-permission-list li {
  padding: 7px 9px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.platform-id-detail summary,
.platform-raw-detail summary {
  color: #255b8f;
  cursor: pointer;
}

.platform-id-detail > code {
  display: block;
  max-width: 260px;
  margin-top: 7px;
  padding: 7px;
  border-radius: 6px;
  background: #f4f7fa;
}

.platform-audit-summary {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid #dbe7f2;
  border-radius: 8px;
  color: #40566f;
  background: #f6f9fc;
}

.platform-count {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #1f5b83;
  background: #e9f4fb;
  font-size: 11px;
  font-weight: 700;
}

.platform-reason {
  margin-top: 7px;
}

.platform-raw-detail pre {
  max-width: 520px;
  max-height: 320px;
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border-radius: 8px;
  color: #32465e;
  background: #f4f7fa;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
}

.platform-error-state {
  color: #a61b1b;
}

.platform-tunnel-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.platform-tunnel-metadata > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dfe8f1;
  border-radius: 9px;
  background: #f8fafc;
}

.platform-tunnel-metadata span {
  color: #60758d;
  font-size: 12px;
}

.platform-tunnel-metadata code {
  overflow-wrap: anywhere;
  color: #314a65;
}

.platform-tunnel-metadata p {
  margin: 0;
  line-height: 1.65;
}

.platform-tunnel-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.platform-tunnel-guide section {
  padding: 14px 16px;
  border-left: 4px solid #3978ad;
  border-radius: 8px;
  background: #f3f8fc;
}

.platform-tunnel-guide h4 {
  margin: 0 0 8px;
}

.platform-tunnel-guide ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.platform-tunnel-control {
  display: grid;
  gap: 12px;
  margin: 18px 0 14px;
  padding: 16px;
  border: 1px solid #cbdbe8;
  border-radius: 10px;
  background: #f8fbfd;
}

.platform-tunnel-control textarea {
  min-height: 78px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.platform-tunnel-control code {
  overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

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

  .ocr-layout,
  .ocr-guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  nav {
    grid-template-columns: 1fr;
  }

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

  .nav-group-title {
    grid-column: 1 / -1;
  }

  .workspace {
    padding: 14px;
  }

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

  .metric-grid,
  .business-reminder-grid,
  .form-grid,
  .reminder-grid,
  .provider-admin,
  .platform-tunnel-metadata,
  .platform-tunnel-guide {
    grid-template-columns: 1fr;
  }

  .ocr-hero-panel,
  .ocr-review-summary,
  .ocr-review-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ocr-review-actions {
    width: 100%;
    margin-left: 0;
    justify-items: stretch;
  }

  .ocr-action-tools,
  .ocr-action-flow {
    justify-content: stretch;
  }

  .ocr-action-tools button,
  .ocr-action-flow button {
    flex: 1 1 130px;
  }

  .ocr-form-grid,
  .ocr-message-grid,
  .ocr-message-detail-grid {
    grid-template-columns: 1fr;
  }

  .ocr-message-grid .span-2 {
    grid-column: auto;
  }

  .ocr-review-counts {
    justify-content: flex-start;
  }

  .ocr-direction-field,
  .ocr-sender-field {
    width: 100%;
    flex-basis: 100%;
  }

  .ocr-guide-animation {
    min-height: 520px;
  }

  .demo-chat-window {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .demo-result-list {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .demo-upload-card {
    width: 150px;
  }

  .provider-admin {
    display: grid;
  }

  .collector-download {
    align-items: stretch;
    flex-direction: column;
  }

  .collector-home-card {
    align-items: stretch;
    flex-direction: column;
  }

  .collector-home-action {
    width: 100%;
  }

  .provider-admin > div:first-child {
    max-width: none;
  }

  .span-2 {
    grid-column: auto;
  }
}
/* W07 Today Workspace */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 0;
  background: linear-gradient(180deg, #092b34 0%, #103f49 100%);
  box-shadow: 8px 0 28px rgba(9, 43, 52, 0.1);
}

.brand strong,
.brand small {
  color: #f7faf9;
}

.brand small {
  opacity: 0.68;
}

.sidebar .nav-group-title {
  color: rgba(239, 247, 246, 0.58);
}

.sidebar .nav,
.sidebar .logout {
  color: rgba(247, 250, 249, 0.82);
}

.sidebar .nav:hover {
  border-color: rgba(223, 197, 143, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: #fff9ed;
}

.sidebar .nav.active {
  border-color: rgba(223, 197, 143, 0.42);
  background: rgba(197, 154, 74, 0.2);
  color: #fff6df;
  box-shadow: inset 3px 0 0 #d6af64;
}

.sidebar .logout {
  color: #f1c9c3;
}

.workspace {
  background:
    radial-gradient(circle at 90% 0%, rgba(197, 154, 74, 0.07), transparent 24%),
    #f4f7f6;
}

.topbar {
  min-height: 48px;
}

.topbar h2 {
  color: #0d3540;
}

.today-workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.today-intro,
.today-list-panel,
.today-priority,
.collector-compact {
  border: 1px solid #dce7e4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.today-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  box-shadow: 0 14px 34px rgba(15, 62, 72, 0.07);
}

.today-intro h3,
.today-section-head h3,
.work-modal-head h3 {
  margin: 4px 0 0;
  color: #0f3540;
}

.today-intro h3 {
  font-size: 21px;
}

.today-intro p {
  margin: 7px 0 0;
  color: #647470;
  font-size: 13px;
}

.today-intro-actions,
.work-row-actions,
.work-terminal-actions,
.work-modal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.today-intro-actions button {
  min-height: 40px;
}

.today-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.today-summary article {
  position: relative;
  min-height: 104px;
  overflow: hidden;
  border: 1px solid #dfe8e5;
  border-radius: 11px;
  padding: 15px 17px;
  background: #fff;
}

.today-summary article::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: #d7b46e;
  opacity: 0.72;
}

.today-summary span,
.today-summary small {
  display: block;
  color: #71807c;
  font-size: 12px;
}

.today-summary strong {
  display: block;
  margin: 5px 0;
  color: #123f4a;
  font-size: 28px;
  line-height: 1;
}

.today-priority {
  padding: 17px 18px;
  border-color: #e7d7b4;
  background: linear-gradient(135deg, #fffdfa 0%, #fbf5e9 100%);
}

.today-list-panel {
  padding: 18px;
}

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

.today-section-head h3 {
  font-size: 18px;
}

.today-count {
  border-radius: 999px;
  padding: 5px 10px;
  color: #805f24;
  background: #f5e8cb;
  font-size: 12px;
  font-weight: 700;
}

.today-priority-list,
.today-work-list {
  display: grid;
  gap: 10px;
}

.priority-work-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(164, 125, 50, 0.16);
  padding: 10px 0 0;
}

.priority-work-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.priority-marker {
  width: 7px;
  height: 28px;
  border-radius: 999px;
  background: #b77733;
}

.priority-work-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.priority-work-row small {
  overflow: hidden;
  color: #7c7568;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-work-row > span:not(.priority-marker) {
  color: #9a5b23;
  font-size: 12px;
  font-weight: 700;
}

.today-filters {
  display: inline-flex;
  gap: 4px;
  border: 1px solid #d9e3e0;
  border-radius: 9px;
  padding: 3px;
  background: #f6f9f8;
}

.today-filter {
  border: 0;
  border-radius: 6px;
  padding: 7px 11px;
  background: transparent;
  color: #526460;
}

.today-filter.active {
  background: #123f4a;
  color: #fff;
  box-shadow: 0 3px 10px rgba(18, 63, 74, 0.18);
}

.today-state:not(:empty) {
  display: flex;
  align-items: center;
  gap: 9px 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  border: 1px solid #dfe8e5;
  border-radius: 9px;
  padding: 12px 14px;
  color: #5c6d69;
  background: #f8faf9;
}

.today-state strong {
  color: #173f48;
}

.today-state.error,
.today-state.unauthorized,
.today-state.stale {
  border-color: #ead6d1;
  color: #8b493f;
  background: #fff8f6;
}

.work-item-card {
  border: 1px solid #dce6e3;
  border-radius: 11px;
  padding: 15px 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(18, 63, 74, 0.045);
}

.work-item-card.is-urgent {
  border-left: 4px solid #b66a2c;
  background: linear-gradient(90deg, #fffaf5 0%, #fff 20%);
}

.work-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #edf1ef;
  padding-bottom: 11px;
}

.work-customer {
  color: #9a722e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.work-item-head h4 {
  margin: 4px 0 0;
  color: #122f36;
  font-size: 17px;
}

.work-badges,
.work-contexts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.work-badge,
.work-context {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  color: #5c6b68;
  background: #eff4f2;
  font-size: 11px;
}

.work-badge.pinned,
.work-context.reactivated {
  color: #755521;
  background: #f7ecd4;
}

.work-badge.urgent,
.work-context.blocker {
  color: #9e3f29;
  background: #fce9e4;
}

.work-badge.state-in_progress {
  color: #1e5e72;
  background: #e3f1f4;
}

.work-badge.state-waiting_customer,
.work-badge.state-waiting_internal {
  color: #6c5b2f;
  background: #f3eedf;
}

.work-badge.state-completed {
  color: #3d6a55;
  background: #e5f2eb;
}

.work-badge.state-closed {
  color: #6b7280;
  background: #eceff2;
}

.work-item-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  padding-top: 12px;
}

.work-item-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.work-item-copy p {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  color: #3f504c;
  line-height: 1.55;
}

.work-item-copy p span {
  color: #87938f;
  font-size: 12px;
}

.work-item-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  border-left: 1px solid #edf1ef;
  padding-left: 16px;
}

.work-item-controls > .work-row-actions,
.work-item-controls > .manual-order-control {
  grid-column: 1 / -1;
}


.work-item-controls label,
.manual-order-control label {
  color: #74827f;
  font-size: 11px;
}

.work-item-controls input,
.work-item-controls select {
  margin-top: 4px;
  padding: 7px 8px;
  font-size: 12px;
}

.work-item-controls button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.danger-outline {
  border-color: #d8aaa1 !important;
  color: #a1493a !important;
}

.manual-order-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: end;
  border-top: 1px solid #edf1ef;
  padding-top: 8px;
}

.work-terminal-note {
  color: #687570;
  font-size: 12px;
  line-height: 1.5;
}

.collector-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  color: #5f706c;
}

.collector-compact-title {
  display: grid;
  gap: 2px;
  min-width: 112px;
}

.collector-compact-title strong {
  color: #183f47;
  font-size: 13px;
}

.collector-status-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.collector-chip,
.collector-address {
  border-radius: 999px;
  padding: 5px 8px;
  color: #60706c;
  background: #f0f4f3;
  font-size: 11px;
}

.collector-chip.connected {
  color: #35624f;
  background: #e7f2ec;
}

.collector-chip.error {
  color: #9a493b;
  background: #fbece8;
}

.collector-chip.stale {
  color: #81642c;
  background: #f6efdf;
}

.collector-address code {
  color: #31555d;
  font-family: inherit;
}

.collector-compact-action {
  min-height: 32px;
  padding: 6px 10px !important;
  font-size: 12px;
}

.work-modal-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(5, 29, 35, 0.55);
  backdrop-filter: blur(4px);
}

.work-modal {
  width: min(720px, 100%);
  border: 1px solid #d8e4e1;
  border-radius: 13px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 32, 39, 0.22);
}

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

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

.work-modal-actions {
  justify-content: flex-end;
}

.work-customer-link {
  display: inline;
  border: 0;
  border-radius: 4px;
  padding: 0;
  color: #9a722e;
  background: transparent;
  font: inherit;
  text-align: left;
}

.work-customer-link:hover {
  color: #72501c;
  text-decoration: underline;
}

.customer-table-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 120px;
}

.customer-table-actions button,
.customer-table-actions select {
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}

.customer-directory-head {
  align-items: end;
  gap: 20px;
}

.customer-directory-head p {
  margin: 5px 0 0;
  color: #6d7c78;
}

.customer-search {
  width: min(360px, 100%);
  color: #5c6d69;
  font-size: 12px;
}

.customer-search input {
  margin-top: 5px;
}

.customer-create-panel .form-grid {
  grid-template-columns: minmax(200px, 1fr) minmax(180px, 0.7fr) auto;
  align-items: end;
}

.customer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: #72817d;
  font-size: 12px;
}

.customer-breadcrumb button {
  border: 0;
  padding: 0;
  color: #9a722e;
  background: transparent;
  font: inherit;
}

.customer-breadcrumb strong {
  color: #315862;
}

.customer-detail-view {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.customer-detail-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid #dce7e4;
  border-radius: 12px;
  padding: 16px 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 62, 72, 0.06);
}

.customer-detail-header h3,
.customer-section-head h3,
.customer-profile-card h3,
.customer-profile-card h4,
.customer-insight h3 {
  margin: 4px 0 0;
  color: #113944;
}

.customer-detail-header p {
  margin: 5px 0 0;
  color: #6d7c78;
  font-size: 13px;
}

.customer-return {
  min-width: 76px;
}

.customer-detail-state:not(:empty) {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  border: 1px solid #dce7e4;
  border-radius: 10px;
  padding: 12px 14px;
  color: #5c6d69;
  background: #f8faf9;
}

.customer-detail-state.error,
.customer-detail-state.missing,
.customer-detail-state.unauthorized,
.customer-detail-state.stale {
  border-color: #ead6d1;
  color: #8b493f;
  background: #fff8f6;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(520px, 1.75fr) minmax(205px, 0.66fr);
  gap: 14px;
  align-items: start;
}

.customer-detail-identity,
.customer-detail-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.customer-profile-card,
.customer-work-section,
.customer-timeline-section,
.customer-history,
.customer-insight {
  border: 1px solid #dce7e4;
  border-radius: 11px;
  background: #fff;
}

.customer-profile-card {
  padding: 15px;
}

.customer-profile-card h3 {
  font-size: 20px;
}

.customer-profile-card h4 {
  margin-bottom: 11px;
  font-size: 14px;
}

.customer-code {
  margin: 5px 0 14px;
  color: #8b6a2c;
  font-size: 12px;
  font-weight: 700;
}

.customer-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.customer-facts div,
.customer-background p {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
}

.customer-facts dt,
.customer-background span {
  color: #899591;
  font-size: 11px;
}

.customer-facts dd {
  margin: 0;
  color: #354b46;
  font-size: 12px;
}

.customer-profile-list {
  display: grid;
  gap: 8px;
}

.customer-profile-list article {
  display: grid;
  gap: 3px;
  border-top: 1px solid #edf1ef;
  padding-top: 8px;
}

.customer-profile-list article:first-child {
  border-top: 0;
  padding-top: 0;
}

.customer-profile-list strong,
.customer-profile-list span {
  overflow-wrap: anywhere;
}

.customer-profile-list strong {
  color: #304b45;
  font-size: 12px;
}

.customer-profile-list span,
.customer-background p {
  color: #71807c;
  font-size: 11px;
  line-height: 1.45;
}

.customer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.customer-tags span {
  border-radius: 999px;
  padding: 4px 7px;
  color: #6d562a;
  background: #f5ecd8;
  font-size: 11px;
}

.customer-background {
  display: grid;
  gap: 7px;
}

.customer-work-section,
.customer-timeline-section {
  padding: 16px;
}

.customer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.customer-section-head h3 {
  font-size: 17px;
}

.customer-work-list {
  display: grid;
  gap: 10px;
}

.customer-empty-work {
  display: grid;
  justify-items: start;
  gap: 7px;
  border: 1px dashed #cddcd8;
  border-radius: 10px;
  padding: 18px;
  color: #60706c;
  background: #f8faf9;
}

.child-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  border-top: 1px solid #edf1ef;
  padding-top: 11px;
}

.child-actions-head {
  display: flex;
  justify-content: space-between;
  color: #60716d;
  font-size: 12px;
}

.child-action-row,
.child-action-create {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.child-action-row input,
.child-action-create input,
.child-action-create select {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.child-action-create select {
  width: 92px;
}

.child-action-row.is-complete input {
  color: #78847f;
  text-decoration: line-through;
  background: #f2f5f4;
}

.child-action-toggle {
  width: 34px;
  min-height: 34px;
  padding: 4px;
  border-radius: 999px;
}

.child-action-limit {
  margin: 0;
  color: #7b8783;
  font-size: 11px;
}

.customer-timeline {
  display: grid;
}

.customer-timeline-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  border-top: 1px solid #edf1ef;
  padding: 10px 0;
}

.customer-timeline-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.customer-timeline-row time {
  color: #9a722e;
  font-size: 11px;
}

.customer-timeline-row div {
  display: grid;
  gap: 3px;
}

.customer-timeline-row strong {
  color: #344b46;
  font-size: 12px;
}

.customer-timeline-row span {
  color: #71807c;
  font-size: 11px;
  line-height: 1.45;
}

.customer-history {
  padding: 14px 16px;
}

.customer-history summary {
  cursor: pointer;
  color: #516762;
  font-size: 13px;
  font-weight: 700;
}

.customer-history[open] summary {
  margin-bottom: 12px;
}

.customer-insight {
  position: sticky;
  top: 14px;
  padding: 16px;
  color: #60706c;
  background: linear-gradient(160deg, #fff 0%, #fbf6eb 100%);
}

.customer-insight h3 {
  font-size: 16px;
}

.customer-insight p,
.customer-insight li {
  font-size: 12px;
  line-height: 1.55;
}

.customer-insight ul {
  margin: 12px 0;
  padding-left: 18px;
}

@media (max-width: 1320px) {
  .customer-detail-grid {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 2fr);
  }

  .customer-insight {
    display: none;
  }
}

@media (max-width: 760px) {
  .customer-directory-head {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-create-panel .form-grid {
    grid-template-columns: 1fr;
  }

  .customer-detail-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .customer-detail-header > button,
  .customer-section-head > button {
    width: 100%;
  }

  .customer-detail-grid {
    grid-template-columns: 1fr;
  }

  .customer-insight {
    position: static;
    display: block;
  }

  .customer-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .child-action-row,
  .child-action-create {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .child-action-row > button:last-child,
  .child-action-create > button {
    grid-column: 2;
  }
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(197, 154, 74, 0.38);
  outline-offset: 2px;
}

@media (max-width: 1180px) {
  .work-item-body {
    grid-template-columns: 1fr;
  }

  .work-item-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #edf1ef;
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }

  .manual-order-control,
  .work-terminal-actions,
  .work-row-actions {
    align-self: end;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .today-workspace {
    width: 100%;
  }

  .today-intro,
  .today-section-head,
  .collector-compact,
  .work-item-head {
    align-items: stretch;
    flex-direction: column;
  }

  .today-intro-actions button,
  .collector-compact-action {
    width: 100%;
  }

  .today-summary,
  .work-form-grid {
    grid-template-columns: 1fr;
  }

  .today-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .today-filter {
    padding-inline: 5px;
  }

  .priority-work-row {
    grid-template-columns: 7px minmax(0, 1fr) auto;
  }

  .priority-work-row > button {
    grid-column: 2 / -1;
  }

  .work-item-copy p {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .work-modal-backdrop {
    align-items: end;
    padding: 10px;
  }

  .work-modal {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 12px 12px 6px 6px;
  }

  .work-form-grid .span-2 {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .work-item-controls {
    grid-template-columns: 1fr;
  }

  .today-summary {
    gap: 8px;
  }

  .today-summary article {
    min-height: 88px;
  }

  .today-intro,
  .today-list-panel,
  .today-priority {
    padding: 14px;
  }

  .today-filters {
    grid-template-columns: 1fr;
  }

  .manual-order-control {
    grid-template-columns: 1fr;
  }
}

/* W07-P4R user-reviewed workspace shell */
.app-shell {
  grid-template-columns: 212px minmax(0, 1fr);
  transition: grid-template-columns 220ms ease;
}

.app-shell.sidebar-compact {
  grid-template-columns: 0 minmax(0, 1fr);
}

.sidebar {
  width: 100%;
  padding: 14px 10px;
  transition: transform 220ms ease, opacity 160ms ease, box-shadow 220ms ease;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-head .brand {
  min-width: 0;
}

.brand-copy,
.nav-label,
.sidebar .nav-group-title {
  transition: opacity 150ms ease, width 180ms ease;
}

.sidebar-toggle {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(115, 190, 207, 0.28);
  border-radius: 50%;
  padding: 0;
  color: #d9eff3;
  background: rgba(10, 79, 96, 0.66);
}

.shell-icon,
.button-line-icon,
.nav-icon-svg,
.row-action-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-expand-control {
  position: fixed;
  z-index: 80;
  top: 16px;
  left: 16px;
  display: grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 91, 108, 0.24);
  border-radius: 50%;
  padding: 0;
  color: #eaf7f8;
  background: #0d4b5a;
  box-shadow: 0 10px 24px rgba(8, 45, 54, 0.22);
}

.sidebar .nav {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #afd6de;
  font-weight: 700;
}

.nav-icon-svg {
  width: 18px;
  height: 18px;
}

.sidebar .nav.active .nav-icon {
  color: #e6f8fb;
  background: rgba(113, 197, 214, 0.12);
}

.sidebar .nav.active {
  border-color: rgba(106, 189, 207, 0.28);
  color: #f2fbfc;
  background: linear-gradient(90deg, rgba(12, 91, 111, 0.96), rgba(11, 68, 84, 0.94));
  box-shadow: inset 3px 0 #e0b968, 0 8px 20px rgba(3, 33, 41, 0.18);
}

.nav-status {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(239, 218, 174, 0.4);
  border-radius: 999px;
  color: #cbe8e5;
  font-size: 10px;
  font-weight: 800;
}

.nav-status[data-status="attention"] {
  border-color: #e1bd73;
  color: #12343b;
  background: #e1bd73;
}

.sidebar-compact .sidebar {
  overflow: hidden;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-105%);
}

.workspace {
  background:
    radial-gradient(circle at 84% 4%, rgba(214, 175, 100, 0.12), transparent 27%),
    linear-gradient(145deg, #f8faf9 0%, #eff5f3 52%, #f8f5ee 100%);
}

.today-intro,
.today-summary article,
.today-list-panel,
.today-priority,
.collector-compact,
.work-item-card,
.customer-detail-header,
.customer-profile-card,
.customer-work-section,
.customer-timeline-section,
.customer-history {
  background-image: linear-gradient(118deg, rgba(255, 255, 255, 0) 62%, rgba(220, 188, 126, 0.08) 76%, rgba(255, 255, 255, 0) 90%);
  background-size: 220% 100%;
  background-position: 0 0;
  box-shadow: 0 12px 34px rgba(17, 57, 66, 0.07);
  transition: box-shadow 180ms ease, transform 180ms ease, background-position 360ms ease;
}

.today-summary article:hover,
.work-item-card:hover,
.customer-profile-card:hover,
.customer-work-section:hover,
.customer-timeline-section:hover {
  background-position: 100% 0;
  box-shadow: 0 17px 38px rgba(17, 57, 66, 0.1);
  transform: translateY(-1px);
}

.section-kicker {
  display: inline-block;
  color: #8c6a2d;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0.04em;
}

.today-intro p,
.work-item-copy p,
.customer-detail-header p,
.customer-profile-list span,
.customer-background p,
.customer-timeline-row span {
  font-size: 14px;
  line-height: 1.65;
}

.work-item-head h4 {
  font-size: 18px;
  line-height: 1.4;
}

.customer-profile-list strong,
.customer-timeline-row strong,
.customer-facts dd {
  font-size: 13px;
}

.work-item-card {
  position: relative;
  overflow: visible;
}

.work-item-body {
  grid-template-columns: minmax(0, 1fr);
}

.work-action-shell {
  position: relative;
  z-index: 8;
  display: grid;
  justify-items: end;
  margin-top: 10px;
}

.work-action-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border-color: #d9c498;
  border-radius: 999px;
  padding: 6px 11px;
  color: #745725;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 6px 16px rgba(72, 54, 22, 0.1);
}

.work-action-node span:first-child {
  letter-spacing: 0.12em;
}

.work-item-controls {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: min(540px, calc(100vw - 330px));
  max-height: min(560px, calc(100vh - 130px));
  overflow: auto;
  border: 1px solid #dfcfac;
  border-radius: 13px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 22px 52px rgba(13, 48, 56, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px) scale(0.985);
  transform-origin: right bottom;
  pointer-events: none;
  transition: opacity 170ms ease, transform 170ms ease, visibility 0s linear 170ms;
}

.work-action-shell.is-open .work-item-controls {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}

.work-action-shell.is-open .work-action-node {
  border-color: #caa45a;
  color: #143b43;
  background: #f8edda;
}

.customer-insight {
  overflow: hidden;
  padding: 0;
  border-color: #2b5d66;
  color: #d8e5e3;
  background: linear-gradient(160deg, #082d36 0%, #123f49 64%, #254d50 100%);
  box-shadow: 0 18px 46px rgba(7, 39, 47, 0.2);
}

.zhiheng-toggle {
  display: none;
  width: 100%;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 0;
  padding: 10px;
  color: #eef7f5;
  background: transparent;
  text-align: left;
}

.zhiheng-toggle img {
  width: 50px;
  height: 50px;
  border: 1px solid rgba(225, 189, 115, 0.65);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 16%;
}

.zhiheng-toggle span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.zhiheng-toggle strong {
  font-size: 16px;
}

.zhiheng-toggle small {
  color: rgba(230, 241, 239, 0.7);
  font-size: 12px;
}

.zhiheng-toggle-mark {
  transition: transform 180ms ease;
}

.customer-insight:not(.is-expanded) .zhiheng-toggle-mark {
  transform: rotate(180deg);
}

.zhiheng-seat-body {
  display: grid;
  min-width: 0;
}

.zhiheng-portrait {
  position: relative;
  height: 286px;
  overflow: hidden;
  margin: 0;
  background: #0a3038;
}

.zhiheng-portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(4, 29, 35, 0.9));
  pointer-events: none;
}

.zhiheng-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 17%;
}

.zhiheng-portrait figcaption {
  position: absolute;
  z-index: 1;
  right: 14px;
  bottom: 13px;
  left: 14px;
  display: grid;
  gap: 2px;
}

.zhiheng-portrait figcaption strong {
  color: #fff8e9;
  font-size: 22px;
}

.zhiheng-portrait figcaption span {
  color: #cddcda;
  font-size: 12px;
}

.zhiheng-copy {
  padding: 15px;
}

.customer-insight .section-kicker {
  color: #e0bd79;
}

.customer-insight h3 {
  color: #f8f5eb;
  font-size: 18px;
}

.customer-insight p,
.customer-insight li {
  color: #cad9d7;
  font-size: 13px;
  line-height: 1.6;
}

.customer-insight button[disabled] {
  width: 100%;
  border-color: rgba(225, 189, 115, 0.32);
  color: rgba(249, 238, 215, 0.66);
  background: rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.w07-dialog-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 29, 35, 0.58);
  backdrop-filter: blur(5px);
}

.w07-dialog {
  width: min(460px, 100%);
  border: 1px solid #dfd1b3;
  border-radius: 16px;
  padding: 22px;
  color: #435651;
  background: #fffefa;
  box-shadow: 0 28px 80px rgba(4, 32, 39, 0.28);
}

.w07-dialog h3 {
  margin: 7px 0;
  color: #103944;
  font-size: 21px;
}

.w07-dialog p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.65;
}

.w07-dialog-input {
  display: grid;
  gap: 7px;
  margin: 4px 0 18px;
  color: #526762;
  font-size: 13px;
}

.w07-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.w07-dialog .dialog-danger {
  border-color: #a74c3c;
  background: #a74c3c;
}

.toast {
  border: 1px solid rgba(220, 188, 126, 0.5);
  color: #f9fbfa;
  background: #123f49;
  box-shadow: 0 14px 36px rgba(6, 39, 47, 0.24);
}

@media (max-width: 1320px) and (min-width: 761px) {
  .customer-detail-grid {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 2fr);
  }

  .customer-insight {
    position: fixed;
    z-index: 24;
    top: auto;
    right: 24px;
    bottom: 24px;
    display: block;
    width: 270px;
    height: auto;
    border-radius: 16px;
    transition: width 190ms ease, box-shadow 190ms ease;
  }

  .customer-insight:not(.is-expanded) {
    max-height: 96px;
  }

  .customer-insight.is-expanded {
    width: min(350px, calc(100vw - 48px));
    box-shadow: 0 28px 72px rgba(7, 39, 47, 0.3);
  }

  .zhiheng-toggle {
    display: grid;
  }

  .zhiheng-seat-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 220ms ease, opacity 160ms ease;
  }

  .customer-insight.is-expanded .zhiheng-seat-body {
    max-height: min(620px, calc(100vh - 145px));
    overflow-y: auto;
    opacity: 1;
  }

  .zhiheng-portrait {
    height: 260px;
  }
}

@media (max-width: 760px) {
  .app-shell,
  .app-shell.sidebar-compact {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar,
  .sidebar-compact .sidebar {
    position: fixed;
    z-index: 70;
    inset: 0 auto 0 0;
    width: min(212px, calc(100vw - 56px));
    height: 100vh;
    padding: 14px 10px;
  }

  .sidebar-compact .sidebar {
    padding: 0;
  }

  .sidebar .nav-group,
  .sidebar-compact .sidebar .nav-group {
    grid-template-columns: 1fr;
  }

  .work-item-body {
    padding-right: 0;
  }

  .work-action-shell {
    position: static;
    margin-top: 12px;
  }

  .work-action-node {
    width: 100%;
    justify-content: center;
  }

  .work-item-controls {
    position: static;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    border-width: 0;
    padding: 0;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
  }

  .work-action-shell.is-open .work-item-controls {
    max-height: 720px;
    margin-top: 8px;
    overflow: visible;
    border-width: 1px;
    padding: 12px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .customer-insight {
    position: static;
    display: block;
    width: auto;
    border-radius: 14px;
  }

  .zhiheng-toggle {
    display: grid;
  }

  .zhiheng-seat-body {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 220ms ease, opacity 160ms ease;
  }

  .customer-insight.is-expanded .zhiheng-seat-body {
    max-height: 820px;
    opacity: 1;
  }

  .zhiheng-portrait {
    height: min(430px, 72vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell,
  .app-shell *,
  .w07-dialog-backdrop,
  .w07-dialog {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    transition-delay: 0s !important;
  }
}

/* W07-P4R-UI1 Today Workspace visual refinement */
.today-workspace {
  gap: 16px;
}

.today-workspace .today-intro {
  min-height: 58px;
  border: 0;
  padding: 0 2px 2px;
  background: transparent;
  background-image: none;
  box-shadow: none;
}

.today-intro-copy {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
}

.today-intro-copy > p {
  grid-column: 2;
  margin: 0;
}

.today-date-icon {
  grid-row: 1 / span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dce6e3;
  border-radius: 10px;
  color: #365c64;
  background: #f4f8f7;
  font-size: 19px;
}

.today-workspace .today-intro h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.today-intro-actions button {
  gap: 7px;
  min-height: 38px;
  border-radius: 9px;
  box-shadow: none;
}

.today-summary {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe8e5;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 30px rgba(17, 57, 66, 0.055);
}

.today-summary article {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 112px;
  border: 0;
  border-radius: 0;
  padding: 18px 24px;
  background: transparent;
  background-image: none;
  box-shadow: none;
}

.today-summary article + article {
  border-left: 1px solid #e6ecea;
}

.today-summary article::after {
  display: none;
}

.today-summary-icon {
  display: grid !important;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  font-size: 23px !important;
  font-weight: 700;
}

.today-summary [data-summary="pending"] .today-summary-icon {
  color: #276a89;
  background: #e8f3f8;
}

.today-summary [data-summary="customer"] .today-summary-icon {
  color: #247568;
  background: #e5f3ef;
}

.today-summary [data-summary="internal"] .today-summary-icon {
  color: #876322;
  background: #f5eddd;
}

.today-summary strong {
  margin: 4px 0 5px;
  font-size: 30px;
}

.today-summary small {
  line-height: 1.35;
}

.today-priority,
.today-list-panel {
  overflow: visible;
  border-color: #dfe7e4;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.98);
  background-image: none;
  box-shadow: 0 12px 30px rgba(17, 57, 66, 0.055);
}

.today-priority {
  padding: 14px 18px 4px;
}

.today-list-panel {
  padding: 0;
}

.today-priority .today-section-head,
.today-list-panel .today-section-head {
  min-height: 52px;
  margin: 0;
  padding: 10px 2px 12px;
}

.today-list-panel .today-section-head {
  border-bottom: 1px solid #e7ecea;
  padding: 12px 18px;
}

.today-heading-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.today-heading-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #9a681c;
  font-size: 19px;
  font-weight: 800;
}

.today-list-count {
  border-radius: 999px;
  padding: 3px 8px;
  color: #66736f;
  background: #eff3f1;
  font-size: 11px;
  font-weight: 700;
}

.today-count {
  color: #805d25;
  background: #f4ead7;
}

.today-priority-list,
.today-work-list {
  gap: 0;
}

.priority-work-row {
  grid-template-columns: 30px minmax(0, 1fr) 104px 96px 34px;
  gap: 12px;
  min-height: 60px;
  border-top: 1px solid #e8ecea;
  padding: 9px 0;
}

.priority-work-row:first-child {
  border-top: 1px solid #e8ecea;
  padding-top: 9px;
}

.priority-rank {
  display: grid;
  width: 24px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  color: #8b641f;
  background: #f7ecd3;
  font-size: 12px;
  font-weight: 800;
}

.priority-work-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.priority-work-copy strong {
  overflow: hidden;
  color: #173740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-work-copy small {
  display: flex;
  gap: 7px;
  min-width: 0;
}

.priority-work-copy small span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-work-row time {
  color: #667571;
  font-size: 12px;
  text-align: right;
}

.priority-row-open,
.work-detail-link {
  min-width: 30px;
  min-height: 30px;
  border: 0;
  padding: 0;
  color: #58706f;
  background: transparent;
  font-size: 21px;
  box-shadow: none;
}

.priority-row-open:hover,
.priority-row-open:focus-visible,
.work-detail-link:hover,
.work-detail-link:focus-visible {
  color: #153f49;
  background: #edf3f1;
}

.today-filters {
  border-color: #dfe6e4;
  background: #f8faf9;
}

.today-filter {
  min-height: 32px;
  padding: 6px 13px;
  color: #536661;
}

.today-filter.active {
  background: #0f4855;
  box-shadow: 0 4px 12px rgba(15, 72, 85, 0.18);
}

.today-work-table-head,
.today-work-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(260px, 2.2fr) minmax(104px, 0.7fr) minmax(120px, 0.8fr) 76px;
  gap: 14px;
  align-items: center;
}

.today-work-table-head {
  min-height: 40px;
  border-bottom: 1px solid #e7ecea;
  padding: 8px 18px;
  color: #7b8884;
  font-size: 11px;
  font-weight: 650;
}

.today-work-row.work-item-card {
  min-height: 72px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #e8ecea;
  border-radius: 0;
  padding: 10px 18px;
  background: #fff;
  background-image: none;
  box-shadow: none;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.today-work-row.work-item-card:last-child {
  border-bottom: 0;
  border-radius: 0 0 13px 13px;
}

.today-work-row.work-item-card:hover,
.today-work-row.work-item-card:focus-within {
  z-index: 9;
  background: #f8fbfa;
  box-shadow: inset 3px 0 #d2aa5e;
  transform: none;
}

.today-work-row.is-urgent {
  border-left: 0;
  background: #fcf9f8;
}

.work-table-customer {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.work-customer-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: #315d67;
  background: #e9f1f1;
  font-size: 12px;
  font-weight: 800;
}

.work-table-customer > div,
.work-table-item,
.work-table-state {
  min-width: 0;
}

.work-table-customer .work-customer {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: #28434a;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-pinned-note {
  display: block;
  margin-top: 2px;
  color: #896728;
  font-size: 10px;
}

.work-table-item h4 {
  overflow: hidden;
  margin: 0 0 4px;
  color: #18343b;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-table-item > p {
  overflow: hidden;
  margin: 0;
  color: #71807c;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-table-item .work-contexts {
  margin-top: 5px;
}

.work-table-item .work-context {
  padding: 2px 7px;
  font-size: 10px;
}

.work-table-state {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.today-workspace .work-badge {
  border: 1px solid transparent;
  color: #536763;
  background: #edf2f0;
}

.today-workspace .work-badge.state-pending,
.today-workspace .work-badge.state-in_progress {
  border-color: #d8e3e3;
  color: #3e5f66;
  background: #eaf0f0;
}

.today-workspace .work-badge.state-waiting_customer,
.today-workspace .work-badge.state-waiting_internal {
  border-color: #e4dece;
  color: #665f4d;
  background: #f1eee7;
}

.today-workspace .work-badge.state-completed,
.today-workspace .work-badge.state-closed {
  border-color: #dfe3e0;
  color: #59645f;
  background: #edf0ee;
}

.today-workspace .work-badge.urgent.is-attention,
.today-workspace .work-context.blocker {
  border-color: #e5d8c2;
  color: #735a35;
  background: #f3eee5;
}

.today-workspace .work-badge.urgent.is-overdue,
.today-workspace .work-table-due.is-overdue {
  border-color: #dfcccc;
  color: #783f43;
  background: #f1e7e7;
}

.work-table-due {
  justify-self: start;
  border-radius: 7px;
  padding: 4px 7px;
  color: #64736f;
  font-size: 11px;
  line-height: 1.35;
}

.work-table-actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.today-work-row .work-action-shell {
  position: relative;
  display: block;
  margin: 0;
}

.today-work-row .work-action-node {
  min-width: 30px;
  min-height: 30px;
  border: 0;
  padding: 0 4px;
  color: #627572;
  background: transparent;
  box-shadow: none;
}

.today-work-row .work-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.today-work-row .work-item-controls {
  bottom: auto;
  top: calc(100% + 8px);
  width: min(520px, calc(100vw - 340px));
  transform-origin: right top;
}

.today-workspace .collector-compact {
  margin-top: -4px;
}

@media (max-width: 1060px) {
  .today-work-table-head,
  .today-work-row {
    grid-template-columns: minmax(130px, 0.85fr) minmax(230px, 1.8fr) 98px 112px 66px;
    gap: 10px;
  }

  .today-summary article {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    padding-inline: 16px;
  }

  .today-summary-icon {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 760px) {
  .today-workspace .today-intro {
    align-items: stretch;
    gap: 12px;
  }

  .today-intro-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .today-summary {
    grid-template-columns: 1fr;
  }

  .today-summary article {
    min-height: 88px;
    border-left: 0 !important;
    border-top: 1px solid #e6ecea;
    padding: 14px 18px;
  }

  .today-summary article:first-child {
    border-top: 0;
  }

  .today-priority,
  .today-list-panel {
    padding-inline: 0;
  }

  .today-priority .today-section-head,
  .today-priority-list {
    margin-inline: 14px;
  }

  .priority-work-row {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    gap: 9px;
    padding-block: 11px;
  }

  .priority-rank {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: start;
  }

  .priority-work-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .priority-work-row .work-badge,
  .priority-work-row time {
    grid-column: 2;
    justify-self: start;
  }

  .priority-work-row .work-badge { grid-row: 2; }
  .priority-work-row time { grid-row: 3; }

  .priority-work-row > .priority-row-open {
    grid-column: 3;
    grid-row: 1 / span 3;
  }

  .today-list-panel .today-section-head {
    align-items: stretch;
    padding: 14px;
  }

  .today-work-table-head {
    display: none;
  }

  .today-work-row.work-item-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "customer actions"
      "item item"
      "state due";
    gap: 9px 12px;
    padding: 14px;
  }

  .work-table-customer { grid-area: customer; }
  .work-table-item { grid-area: item; }
  .work-table-state { grid-area: state; }
  .work-table-due { grid-area: due; justify-self: end; }
  .work-table-actions { grid-area: actions; }

  .work-table-item h4,
  .work-table-item > p {
    white-space: normal;
  }

  .today-work-row .work-item-controls {
    position: fixed;
    right: 14px;
    bottom: 14px;
    top: auto;
    width: calc(100vw - 28px);
    max-height: calc(100vh - 100px);
    transform-origin: right bottom;
  }

  .today-work-row .work-action-shell {
    position: static;
  }
}

@media (max-width: 480px) {
  .today-intro-actions {
    grid-template-columns: 1fr;
  }

  .today-summary article {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .today-summary-icon {
    width: 40px;
    height: 40px;
    font-size: 19px !important;
  }

  .today-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .today-work-row,
  .priority-row-open,
  .work-detail-link {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
    transition: none !important;
  }
}

.app-shell:has(#customers.active, #customerDetail.active) {
  position: relative;
  grid-template-columns: 212px minmax(0, 1fr);
  overflow-x: clip;
  transition: grid-template-columns 220ms ease;
}

.app-shell:has(#customers.active, #customerDetail.active).sidebar-compact { grid-template-columns: 0 minmax(0, 1fr); }

.app-shell:has(#customers.active, #customerDetail.active) .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(89, 156, 166, 0.22);
  padding: 18px 14px;
  color: #e9f3f1;
  background: linear-gradient(180deg, #073541 0%, #0b4653 100%);
  box-shadow: 10px 0 30px rgba(9, 48, 58, 0.08);
  width: 212px;
  box-sizing: border-box;
  transform: translateX(0);
  transition: transform 220ms ease, visibility 0s linear 0s;
}

.app-shell:has(#customers.active, #customerDetail.active) .sidebar .sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .brand strong { color: #fff; font-size: 18px; }
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .brand small { color: rgba(229, 242, 240, 0.68); }
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .customer-brand-mark {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(91, 210, 219, 0.55);
  color: #77e3e9;
  background: rgba(5, 35, 43, 0.6);
}

.app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav,
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .logout { color: #dcebea; }
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav:hover { border-color: rgba(98, 191, 200, 0.24); background: rgba(255, 255, 255, 0.07); color: #fff; }
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav.active { border-color: rgba(78, 198, 208, 0.48); background: #0e5b69; color: #fff; box-shadow: inset 3px 0 #d8b870; }
.app-shell:has(#customers.active, #customerDetail.active) .sidebar .logout { color: #d8c7ae; }

#sidebarToggle,
#sidebarExpandBtn {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(216, 184, 112, 0.5);
  border-radius: 50%;
  padding: 0;
  color: #f2e5c9;
  background: #0b4b58;
  box-shadow: 0 8px 20px rgba(7, 44, 53, 0.14);
  line-height: 1;
  transform: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

#sidebarToggle:hover,
#sidebarToggle:focus-visible,
#sidebarExpandBtn:hover,
#sidebarExpandBtn:focus-visible {
  border-color: #d8b870;
  background: #0e5b69;
  transform: none;
}

#sidebarToggle span,
#sidebarExpandBtn span { font-size: 24px; transform: translateY(-1px); }

#sidebarExpandBtn {
  position: fixed;
  z-index: 80;
  top: 18px;
  left: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 220ms ease, visibility 0s linear 220ms, border-color 140ms ease, background-color 140ms ease;
}

.app-shell:has(#customers.active, #customerDetail.active).sidebar-compact .app-shell:has(#customers.active, #customerDetail.active) .sidebar {
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 220ms ease, visibility 0s linear 220ms;
}

/* Keep the shared sidebar entry reachable on every workspace view. */
.app-shell.sidebar-compact .topbar-heading { padding-inline-start: 56px; }

.app-shell.sidebar-compact #sidebarExpandBtn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.workspace { padding: 22px 28px 34px; }
.customer-directory-topbar { width: min(1320px, 100%); margin: 0 auto 18px; }
.customer-directory-topbar h2 { color: #103944; }
.customer-detail-view.active { display: grid; }

.toast {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  border-radius: 8px;
  padding: 11px 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .app-shell:has(#customers.active, #customerDetail.active) { display: block; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px 14px;
    gap: 10px;
  }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .sidebar-head { display: none; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar nav { display: block; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav-group { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav { min-width: 0; padding: 8px 4px; text-align: center; font-size: 12px; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .logout { display: none; }
  .workspace { padding: 14px; }
  .customer-directory-topbar { margin-bottom: 12px; }
  .customer-detail-header { margin-bottom: 0; }
}

@media (max-width: 480px) {
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


@media (max-width: 760px) {
  .app-shell:has(#customers.active, #customerDetail.active) {
    display: grid;
    grid-template-columns: 212px minmax(0, 1fr);
    align-items: start;
  }
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-compact { grid-template-columns: 0 minmax(0, 1fr); }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar {
    position: sticky;
    width: 212px;
    height: 100vh;
    padding: 18px 14px;
    gap: initial;
  }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .sidebar-head { display: flex; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav-group { grid-template-columns: 1fr; gap: 8px; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .nav { padding: 10px 12px; text-align: left; font-size: 14px; }
  .app-shell:has(#customers.active, #customerDetail.active) .sidebar .logout { display: block; }
  .workspace { min-width: 0; }
}


@media (min-width: 1321px) {
  .customer-detail-grid {
    grid-template-columns: minmax(248px, 0.82fr) minmax(500px, 1.8fr) minmax(250px, 0.78fr);
    gap: 14px;
  }
}

.customer-detail-identity { gap: 10px; }

.customer-profile-card {
  padding: 14px;
  box-shadow: 0 8px 24px rgba(18, 63, 74, 0.055);
}

.customer-profile-card h4 { margin-bottom: 10px; }
.customer-profile-list { gap: 9px; }
.customer-profile-list article.is-active-channel strong::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #2a9486;
  box-shadow: 0 0 0 3px rgba(42, 148, 134, 0.1);
  vertical-align: 1px;
}

.customer-profile-entry {
  width: 100%;
  min-height: 30px;
  margin-top: 12px;
  border: 0;
  border-top: 1px solid #edf1ef;
  border-radius: 0;
  padding: 10px 0 0;
  color: #5d746f;
  background: transparent;
  box-shadow: none;
  text-align: left;
  font-size: 12px;
}

.customer-profile-entry:hover,
.customer-profile-entry:focus-visible {
  color: #0e5b69;
  background: transparent;
  transform: none;
}

.work-item-card {
  border: 1px solid #dfe7e4;
  border-radius: 10px;
  padding: 16px 17px;
  background: #fff;
  background-image: none;
  box-shadow: none;
  transition: none;
}

.work-item-card.is-urgent {
  border-left: 1px solid #dfe7e4;
  background: #fff;
}

.work-item-card:hover,
.work-item-card:focus-within {
  border-color: #dfe7e4;
  background-position: 0 0;
  box-shadow: none;
  transform: none;
}


.customer-work-section,
.customer-work-section:hover,
.customer-work-section:focus-within,
#customerCurrentWorkItems .work-item-card,
#customerCurrentWorkItems .work-item-card:hover,
#customerCurrentWorkItems .work-item-card:focus-within {
  background-image: none !important;
  background-position: 0 0 !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

.work-item-head {
  align-items: center;
  border-bottom: 0;
  padding-bottom: 8px;
}

.work-lifecycle {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 5px;
  padding: 3px 7px;
  color: #1f5c6b;
  background: #e7f1f2;
  font-size: 11px;
  font-weight: 650;
}

.work-lifecycle.state-pending { color: #8a6220; background: #faf1df; }
.work-lifecycle.state-in_progress { color: #2a6879; background: #e8f3f5; }
.work-lifecycle.state-waiting_customer,
.work-lifecycle.state-waiting_internal { color: #725d2e; background: #f5efdf; }
.work-lifecycle.state-completed { color: #3d6a55; background: #e5f2eb; }
.work-lifecycle.state-closed { color: #656d74; background: #eceff2; }

.work-item-title {
  border-bottom: 0;
  padding-bottom: 9px;
}

.work-item-title h4 {
  margin: 0;
  color: #102f38;
  font-size: 18px;
  line-height: 1.4;
}

.work-item-card .work-item-body { padding-top: 12px; }
.work-item-card .work-item-copy { gap: 9px; }
.work-item-card .work-item-copy p {
  grid-template-columns: 78px minmax(0, 1fr);
  font-size: 13px;
  line-height: 1.58;
}
.work-item-card .work-contexts { margin-top: 4px; }
.work-item-card .work-badge,
.work-item-card .work-context {
  border-radius: 5px;
  padding: 3px 7px;
  box-shadow: none;
}
.work-item-card .work-badge.pinned { color: #7b5b25; background: #f8efdd; }
.work-item-card .work-badge.urgent,
.work-item-card .work-context.blocker { color: #9a4938; background: #faeae6; }
.work-item-card .work-action-shell { margin-top: 7px; }
.work-item-card .work-action-node {
  position: relative;
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  place-items: center;
  border-color: #d8c69f;
  border-radius: 6px;
  padding: 0;
  background: #fff;
  box-shadow: none;
}
.work-item-card .work-action-node span {
  line-height: 1;
  text-align: center;
}
.work-item-card .work-action-node > span:not([aria-hidden="true"]) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.work-item-card .work-action-node::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 40;
  right: 0;
  bottom: calc(100% + 7px);
  width: max-content;
  border: 1px solid #d9e2df;
  border-radius: 5px;
  padding: 4px 7px;
  color: #425b60;
  background: #fff;
  box-shadow: 0 5px 12px rgba(18, 55, 63, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.work-item-card .work-action-node:hover::after,
.work-item-card .work-action-node:focus-visible::after {
  opacity: 1;
  visibility: visible;
}
.work-item-card .work-action-shell.is-open .work-action-node::after {
  opacity: 0;
  visibility: hidden;
}
.work-item-card .work-action-node:hover,
.work-item-card .work-action-node:focus-visible {
  background: #fbf8f1;
  box-shadow: none;
  transform: none;
}

.work-item-card:has(.work-action-shell.is-open) { z-index: 30; }
.work-item-card .work-item-controls { z-index: 31; }
.work-item-card .work-action-compact { border-radius: 6px; }
.work-item-card .work-action-update {
  justify-self: start;
  width: auto;
  min-width: 104px;
  min-height: 28px;
  padding: 4px 10px;
}
.work-item-card .work-terminal-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.work-item-card .work-action-terminal {
  width: auto;
  min-width: 76px;
  min-height: 28px;
  padding: 4px 10px;
}

.work-item-card .child-actions {
  margin-top: 13px;
  border-top-color: #e5ecea;
  padding-top: 12px;
}

.work-item-card .child-action-row,
.work-item-card .child-action-create {
  border: 1px solid #e6ecea;
  border-radius: 6px;
  padding: 4px 5px;
  background: #fff;
  box-shadow: none;
}

.work-item-card .child-action-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.work-item-card .child-action-create {
  grid-template-columns: minmax(0, 1fr) auto;
}

.work-item-card .child-action-row input,
.work-item-card .child-action-create input,
.work-item-card .child-action-create select {
  min-height: 30px;
  min-width: 0;
  width: 100%;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.work-item-card .child-action-row input,
.work-item-card .child-action-create input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.work-item-card .child-action-row.is-complete { background: #f3f6f5; }
.work-item-card .child-action-row.is-complete input { background: transparent; }
.work-item-card .child-action-row > button:last-child,
.work-item-card .child-action-create > button {
  border-radius: 5px;
  background: #fff;
  box-shadow: none;
}

.customer-insight {
  border-color: #d5dfdc;
  border-radius: 11px;
  color: #536964;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 57, 66, 0.09);
}

.zhiheng-context-portrait {
  height: 276px;
  background: #263a39;
}

.zhiheng-context-portrait::after {
  height: 40%;
  background: linear-gradient(transparent, rgba(12, 30, 31, 0.82));
}

.zhiheng-context-portrait img {
  object-fit: cover;
  object-position: 50% 29%;
}
.zhiheng-context-portrait figcaption strong { color: #fff; }
.zhiheng-context-portrait figcaption span { color: rgba(255, 255, 255, 0.82); }

.zhiheng-context-copy { padding: 15px 15px 13px; }
.customer-insight .zhiheng-context-copy .section-kicker { color: #9b6d24; }
.customer-insight .zhiheng-context-copy h3 {
  margin: 6px 0 9px;
  color: #153a42;
  font-size: 16px;
}
.customer-insight .zhiheng-context-copy p,
.customer-insight .zhiheng-context-copy li {
  color: #61736f;
  font-size: 12px;
  line-height: 1.55;
}
.customer-insight .zhiheng-context-copy ul { margin: 10px 0 12px; }

.zhiheng-collaboration-entry {
  width: 100%;
  min-height: 34px;
  border-color: #b9cfca;
  border-radius: 8px;
  color: #174953;
  background: #f8fbfa;
}

.zhiheng-recent {
  border-top: 1px solid #e8eeec;
  padding: 13px 15px 15px;
}

.zhiheng-recent header { margin-bottom: 9px; }
.zhiheng-recent h4 { margin: 0; color: #274943; font-size: 13px; }
.zhiheng-recent ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.zhiheng-recent li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 7px; align-items: start; }
.zhiheng-recent-dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border: 2px solid #d4a353;
  border-radius: 50%;
  background: #fff;
}
.zhiheng-recent li div { display: grid; gap: 2px; }
.zhiheng-recent strong { color: #35514b; font-size: 11px; line-height: 1.4; }
.zhiheng-recent li span:last-child { color: #83908c; font-size: 10px; }

@media (max-width: 1320px) and (min-width: 761px) {
  .customer-insight { color: #536964; background: #fff; }
  .zhiheng-toggle { color: #153a42; }
  .zhiheng-toggle small { color: #71827e; }
  .zhiheng-context-portrait { height: 268px; }
}

@media (max-width: 760px) {
  .customer-detail-grid { gap: 12px; }
  .work-item-card { padding: 14px; }
  .work-item-card .work-item-copy p { grid-template-columns: 1fr; gap: 3px; }
  .work-item-card .child-action-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .work-item-card .child-action-create { grid-template-columns: minmax(0, 1fr) auto; }
  .work-item-card .work-action-shell {
    position: relative;
    display: grid;
    justify-items: end;
  }
  .work-item-card .work-item-controls {
    position: absolute;
    z-index: 31;
    right: 0;
    bottom: calc(100% + 8px);
    top: auto;
    left: auto;
    width: min(540px, calc(100vw - 40px));
    max-height: min(560px, calc(100vh - 28px));
    overflow: auto;
    border: 1px solid #dfcfac;
    padding: 14px;
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 22px 52px rgba(13, 48, 56, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(7px) scale(0.985);
    transform-origin: right bottom;
    pointer-events: none;
    transition: opacity 170ms ease, transform 170ms ease, visibility 0s linear 170ms;
  }
  .work-item-card .work-action-shell.is-open .work-item-controls {
    max-height: min(560px, calc(100vh - 28px));
    margin-top: 0;
    overflow: auto;
    border-width: 1px;
    padding: 14px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 0s;
  }
  .customer-insight { color: #536964; background: #fff; }
  .zhiheng-toggle { color: #153a42; }
  .zhiheng-toggle small { color: #71827e; }
  .zhiheng-context-portrait { height: min(460px, 76vw); }
  .zhiheng-seat-body { background: #fff; }
}

body.has-customer-collaboration { overflow: hidden; }

.customer-collaboration-overlay {
  position: fixed;
  z-index: 160;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 35, 42, 0.68);
  backdrop-filter: blur(5px);
}

.customer-collaboration-overlay[hidden] { display: none; }

.customer-collaboration-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1040px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(213, 182, 112, 0.55);
  border-radius: 14px;
  color: #173b43;
  background: #f7faf9;
  box-shadow: 0 28px 80px rgba(4, 29, 36, 0.34);
  outline: none;
}

.customer-collaboration-panel:focus-visible { box-shadow: 0 28px 80px rgba(4, 29, 36, 0.34), 0 0 0 3px rgba(216, 184, 112, 0.5); }

.customer-collaboration-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 22px;
  color: #fff;
  background: linear-gradient(135deg, #073b47, #0d5965);
}

.customer-collaboration-identity { display: flex; min-width: 0; align-items: center; gap: 13px; }
.customer-collaboration-identity img {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 2px solid rgba(216, 184, 112, 0.85);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 26%;
  background: #0a4652;
}
.customer-collaboration-identity span { color: #e0bf7e; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.customer-collaboration-identity h2 { margin: 3px 0 0; color: #fff; font-size: 24px; }

.customer-collaboration-close {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 7px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
  font-size: 22px;
  line-height: 1;
  transform: none;
}

.customer-collaboration-close:hover,
.customer-collaboration-close:focus-visible { border-color: #e0bf7e; background: rgba(255, 255, 255, 0.14); transform: none; }

.customer-collaboration-body {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 16px 20px 18px;
  background: #f4f8f7;
}

.customer-collaboration-conclusion {
  border: 1px solid #dfcfaa;
  border-radius: 9px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffaf0, #fff);
}
.customer-collaboration-conclusion > span { color: #9b6d24; font-size: 11px; font-weight: 800; }
.customer-collaboration-conclusion h3 { margin: 5px 0 4px; color: #153b43; font-size: 18px; }
.customer-collaboration-conclusion p { margin: 0; color: #61736f; font-size: 13px; line-height: 1.6; }

.customer-collaboration-overview-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 12px; }
.customer-collaboration-card {
  min-width: 0;
  border: 1px solid #dce6e3;
  border-radius: 9px;
  padding: 14px 15px;
  background: #fff;
  box-shadow: none;
}
.customer-collaboration-card > header { display: flex; align-items: center; gap: 8px; margin-bottom: 11px; }
.customer-collaboration-card > header > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  color: #8c6729;
  background: #f4ead5;
  font-size: 10px;
  font-weight: 800;
}
.customer-collaboration-card h3 { margin: 0; color: #173f47; font-size: 15px; }
#customerCollaborationOverview h4 { margin: 0 0 3px; color: #123b44; font-size: 17px; }
#customerCollaborationOverview > p { margin: 0 0 9px; color: #6a7c78; font-size: 12px; }
.customer-collaboration-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.customer-collaboration-tags span { border-radius: 5px; padding: 3px 7px; color: #815e25; background: #f7edd9; font-size: 10px; }
#customerCollaborationOverview dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 10px; margin: 0; }
#customerCollaborationOverview dl div { min-width: 0; }
#customerCollaborationOverview dt { color: #899692; font-size: 10px; }
#customerCollaborationOverview dd { margin: 2px 0 0; overflow-wrap: anywhere; color: #3e5a55; font-size: 12px; }

.customer-collaboration-focus-list,
.customer-collaboration-advice ol,
.customer-collaboration-recent-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.customer-collaboration-focus-list li { border-top: 1px solid #edf1f0; padding-top: 8px; }
.customer-collaboration-focus-list li:first-child { border-top: 0; padding-top: 0; }
.customer-collaboration-focus-list li > div { display: flex; align-items: center; gap: 8px; }
.customer-collaboration-focus-list li > div span { border-radius: 5px; padding: 2px 6px; color: #1f5c6b; background: #e7f1f2; font-size: 10px; }
.customer-collaboration-focus-list strong { color: #244a50; font-size: 13px; }
.customer-collaboration-focus-list p { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 5px; margin: 5px 0 0; color: #60736f; font-size: 11px; line-height: 1.45; }
.customer-collaboration-focus-list p span { color: #9a8170; }

.customer-collaboration-advice ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-collaboration-advice li { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 8px; align-items: start; border: 1px solid #e6ecea; border-radius: 7px; padding: 9px; }
.customer-collaboration-advice li > span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: #8b6729; background: #f7edd9; font-size: 11px; font-weight: 800; }
.customer-collaboration-advice li p { margin: 1px 0 0; color: #4f6863; font-size: 11px; line-height: 1.5; }

.customer-collaboration-recent-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.customer-collaboration-recent-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; border-left: 2px solid #d6b36b; padding-left: 9px; }
.customer-collaboration-recent-list time { color: #8a9692; font-size: 10px; }
.customer-collaboration-recent-list div { display: grid; gap: 3px; }
.customer-collaboration-recent-list strong { color: #35524d; font-size: 11px; }
.customer-collaboration-recent-list span { color: #75847f; font-size: 10px; line-height: 1.4; }

.customer-collaboration-questions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.customer-collaboration-questions button {
  min-height: 34px;
  border: 1px solid #cdddda;
  border-radius: 6px;
  padding: 6px 9px;
  color: #315a60;
  background: #f8fbfa;
  box-shadow: none;
  font-size: 11px;
  text-align: left;
  transform: none;
}
.customer-collaboration-questions button:hover,
.customer-collaboration-questions button:focus-visible { border-color: #b9944f; background: #fffaf0; transform: none; }
.customer-collaboration-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 8px; }
.customer-collaboration-input-row input { min-width: 0; min-height: 36px; border-radius: 6px; }
.customer-collaboration-input-row button { min-width: 74px; border-radius: 6px; box-shadow: none; }
.customer-collaboration-answer { min-height: 20px; margin: 8px 0 0; border-left: 2px solid #d6b36b; padding-left: 9px; color: #536d68; font-size: 11px; line-height: 1.5; }

.customer-collaboration-footer { display: flex; justify-content: flex-end; border-top: 1px solid #dce5e2; padding: 11px 20px; background: #fff; }
.customer-collaboration-footer button { min-width: 128px; border-radius: 6px; box-shadow: none; }

@media (max-width: 760px) {
  .customer-collaboration-overlay { padding: 10px; }
  .customer-collaboration-panel { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 10px; }
  .customer-collaboration-header { padding: 13px 14px; }
  .customer-collaboration-identity img { width: 44px; height: 44px; flex-basis: 44px; }
  .customer-collaboration-identity h2 { font-size: 19px; }
  .customer-collaboration-body { gap: 9px; padding: 11px; }
  .customer-collaboration-conclusion,
  .customer-collaboration-card { padding: 11px; }
  .customer-collaboration-overview-grid,
  .customer-collaboration-advice ol,
  .customer-collaboration-recent-list,
  .customer-collaboration-questions { grid-template-columns: 1fr; }
  .customer-collaboration-conclusion h3 { font-size: 16px; }
  .customer-collaboration-focus-list p { grid-template-columns: 38px minmax(0, 1fr); }
  .customer-collaboration-footer { padding: 9px 12px; }
}


.app-shell:has(#customers.active, #customerDetail.active) .customer-directory-topbar h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}

.app-shell:has(#customers.active, #customerDetail.active) .customer-detail-header {
  gap: 20px;
  padding: 18px 20px;
}

.app-shell:has(#customers.active, #customerDetail.active) .customer-breadcrumb {
  margin-bottom: 8px;
  color: #6d7c78;
  font-size: 12px;
}


.app-shell:has(#customers.active, #customerDetail.active) .customer-detail-header h3 {
  margin: 0;
  color: #113944;
  font-size: 26px;
  line-height: 1.3;
}

.app-shell:has(#customers.active, #customerDetail.active) .customer-detail-header p {
  margin: 6px 0 0;
  color: #6d7c78;
  font-size: 12px;
  line-height: 1.5;
}

.app-shell:has(#customers.active, #customerDetail.active) .customer-detail-header .customer-return {
  border-color: transparent;
  padding: 6px 8px;
  color: #6d7c78;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 400;
}

.app-shell:has(#customers.active, #customerDetail.active) .customer-detail-header .customer-return:hover,
.app-shell:has(#customers.active, #customerDetail.active) .customer-detail-header .customer-return:focus-visible {
  color: #113944;
  background: #f1f6f4;
  transform: none;
}


#customerCollaborationModal .customer-collaboration-card h3,
#customerCollaborationModal .customer-collaboration-conclusion h3 {
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
}

#customerCollaborationModal .customer-collaboration-card > header {
  margin-bottom: 14px;
}

#customerCollaborationModal #customerCollaborationOverview h4,
#customerCollaborationModal .customer-collaboration-focus-list strong,
#customerCollaborationModal .customer-collaboration-recent-list strong {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#customerCollaborationModal .customer-collaboration-conclusion p,
#customerCollaborationModal #customerCollaborationOverview dd,
#customerCollaborationModal .customer-collaboration-focus-list p,
#customerCollaborationModal .customer-collaboration-advice li p,
#customerCollaborationModal .customer-collaboration-answer {
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}

#customerCollaborationModal .customer-collaboration-identity span,
#customerCollaborationModal .customer-collaboration-conclusion > span,
#customerCollaborationModal .customer-collaboration-card > header > span,
#customerCollaborationModal .customer-collaboration-tags span,
#customerCollaborationModal #customerCollaborationOverview dt,
#customerCollaborationModal .customer-collaboration-focus-list li > div span,
#customerCollaborationModal .customer-collaboration-advice li > span,
#customerCollaborationModal .customer-collaboration-recent-list time {
  font-size: 12px;
  line-height: 18px;
}

#customerCollaborationModal #customerCollaborationOverview > p,
#customerCollaborationModal .customer-collaboration-recent-list span {
  font-size: 13px;
  line-height: 21px;
}

#customerCollaborationModal #customerCollaborationOverview dl {
  gap: 10px 12px;
}

#customerCollaborationModal .customer-collaboration-focus-list {
  gap: 14px;
}

#customerCollaborationModal .customer-collaboration-focus-list li {
  border-top-color: #f1f4f3;
  padding-top: 14px;
}

#customerCollaborationModal .customer-collaboration-focus-list li:first-child {
  padding-top: 0;
}

#customerCollaborationModal .customer-collaboration-focus-list p {
  margin-top: 8px;
  gap: 8px;
}

#customerCollaborationModal .customer-collaboration-focus-list p span {
  color: #75847f;
  font-size: 12px;
  font-weight: 400;
}

#customerCollaborationModal .customer-collaboration-advice li {
  padding: 14px 11px;
}

#customerCollaborationModal .customer-collaboration-recent-list div {
  gap: 6px;
}

#customerCollaborationModal .customer-collaboration-questions button,
#customerCollaborationModal .customer-collaboration-input-row input,
#customerCollaborationModal .customer-collaboration-input-row button,
#customerCollaborationModal .customer-collaboration-footer button {
  font-size: 14px;
  line-height: 22px;
}



#customerCollaborationModal {
  position: fixed; inset: 0; padding: 0; background: rgba(7, 35, 42, 0.68); backdrop-filter: blur(5px);
}
#customerCollaborationModal .customer-collaboration-panel {
  position: absolute;
  inset: 12px 12px 12px auto;
  display: flex;
  flex-direction: column;
  width: min(820px, calc(100vw - 24px));
  height: calc(100% - 24px);
  max-height: calc(100% - 24px);
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgba(213, 182, 112, 0.55);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(4, 29, 36, 0.34);
}
#customerCollaborationModal .customer-collaboration-header {
  position: static; flex: 0 0 auto; width: 100%; box-sizing: border-box; padding: 12px 20px; gap: 12px;
}
#customerCollaborationModal .customer-collaboration-identity { gap: 10px; }
#customerCollaborationModal .customer-collaboration-identity img { width: 36px; height: 36px; flex-basis: 36px; }
#customerCollaborationModal .customer-collaboration-identity h2 { margin: 0; font-size: 20px; line-height: 28px; }
#customerCollaborationModal .customer-collaboration-body {
  position: static;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
  align-content: start;
  gap: 16px;
  padding: 16px 20px;
  overscroll-behavior: contain;
}
#customerCollaborationModal .customer-collaboration-conclusion { border: 0; border-left: 2px solid #d6b36b; border-radius: 0; padding: 2px 0 2px 12px; background: radial-gradient(ellipse 38% 100% at 0% 0%, rgba(213, 182, 112, 0.20) 0%, rgba(213, 182, 112, 0.12) 40%, rgba(213, 182, 112, 0.04) 72%, rgba(213, 182, 112, 0) 100%); }
#customerCollaborationModal .customer-collaboration-conclusion h3 { margin: 0 0 6px; font-size: 16px; line-height: 24px; }
#customerCollaborationModal .customer-collaboration-overview-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
#customerCollaborationModal .customer-collaboration-context { border: 0; padding: 0; background: transparent; }
#customerCollaborationModal #customerCollaborationOverview { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
#customerCollaborationModal #customerCollaborationOverview h4, #customerCollaborationModal #customerCollaborationOverview > p { margin: 0; }
#customerCollaborationModal #customerCollaborationOverview .customer-collaboration-tags, #customerCollaborationModal #customerCollaborationOverview dl { display: none; }
#customerCollaborationModal .customer-collaboration-focus-list li > div { flex-wrap: wrap; }
#customerCollaborationModal .customer-collaboration-focus-list li > p:first-of-type { display: block; }
#customerCollaborationModal .customer-collaboration-focus-list li > p:first-of-type > span { display: none; }
#customerCollaborationModal .customer-collaboration-advice ol, #customerCollaborationModal .customer-collaboration-recent-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
#customerCollaborationModal .customer-collaboration-advice li { border: 0; border-radius: 0; padding: 4px 0; gap: 10px; }
#customerCollaborationModal .customer-collaboration-recent-list li { grid-template-columns: 82px minmax(0, 1fr); border-left-width: 1px; padding-left: 10px; }
#customerCollaborationModal .customer-collaboration-footer {
  position: static;
  inset: auto;
  display: block;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  max-height: 44dvh;
  box-sizing: border-box;
  margin: 0;
  overflow: auto;
  border-top: 1px solid #dce5e2;
  border-radius: 0;
  padding: 12px 20px;
  background: #fff;
  box-shadow: none;
  overscroll-behavior: contain;
}
#customerCollaborationModal .customer-collaboration-ask {
  position: static; inset: auto; float: none; width: 100%; min-width: 0; max-width: none; box-sizing: border-box; margin: 0; border: 0; border-radius: 0; padding: 0; background: transparent; box-shadow: none;
}
#customerCollaborationModal .customer-collaboration-ask > header { margin-bottom: 8px; }
#customerCollaborationModal .customer-collaboration-ask h3 { font-size: 16px; line-height: 24px; }
#customerCollaborationModal .customer-collaboration-questions { display: flex; flex-wrap: wrap; gap: 6px; }
#customerCollaborationModal .customer-collaboration-questions button { min-width: 0; min-height: 28px; max-width: 100%; border-radius: 14px; padding: 4px 9px; font-size: 12px; line-height: 18px; white-space: normal; }
#customerCollaborationModal .customer-collaboration-input-row button { min-width: 64px; }
#customerCollaborationModal .customer-collaboration-answer { margin-top: 8px; font-size: 13px; line-height: 21px; }


#customerCollaborationModal .customer-collaboration-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 8px;
}
#customerCollaborationModal .customer-collaboration-input-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


#customerCollaborationModal {
  overflow: clip;
}
@supports (transition-behavior: allow-discrete) {
  @media (prefers-reduced-motion: no-preference) {
    #customerCollaborationModal {
      display: grid;
      opacity: 1;
      transition: opacity 360ms cubic-bezier(0.25, 0.1, 0.25, 1),
                  display 360ms allow-discrete;
    }
    #customerCollaborationModal[hidden] {
      display: none;
      opacity: 0;
      pointer-events: none;
      transition-duration: 300ms;
    }
    #customerCollaborationModal .customer-collaboration-panel {
      transform: translateX(0);
      transition: transform 360ms cubic-bezier(0.25, 0.1, 0.25, 1);
    }
    #customerCollaborationModal[hidden] .customer-collaboration-panel {
      transform: translateX(calc(100% + 12px));
      transition-duration: 300ms;
    }
    @starting-style {
      #customerCollaborationModal:not([hidden]) {
        opacity: 0;
      }
      #customerCollaborationModal:not([hidden]) .customer-collaboration-panel {
        transform: translateX(calc(100% + 12px));
      }
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  #customerCollaborationModal,
  #customerCollaborationModal .customer-collaboration-panel {
    transition: none;
    transform: none;
  }
}


#customerCollaborationModal #customerCollaborationAnswer:empty {
  display: none;
}
.app-shell:has(#customers.active, #customerDetail.active) #zhihengSeat .zhiheng-context-copy h3 {
  margin: 0 0 12px;
}


.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-profile-card:hover {
  transform: none;
  box-shadow: 0 8px 24px rgba(18, 63, 74, 0.055);
}
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-timeline-section:hover,
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .work-item-card:hover {
  transform: none;
  box-shadow: 0 12px 34px rgba(17, 57, 66, 0.07);
}
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .work-item-card:hover,
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-work-section:hover {
  transform: none;
  box-shadow: none;
}


.app-shell:has(#customers.active, #customerDetail.active) #zhihengSeat .zhiheng-recent h4 {
  font-size: 16px;
  line-height: 24px;
}
.app-shell:has(#customers.active, #customerDetail.active) #zhihengSeat .zhiheng-recent li strong {
  font-size: 14px;
  line-height: 22px;
}
.app-shell:has(#customers.active, #customerDetail.active) #zhihengSeat .zhiheng-recent li div > span {
  font-size: 13px;
  line-height: 20px;
}


.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .child-actions > p.empty {
  font-size: 13px;
  line-height: 20px;
}


#customerCollaborationModal .customer-collaboration-avatar {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid rgba(216, 184, 112, 0.85);
  border-radius: 50%;
  background: #0a4652;
}
#customerCollaborationModal .customer-collaboration-avatar img {
  position: absolute;
  left: -50%;
  top: -10%;
  display: block;
  width: 200%;
  height: auto;
  max-width: none;
  flex: none;
  border: 0;
  border-radius: 0;
}



.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: clamp(200px, 48vh, 420px);
  color: #61736f;
  font-size: 14px;
  line-height: 22px;
}
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  box-sizing: border-box;
  border: 2px solid #dce7e4;
  border-top-color: #d6b36b;
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-spinner {
    animation: customer-load-turn 1s linear infinite;
  }
}
@keyframes customer-load-turn { to { transform: rotate(360deg); } }
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-error[hidden] { display: none; }
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-error {
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #dce7e4;
  border-radius: 12px;
  padding: 28px;
  color: #113944;
  background: #fff;
}
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-error strong { font-size: 18px; }
.app-shell:has(#customers.active, #customerDetail.active) #customerDetail .customer-load-error p { color: #61736f; font-size: 14px; }


.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity, .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.sidebar-compact { --sidebar-motion-duration: 360ms; --sidebar-motion-easing: cubic-bezier(0.25, 0.1, 0.25, 1); grid-template-columns: 212px minmax(0, 1fr); transition: grid-template-columns var(--sidebar-motion-duration) var(--sidebar-motion-easing); }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact { --sidebar-motion-duration: 300ms; grid-template-columns: 0 minmax(0, 1fr); }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar {
  position: sticky; top: 0; width: 212px; min-width: 212px; height: 100vh;
  box-sizing: border-box; padding: 14px 10px; display: flex; flex-direction: column;
  gap: 16px; overflow-y: auto; border-right: 0; opacity: 1; visibility: visible;
  pointer-events: auto; transform: translateX(0);
  background: linear-gradient(180deg, #092b34 0%, #103f49 100%);
  box-shadow: 8px 0 28px rgba(9,43,52,.1);
  transition: transform var(--sidebar-motion-duration) var(--sidebar-motion-easing);
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact .sidebar { transform: translateX(-105%); pointer-events: none; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-hidden .sidebar { opacity: 0; visibility: hidden; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .brand { min-width: 0; gap: 12px; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .brand strong { color: #f7faf9; font-size: 16px; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .customer-brand-mark { width: 42px; height: 42px; border: 0; border-radius: 8px; background: #123f4a; color: white; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .customer-brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar nav { display: grid; gap: 14px; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav-group { display: grid; grid-template-columns: 1fr; gap: 4px; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav { font-size: 16px; text-align: left; border: 1px solid transparent; border-radius: 6px; color: rgba(247,250,249,.82); background: transparent; box-shadow: none; transform: none; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav:hover { border-color: rgba(223,197,143,.26); background: rgba(255,255,255,.08); color: #fff9ed; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .logout { display: block; margin-top: auto; padding: 9px 13px; font-size: 16px; color: #f1c9c3; background: transparent; border: 1px solid transparent; box-shadow: none; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar-head .brand {
  min-width: 0;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity [data-sidebar-collapse] {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(115, 190, 207, 0.28);
  border-radius: 50%;
  padding: 0;
  color: #d9eff3;
  background: rgba(10, 79, 96, 0.66);
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity [data-sidebar-expand] {
  position: fixed;
  z-index: 80;
  top: 16px;
  left: 16px;
  display: grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 91, 108, 0.24);
  border-radius: 50%;
  padding: 0;
  color: #eaf7f8;
  background: #0d4b5a;
  box-shadow: 0 10px 24px rgba(8, 45, 54, 0.22);
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 10px;
  white-space: nowrap;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #afd6de;
  font-weight: 700;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .nav-icon-svg {
  width: 18px;
  height: 18px;
}

.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav.active .nav-icon {
  color: #e6f8fb;
  background: rgba(113, 197, 214, 0.035);
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav.active {
  border-color: rgba(106, 189, 207, 0.10);
  color: #f2fbfc;
  background: linear-gradient(90deg, rgba(20, 88, 99, 0.80) 0%, rgba(17, 77, 89, 0.48) 58%, rgba(16, 64, 74, 0.22) 100%);
  box-shadow: inset 0 1px 0 rgba(210, 228, 222, 0.04);
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 1px;
  border-radius: 2px;
  background: #e0bf7e;
  pointer-events: none;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .nav-status {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(239, 218, 174, 0.4);
  border-radius: 999px;
  color: #cbe8e5;
  font-size: 10px;
  font-weight: 800;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .shell-icon, .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .nav-icon-svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .nav-icon-svg { width: 18px; height: 18px; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity [data-sidebar-collapse] { min-width: 32px; height: 32px; box-shadow: none; transform: none; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity [data-sidebar-expand] { min-width: 38px; height: 38px; opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact:not(.parity-moving) [data-sidebar-expand] { opacity: 1; visibility: visible; pointer-events: auto; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .topbar-heading { min-width: 0; padding-left: 0; transform: translateX(0); transition: transform var(--sidebar-motion-duration) var(--sidebar-motion-easing); }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact .topbar-heading { transform: translateX(72px); }
@media (max-width: 760px) {
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity, .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact { grid-template-columns: minmax(0, 1fr); }
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar { position: fixed; z-index: 70; inset: 0 auto 0 0; width: min(212px, calc(100vw - 56px)); min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity, .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar, .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .topbar-heading { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-moving .sidebar,
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-moving .topbar-heading { will-change: transform; }
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity [data-sidebar-expand] { transition: opacity 120ms ease; }
}


.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity,
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.sidebar-compact,
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact {
  grid-template-columns: 212px minmax(0, 1fr);
  transition: none;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar,
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .topbar-heading { transition: none; }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity > .workspace {
  transform: translateX(0);
  background: transparent;
  will-change: transform;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact > .workspace { transform: translateX(-106px); }
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .topbar-heading,
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact .topbar-heading { transform: none; }
@media (max-width: 760px) {
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity,
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.sidebar-compact,
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact { grid-template-columns: minmax(0, 1fr); }
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity > .workspace,
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact > .workspace { transform: none; will-change: auto; }
  .app-shell:has(#customers.active, #customerDetail.active).sidebar-parity.parity-compact .topbar-heading { transform: translateX(72px); }
}


.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity {
  background:
    radial-gradient(circle at 84% 4%, rgba(214, 175, 100, 0.12), transparent 27%),
    linear-gradient(145deg, #f8faf9 0%, #eff5f3 52%, #f8f5ee 100%);
}


#customerCollaborationModal .customer-collaboration-close {
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
  color: #fff9ed;
  box-shadow: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}
#customerCollaborationModal .customer-collaboration-close svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}
#customerCollaborationModal .customer-collaboration-close:hover,
#customerCollaborationModal .customer-collaboration-close:focus-visible {
  border-color: #e0bf7e;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  outline: none;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  #customerCollaborationModal .customer-collaboration-close { transition: none; }
}


.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .nav-status[data-status="attention"] {
  min-width: 18px;
  height: 18px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  border-color: transparent;
  color: #e0bf7e;
  background: transparent;
  justify-items: start;
}


.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav[data-view="messages"] {
  grid-template-columns: 28px max-content max-content;
  column-gap: 0;
  justify-content: start;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav[data-view="messages"] .nav-label {
  margin-left: 9px;
}
.app-shell:has(#customers.active, #customerDetail.active).sidebar-parity .sidebar .nav[data-view="messages"] .nav-status {
  margin-left: 12px;
}


body:has(#customers.active) .customer-directory-topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; }
body:has(#customers.active) #newCustomer { display:inline-flex; align-items:center; gap:4px; font-size:14px; min-height:40px; }
body:has(#customers.active) .directory-panel { width:min(1320px,100%); margin:0 auto; background:#fff; border:1px solid #deE9e6; border-radius:14px; box-shadow:0 12px 32px rgba(17,57,66,.055); overflow:hidden; }
body:has(#customers.active) .directory-toolbar { display:flex; align-items:center; gap:24px; padding:24px 24px 20px; }
body:has(#customers.active) .directory-search { display:flex; align-items:center; gap:10px; width:min(520px,100%); border:1px solid #d8e4e1; background:#f8faf9; border-radius:8px; padding:0 13px; }
body:has(#customers.active) .directory-search svg { width:18px; height:18px; flex-shrink:0; fill:none; stroke:#788d89; stroke-width:1.6; }
body:has(#customers.active) .directory-search input { width:100%; min-width:0; border:0; background:transparent; color:#123f4a; padding:12px 0; outline:none; font-size:14px; box-shadow:none; }
body:has(#customers.active) .directory-search:focus-within { border-color:#9b813f; outline:2px solid rgba(224,191,126,.16); }
body:has(#customers.active) .directory-search input::placeholder { color:#859591; }
body:has(#customers.active) .directory-channel { display:flex; align-items:center; gap:10px; margin-left:auto; font-size:13px; color:#6e827d; white-space:nowrap; }
body:has(#customers.active) .directory-channel select { border:1px solid #d8e4e1; border-radius:7px; background:#fff; color:#365853; padding:10px 12px; min-width:130px; }
body:has(#customers.active) .directory-filterbar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 24px; border-bottom:1px solid #e2ebe8; }
body:has(#customers.active) .directory-filters { display:flex; gap:24px; }
body:has(#customers.active) .directory-filters button { position:relative; background:transparent; color:#71847f; border:0; border-radius:0; padding:12px 0 17px; font-size:14px; box-shadow:none; }
body:has(#customers.active) .directory-filters button span { margin-left:6px; color:#8b9b96; font-size:12px; font-variant-numeric:tabular-nums; }
body:has(#customers.active) .directory-filters button[aria-pressed="true"] { color:#123f4a; font-weight:600; }
body:has(#customers.active) .directory-filters button[aria-pressed="true"]::after { content:""; position:absolute; bottom:0; left:0; right:0; height:2px; border-radius:1px; background:#c5a466; }
body:has(#customers.active) #directoryCount { font-size:12px; color:#82938e; }
body:has(#customers.active) .directory-table { width:100%; table-layout:fixed; border-collapse:collapse; color:#365650; font-size:13px; }
body:has(#customers.active) .dir-col-name { width:17%; } body:has(#customers.active) .dir-col-contact { width:21%; } body:has(#customers.active) .dir-col-country { width:11%; } body:has(#customers.active) .dir-col-channel { width:12%; } body:has(#customers.active) .dir-col-state { width:16%; } body:has(#customers.active) .dir-col-activity { width:19%; } body:has(#customers.active) .dir-col-arrow { width:4%; }
body:has(#customers.active) .directory-table th { background:#fafcfb; color:#7c8f88; font-size:12px; font-weight:400; text-align:left; padding:15px 12px; border-bottom:1px solid #edf1ef; }
body:has(#customers.active) .directory-table td { padding:25px 12px; border-bottom:1px solid #e7efec; vertical-align:top; line-height:22px; overflow-wrap:anywhere; }
body:has(#customers.active) .directory-table :is(th,td):first-child { padding-left:24px; }
body:has(#customers.active) .directory-table tbody tr { cursor:pointer; transition:background-color 140ms ease; }
body:has(#customers.active) .directory-table tbody tr:hover { background:#f5f9f7; }
body:has(#customers.active) .directory-customer { color:#123f4a; font-size:16px; font-weight:650; text-decoration:none; }
body:has(#customers.active) .directory-customer:hover { color:#8b6a2b; }
body:has(#customers.active) .directory-subline { display:block; margin-top:6px; color:#82918d; font-size:12px; line-height:19px; }
body:has(#customers.active) .directory-contact { font-size:14px; color:#365650; font-weight:600; }
body:has(#customers.active) .directory-contact-role { color:#7a8d85; font-size:12px; margin-left:8px; }
body:has(#customers.active) .directory-channel-name { display:inline-flex; align-items:center; gap:6px; }
body:has(#customers.active) .directory-channel-name i { width:5px; height:5px; border-radius:50%; background:#269b90; }
body:has(#customers.active) .directory-current { color:#365650; }
body:has(#customers.active) .directory-waiting { display:table; margin-top:6px; padding:0 6px; border-radius:4px; background:#f7f0e0; color:#92743a; font-size:12px; line-height:20px; }
body:has(#customers.active) .directory-open { display:flex; color:#9bacA5; padding-top:1px; }
body:has(#customers.active) .directory-open svg { width:16px; height:20px; stroke:currentColor; stroke-width:1.5; fill:none; }
body:has(#customers.active) .directory-footer { display:flex; justify-content:flex-end; padding:15px 24px; color:#8a9994; font-size:12px; }
body:has(#customers.active) .directory-empty { text-align:center; padding:56px 20px; color:#365650; }
body:has(#customers.active) .directory-empty strong { font-size:16px; font-weight:600; }
body:has(#customers.active) .directory-empty p { font-size:14px; color:#82918d; margin:10px 0 20px; }
body:has(#customers.active) [hidden] { display:none !important; }
body:has(#customers.active) .directory-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
body:has(#customers.active) .directory-create { width:min(540px,calc(100% - 40px)); max-height:calc(100vh - 48px); padding:0; border:1px solid #d6e3df; border-radius:14px; color:#123f4a; background:#fff; box-shadow:0 24px 80px rgba(9,43,52,.22); }
body:has(#customers.active) .directory-create::backdrop { background:rgba(7,35,42,.55); }
body:has(#customers.active) .directory-create header { display:flex; justify-content:space-between; align-items:center; padding:22px 24px; border-bottom:1px solid #e4ece9; }
body:has(#customers.active) .directory-create h2 { margin:0; font-size:20px; }
body:has(#customers.active) .directory-close { display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; background:transparent; color:#789188; }
body:has(#customers.active) .directory-close svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.5; fill:none; }
body:has(#customers.active) .directory-form-fields { display:grid; grid-template-columns:1fr 1fr; gap:20px 16px; padding:24px; }
body:has(#customers.active) .directory-form-fields label { display:block; font-size:13px; color:#607a70; }
body:has(#customers.active) .directory-form-fields label>span { color:#a07c37; }
body:has(#customers.active) .directory-form-fields :is(input,select) { display:block; width:100%; margin-top:8px; padding:10px; border:1px solid #d8e4e0; border-radius:6px; color:#123f4a; background:#fff; font-size:14px; }
body:has(#customers.active) .directory-field-wide { grid-column:1 / -1; }
body:has(#customers.active) .directory-create footer { display:flex; justify-content:flex-end; gap:10px; padding:18px 24px; border-top:1px solid #e4ece9; }
body:has(#customers.active) .directory-create-status { color:#936b2d; font-size:13px; margin:0; padding:0 24px 20px; }
body:has(#customers.active) .workspace button, body:has(#customers.active) .directory-create button { transform:none; transition:background-color 140ms ease,color 140ms ease,border-color 140ms ease; }
body:has(#customers.active) .workspace button:hover, body:has(#customers.active) .directory-create button:hover { transform:none; }
body:has(#customers.active) .workspace :is(a,button,select):focus-visible, body:has(#customers.active) .directory-create :is(input,button,select):focus-visible { outline:2px solid #c5a466; outline-offset:3px; }
@media(max-width:1100px) { body:has(#customers.active) .directory-toolbar { gap:12px; padding:20px 16px; } body:has(#customers.active) .directory-table :is(th,td) { padding-left:8px; padding-right:8px; } body:has(#customers.active) .directory-contact-role { display:block; margin-left:0; } }
@media(max-width:760px) { body:has(#customers.active) .directory-toolbar { flex-wrap:wrap; } body:has(#customers.active) .directory-search { width:100%; } body:has(#customers.active) .directory-channel { margin-left:0; } body:has(#customers.active) .directory-table thead { display:none; } body:has(#customers.active) .directory-table tbody tr { display:grid; grid-template-columns:1fr 1fr; padding:12px; } body:has(#customers.active) .directory-table td { display:block; padding:12px !important; border:0; } body:has(#customers.active) .directory-table td:last-child { display:none; } body:has(#customers.active) .directory-filters { gap:14px; } body:has(#customers.active) .directory-filterbar { padding:0 16px; } }
@media(prefers-reduced-motion:reduce) { body:has(#customers.active) .directory-table tbody tr,body:has(#customers.active) .workspace button,body:has(#customers.active) .directory-create button { transition:none; } }


body:has(#customers.active) .directory-footer { flex-wrap:wrap; align-items:center; gap:14px 20px; }
body:has(#customers.active) .directory-pagination { display:flex; align-items:center; flex-wrap:wrap; gap:18px; margin-left:auto; color:#657d74; font-size:12px; }
body:has(#customers.active) .directory-pagination :is(label,nav,form) { display:flex; align-items:center; gap:6px; white-space:nowrap; flex-shrink:0; }
body:has(#customers.active) .directory-pagination :is(button,input,select) { height:32px; min-height:32px; margin:0; border:1px solid #dbe6e2; border-radius:5px; padding:4px 9px; background:#fff; color:#365650; font-size:12px; line-height:20px; box-shadow:none; }
body:has(#customers.active) .directory-pagination input { width:46px; text-align:center; }
body:has(#customers.active) #directoryPages button { min-width:32px; }
body:has(#customers.active) .directory-pagination button:hover { background:#f1f6f3; border-color:#c3d5cd; transform:none; }
body:has(#customers.active) #directoryPages button[aria-current="page"] { background:#123f4a; color:#fff9ed; border-color:#123f4a; }
body:has(#customers.active) .directory-pagination button:disabled { opacity:.4; cursor:default; }
body:has(#customers.active) body:has(#customers.active)-error { flex-basis:100%; text-align:right; color:#996b31; }
body:has(#customers.active) .directory-pagination input[aria-invalid="true"] { border-color:#996b31; }
@media(max-width:1100px) { body:has(#customers.active) .directory-pagination { gap:10px; } }


.w07-contact-dialog {width:min(640px,calc(100vw - 40px));max-height:calc(100vh - 48px);padding:0;border:1px solid #d6e3df;border-radius:14px;background:#fff;color:#123f4a;box-shadow:0 24px 80px rgba(9,43,52,.22);}
.w07-contact-dialog::backdrop {background:rgba(7,35,42,.55);}
.w07-contact-dialog header {display:flex;align-items:center;justify-content:space-between;padding:22px 24px;border-bottom:1px solid #e4ece9;}
.w07-contact-dialog h2 {font-size:20px;margin:0;}.w07-contact-dialog header p {font-size:13px;color:#789087;margin:7px 0 0;}
.w07-contact-dialog .contact-close {background:transparent;border:0;color:#789188;font-size:24px;padding:0;width:32px;height:32px;}
.w07-contact-dialog .contact-manager-body {padding:0 24px 24px;}
.w07-contact-dialog article {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 0;border-bottom:1px solid #e7efec;}
.w07-contact-dialog article div {min-width:0;}.w07-contact-dialog article strong {font-size:15px;}.w07-contact-dialog article span {display:block;font-size:13px;color:#789087;margin-top:7px;overflow-wrap:anywhere;}
.w07-contact-dialog button {font-size:13px;white-space:nowrap;transform:none;transition:background-color 140ms,color 140ms;}
.w07-contact-dialog button:hover {transform:none;}
.w07-contact-dialog #contactAdd {margin-top:20px;}
.w07-contact-dialog footer {padding:18px 24px;border-top:1px solid #e4ece9;display:flex;justify-content:flex-end;}
.w07-contact-dialog form {margin-top:22px;padding-top:20px;border-top:1px solid #e4ece9;}
.w07-contact-dialog h3 {font-size:15px;margin:0 0 18px;}
.w07-contact-dialog .contact-fields {display:grid;grid-template-columns:1fr 1fr;gap:18px 16px;}
.w07-contact-dialog label {display:block;font-size:13px;color:#607a70;}
.w07-contact-dialog input {display:block;width:100%;margin-top:8px;padding:10px;border:1px solid #d8e4e0;border-radius:6px;color:#123f4a;background:#fff;font-size:14px;}
.w07-contact-dialog .contact-edit-actions {display:flex;gap:10px;justify-content:flex-end;margin-top:20px;}
.w07-contact-dialog [hidden],#contactFlowNotice[hidden] {display:none!important;}
.w07-contact-dialog #contactError {color:#936b2d;font-size:13px;}.w07-contact-dialog .contact-empty {font-size:14px;color:#789087;margin:24px 0 0;}
.w07-contact-dialog :is(input,button):focus-visible {outline:2px solid #c5a466;outline-offset:3px;}
#contactFlowNotice {position:fixed;bottom:24px;right:24px;padding:12px 18px;background:#123f4a;color:#fff;border-radius:8px;z-index:200;font-size:14px;}
@media(max-width:520px){.w07-contact-dialog .contact-fields,body:has(#customers.active) .directory-form-fields{grid-template-columns:1fr;}}


body:has(#customers.active) .directory-peer-channels { display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
body:has(#customers.active) .directory-peer-channels .directory-channel-name { font-size:13px; font-weight:400; line-height:22px; color:#365650; }


.app-shell:has(#customers.active, #customerDetail.active) #customerDetailIdentity > .customer-profile-card:first-child .customer-facts { margin-top: 12px; }


.w07-profile-view {width:min(560px,calc(100vw - 40px));max-height:calc(100vh - 48px);padding:0;border:1px solid #d6e3df;border-radius:14px;background:#fff;color:#123f4a;box-shadow:0 24px 80px rgba(9,43,52,.22);opacity:1;transform:none;transition:opacity 180ms ease,transform 180ms ease,display 180ms allow-discrete,overlay 180ms allow-discrete;}
.w07-profile-view::backdrop {background:rgba(7,35,42,.55);}
.w07-profile-view header {display:flex;align-items:center;justify-content:space-between;padding:22px 24px;border-bottom:1px solid #e4ece9;}
.w07-profile-view h2 {font-size:20px;margin:0;}.w07-profile-view header button {display:grid;place-items:center;width:32px;height:32px;padding:0;background:transparent;border:1px solid transparent;color:#789188;box-shadow:none;transform:none;}
.w07-profile-view header button:hover {color:#123f4a;background:#f1f6f3;transform:none;}.w07-profile-view header button:focus-visible {outline:2px solid #c5a466;outline-offset:2px;}
.w07-profile-view svg {width:20px;height:20px;stroke:currentColor;stroke-width:1.5;fill:none;}
.w07-profile-view .profile-view-body {padding:8px 24px 24px;}
.w07-profile-view dl {margin:0;}.w07-profile-view dl>div {display:grid;grid-template-columns:140px minmax(0,1fr);gap:20px;padding:14px 0;font-size:14px;line-height:22px;}
.w07-profile-view dt {color:#7a8d85;}.w07-profile-view dd {margin:0;color:#365650;overflow-wrap:anywhere;}
.w07-profile-view section {border-top:1px solid #e4ece9;margin-top:12px;padding-top:20px;}.w07-profile-view h3 {font-size:14px;margin:0 0 4px;}.w07-profile-view [hidden] {display:none!important;}
.app-shell:has(#customers.active, #customerDetail.active) #customerDetailIdentity .profile-channels-compact .customer-profile-list article:last-child {border-bottom:0;padding-bottom:0;margin-bottom:0;}
@starting-style {.w07-profile-view[open] {opacity:0;transform:translateY(6px);}}
.w07-profile-view:not([open]) {opacity:0;transform:translateY(6px);}
@media(prefers-reduced-motion:reduce){.w07-profile-view {transition:none;transform:none;}}
@media(max-width:520px){.w07-profile-view dl>div {grid-template-columns:110px minmax(0,1fr);gap:12px;}}


.w07-profile-view .profile-header-actions {display:flex;align-items:center;justify-content:flex-end;gap:12px;min-width:134px;}
.w07-profile-view .profile-header-actions button:not(#customerProfileClose) {width:auto;height:32px;padding:0 6px;font-size:13px;white-space:nowrap;color:#617d72;}
.w07-profile-view .profile-header-actions #profileSave {color:#123f4a;font-weight:600;}
.w07-profile-view dd input {display:block;width:100%;min-width:0;min-height:0;height:22px;box-sizing:border-box;margin:0;padding:0;border:0;border-bottom:1px solid #c8d9d1;border-radius:0;outline:none;background:transparent;box-shadow:none;color:inherit;font:inherit;line-height:22px;}
.w07-profile-view dd input:focus {border-bottom-color:#b89550;box-shadow:0 1px 0 #b89550;}
.w07-profile-view #profileEditError {color:#996b31;font-size:13px;margin:12px 0 0;}


#customers .directory-customer,#customers .directory-open,.profile-link {border:0;background:transparent;color:inherit;padding:0;box-shadow:none;}
#customers .directory-customer {font-weight:700;color:#123f4a;}
#customers .directory-customer:hover,.profile-link:hover {color:#aa873f;}
#customers .directory-panel {overflow-x:auto;}
#customerDetail .profile-link {display:block;margin-top:14px;padding-top:12px;border-top:1px solid #e4ece9;width:100%;text-align:left;}
#customerDetail .customer-profile-card h3 {margin-bottom:12px;}
#customerDetail .customer-facts {grid-template-columns:none;}
#customerDetail .customer-facts>div {display:grid;grid-template-columns:96px minmax(0,1fr);gap:10px;}
#customerDetail .channel-dot {display:inline-block;width:7px;height:7px;border-radius:50%;background:#239d93;margin-right:6px;}
#customerCollaborationModal[hidden] {display:none;}

/* W07 contextual message handling; all selectors stay inside the message surface. */
.message-conversation-filter { display:flex; align-items:center; gap:12px; max-width:420px; margin-bottom:16px; }
.message-conversation-filter select { min-width:0; flex:1; }
#messageList { overflow:visible; }
.message-burst { border:1px solid var(--border, #dce7e5); border-radius:12px; margin:12px 0; overflow:hidden; }
.message-burst header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:14px 18px; background:var(--surface-soft, #f5f9f8); }
.message-burst ul { list-style:none; margin:0; padding:0 18px; }
.message-burst li { padding:14px 0; border-bottom:1px solid #e8efed; }
.message-burst li:last-child { border-bottom:0; }
.message-burst p { margin:8px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.message-burst-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; color:#728b88; font-size:13px; }
.message-burst-result { font-size:14px; color:#526f6b; overflow-wrap:anywhere; }
.message-action-surface { width:min(440px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow-y:auto; }
#messageActionContent, #messageActionError { margin:16px 24px; }
.message-action-options { display:grid; gap:8px; }
.message-action-options button { text-align:left; }
.message-action-footer { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
#messageActionContent select { width:100%; margin-top:8px; }
#messageItemChildren { margin:0 24px 16px; border:0; padding:0; }
#messageItemChildren[hidden] { display:none; }
#messageChildRows > div { display:flex; gap:8px; margin:8px 0; }
#messageChildRows input { flex:1; min-width:0; }
.message-empty { color:#728b88; padding:12px 0; }
@media(max-width:760px) { .message-burst header,.message-burst ul { padding-left:12px; padding-right:12px; } .message-burst-result { flex-basis:100%; } }

#messageActionModal, #workItemModal.message-item-mode { z-index:90; }
#messageActionModal { align-items:center; }

/* W07 sealed sidebar visual contract: shared by every product view. */
#appShell.sidebar-parity #primarySidebar {
  width: 212px;
  min-width: 212px;
  padding: 14px 10px;
}
#appShell.sidebar-parity #primarySidebar .sidebar-head {
  gap: 10px;
}
#appShell.sidebar-parity #primarySidebar .brand {
  min-width: 0;
  gap: 12px;
}
#appShell.sidebar-parity #primarySidebar .brand > span {
  width: 42px;
  min-width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 0;
  border-radius: 8px;
  background: #123f4a;
}
#appShell.sidebar-parity #primarySidebar .brand > span img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
#appShell.sidebar-parity #primarySidebar .brand strong {
  color: #f7faf9;
  font-size: 16px;
}
#appShell.sidebar-parity #primarySidebar .brand-copy small {
  display: none;
}
#appShell.sidebar-parity #sidebarToggle {
  display: grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(115, 190, 207, 0.28);
  border-radius: 50%;
  padding: 0;
  color: #d9eff3;
  background: rgba(10, 79, 96, 0.66);
  box-shadow: none;
  transform: none;
}
#appShell.sidebar-parity #sidebarExpandBtn {
  position: fixed;
  z-index: 80;
  top: 16px;
  left: 16px;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(23, 91, 108, 0.24);
  border-radius: 50%;
  padding: 0;
  color: #eaf7f8;
  background: #0d4b5a;
  box-shadow: 0 10px 24px rgba(8, 45, 54, 0.22);
}
#appShell.sidebar-parity #primarySidebar nav {
  gap: 14px;
}
#appShell.sidebar-parity #primarySidebar .nav-group {
  grid-template-columns: 1fr;
  gap: 4px;
}
#appShell.sidebar-parity #primarySidebar .nav {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 10px;
  color: rgba(247, 250, 249, 0.82);
  background: transparent;
  box-shadow: none;
  font-size: 16px;
  white-space: nowrap;
  transform: none;
}
#appShell.sidebar-parity #primarySidebar .nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #afd6de;
  font-weight: 700;
}
#appShell.sidebar-parity #primarySidebar .nav-icon-svg {
  width: 18px;
  height: 18px;
}
#appShell.sidebar-parity #primarySidebar .nav.active .nav-icon {
  color: #e6f8fb;
  background: rgba(113, 197, 214, 0.035);
}
#appShell.sidebar-parity #primarySidebar .nav.active {
  border-color: rgba(106, 189, 207, 0.10);
  color: #f2fbfc;
  background: linear-gradient(90deg, rgba(20, 88, 99, 0.80) 0%, rgba(17, 77, 89, 0.48) 58%, rgba(16, 64, 74, 0.22) 100%);
  box-shadow: inset 0 1px 0 rgba(210, 228, 222, 0.04);
}
#appShell.sidebar-parity #primarySidebar .nav.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 1px;
  border-radius: 2px;
  background: #e0bf7e;
  pointer-events: none;
}
#appShell.sidebar-parity #primarySidebar .nav-status[data-status="attention"] {
  min-width: 18px;
  height: 18px;
  border-color: transparent;
  color: #e0bf7e;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  justify-items: start;
}
#appShell.sidebar-parity #primarySidebar .nav[data-view="messages"] {
  grid-template-columns: 28px max-content max-content;
  column-gap: 0;
  justify-content: start;
}
#appShell.sidebar-parity #primarySidebar .nav[data-view="messages"] .nav-label {
  margin-left: 9px;
}
#appShell.sidebar-parity #primarySidebar .nav[data-view="messages"] .nav-status {
  margin-left: 12px;
}
#appShell.sidebar-parity #primarySidebar .logout {
  display: block;
  margin-top: auto;
  border: 1px solid transparent;
  padding: 9px 13px;
  color: #f1c9c3;
  background: transparent;
  box-shadow: none;
  font-size: 16px;
}
#appShell.sidebar-parity #primarySidebar #messageNavIndicator:not([data-status="attention"]) {
  display: none;
}
/* end W07 sealed sidebar visual contract */

.w03-billing-view {
  max-width: 1120px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.w03-billing-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(125deg, #123f4a, #1c6773);
}
.w03-billing-hero h3 { margin: 5px 0 7px; font-size: 28px; }
.w03-provider-note { max-width: 270px; padding: 9px 12px; border: 1px solid #7db5bd; border-radius: 8px; font-size: 12px; line-height: 1.5; }
.w03-billing-view .panel { margin-bottom: 18px; }
.w03-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.w03-summary-grid > div { padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfc; }
.w03-summary-grid span, .w03-summary-grid strong { display: block; }
.w03-summary-grid span { margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.w03-summary-grid strong { font-size: 16px; }
.w03-state-notice { margin-top: 16px; padding: 13px 16px; border-radius: 10px; border: 1px solid #bcd7dd; background: #edf7f8; line-height: 1.55; }
.w03-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.w03-actions .w03-upgrade-primary {
  order: -1;
  min-height: 48px;
  padding: 11px 24px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: #123f4a;
  border-color: #123f4a;
  box-shadow: 0 5px 14px rgba(18, 63, 74, .22);
}
.w03-actions .w03-downgrade-secondary {
  min-height: 40px;
  font-size: 14px;
  color: #315668;
  border-color: #b9cdd3;
  background: #fff;
}
.w03-actions .w03-auto-renew-control { margin-left: auto; padding: 7px 11px; font-size: 12px; border-color: #d1d9dd; color: #53656b; }
.w03-price-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.w03-price-card { padding: 20px; border: 1px solid #c8dadd; border-radius: 12px; background: #fbfefe; }
.w03-price-card h4 { margin: 0 0 12px; font-size: 20px; }
.w03-intro-price { margin: 0 0 15px; color: var(--accent); }
.w03-intro-price strong { font-size: 24px; }
.w03-price-card dl { margin: 0; }
.w03-price-card dl > div { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.w03-price-card dt { color: var(--muted); }
.w03-price-card dd { margin: 0; font-weight: 650; }
.w03-choice-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.w03-choice-form label { display: flex; flex-direction: column; gap: 7px; }
.w03-choice-form select, .w03-choice-form input { width: 100%; }
.w03-promotion-fields { display: contents; }
.w03-choice-form > button { justify-self: start; }
.w03-form-note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.w03-preview { margin-top: 18px; padding: 17px; border-radius: 11px; border: 1px solid #b9d3d8; background: #f1f8f9; }
.w03-preview > strong { display: block; margin-bottom: 12px; }
.w03-preview > div { display: flex; justify-content: space-between; padding: 5px 0; }
.w03-preview-total { margin-top: 9px; padding-top: 11px !important; border-top: 1px solid #c0d6da; }
.w03-preview-total strong { font-size: 21px; }
.w03-preview-effective { margin: 15px 0 0; padding-top: 13px; border-top: 1px solid #c0d6da; color: #345f6a; font-size: 14px; font-weight: 700; }
.w03-order-button { margin-top: 16px; }
.w03-order-state { color: var(--muted); }
.w03-order-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.w03-order-row strong { color: var(--ink); }
.w03-entitlement-line { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.w03-entitlement-line small { color: #526f7d; font-size: 14px; }
.w03-billing-view {
  max-width: 1160px;
  color: #172b3c;
}
.w03-billing-hero {
  position: relative;
  overflow: hidden;
  align-items: center;
  min-height: 155px;
  padding: 26px 40px;
  border: 1px solid #314e66;
  border-radius: 22px;
  background: radial-gradient(circle at 88% 18%, rgba(111, 191, 205, .28), transparent 27%),
    linear-gradient(125deg, #102b3f 0%, #173f51 58%, #216977 100%);
  box-shadow: 0 18px 35px rgba(17, 48, 66, .16);
}
.w03-billing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 48%, rgba(213, 243, 242, .08) 69%, transparent 87%);
  pointer-events: none;
}
.w03-billing-hero h3 { max-width: 600px; margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.18; letter-spacing: -.03em; }
.w03-section-kicker { font-size: 10px; letter-spacing: .19em; font-weight: 800; }
.w03-provider-note {
  position: relative;
  z-index: 1;
  min-width: 178px;
  padding: 12px 15px;
  border-color: rgba(206, 232, 235, .36);
  border-radius: 13px;
  background: rgba(255, 255, 255, .1);
  color: #e1f1f2;
}
.w03-billing-view .panel { padding: 23px 26px; border: 1px solid #dfebed; border-radius: 18px; background: #fff; box-shadow: 0 9px 22px rgba(16, 49, 66, .045); }
.w03-billing-view .panel-head { align-items: center; margin-bottom: 18px; }
.w03-billing-view .panel-head h3 { margin: 4px 0 0; color: #183647; font-size: 21px; letter-spacing: -.02em; }
.w03-section-kicker { display: block; color: #16889a; }
.w03-current-badge { padding: 7px 11px; border-radius: 999px; background: #e7f5f2; color: #16745e; font-size: 12px; font-weight: 750; }
.w03-summary-grid > div { min-height: 85px; padding: 17px 18px; border-color: #e1eaec; border-radius: 13px; background: #f8fbfb; }
.w03-summary-grid strong { color: #183647; }
.w03-state-notice { border-radius: 12px; border-color: #b7d9df; background: #eaf7f8; color: #174454; }
.w03-price-grid { gap: 18px; }
.w03-price-card { position: relative; min-height: 240px; padding: 24px; border-color: #d9e8eb; border-radius: 17px; background: #fbfefe; transition: transform .2s ease, box-shadow .2s ease; }
.w03-price-card:hover { transform: translateY(-2px); box-shadow: 0 13px 27px rgba(17, 71, 82, .09); }
.w03-price-card[data-tier="upgrade"] { border-color: #aacfd3; background: linear-gradient(155deg, #eefafa, #fff 57%); }
.w03-price-card[data-tier="upgrade"]::before { content: "更多能力"; position: absolute; top: 22px; right: 23px; padding: 5px 9px; border-radius: 7px; background: #173f51; color: #fff; font-size: 11px; font-weight: 750; }
.w03-price-card h4 { color: #183647; }
.w03-intro-price { color: #217683; }
.w03-intro-price strong { color: #123f4a; font-size: 30px; letter-spacing: -.04em; }
.w03-price-card dl > div { padding: 10px 0; }
.w03-price-card dd { color: #173a49; }
.w03-choice-form { gap: 17px; }
.w03-choice-form label { color: #425968; font-size: 13px; font-weight: 700; }
.w03-choice-form select, .w03-choice-form input { min-height: 43px; border-radius: 9px; background: #fcfefe; }
.w03-choice-form > button, .w03-order-button { min-height: 43px; border-radius: 9px; font-weight: 750; }
.w03-preview { padding: 21px 23px; border-color: #a7ccd2; border-radius: 14px; background: #eef9f8; color: #244757; }
.w03-preview > strong { font-size: 16px; color: #173f51; }
.w03-preview-total { margin-top: 13px; padding-top: 14px !important; }
.w03-preview-total strong { color: #103f4a; font-size: 28px; letter-spacing: -.04em; }
#w03PreviewButton { min-height: 38px; padding: 7px 15px; font-size: 14px; font-weight: 700; }
.w03-preview { width: 100%; max-width: 760px; margin-top: 12px; padding: 15px 18px; font-size: 14px; }
.w03-preview > strong { margin-bottom: 7px; font-size: 15px; }
.w03-preview > div { padding: 3px 0; }
.w03-preview-total { margin-top: 7px; padding-top: 9px !important; }
.w03-preview-total strong { font-size: 23px; }
.w03-preview-effective { margin-top: 9px; padding-top: 9px; font-size: 13px; }
.w03-payment-choice { display: flex; flex-wrap: wrap; gap: 12px; margin: 21px 0 9px; padding: 0; border: 0; }
.w03-payment-choice legend { width: 100%; margin-bottom: 10px; padding: 0; color: #29495b; font-size: 14px; font-weight: 750; }
.w03-payment-option { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 190px; padding: 12px 14px; border: 1px solid #d6e5e7; border-radius: 12px; background: #fff; cursor: pointer; }
.w03-payment-option:has(input:checked) { border-color: #268c9b; background: #f0faf9; box-shadow: inset 0 0 0 1px #268c9b; }
.w03-payment-option input { accent-color: #1d7f8c; }
.w03-payment-option strong, .w03-payment-option small { display: block; }
.w03-payment-option strong { color: #263f4d; font-size: 13px; }
.w03-payment-mark { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; color: #fff; font-size: 17px; font-weight: 800; }
.w03-wechat { background: #2ea66e; }
.w03-alipay { background: #2089da; }
.w03-order-button { margin-top: 16px; }
.w03-order-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.w03-order-state { min-height: 105px; padding: 19px; border: 1px solid #e1eaed; border-radius: 13px; background: #f9fbfc; line-height: 1.75; }
.w03-order-row { align-items: start; flex-direction: column; gap: 5px; overflow-wrap: anywhere; }
.w03-order-row strong { color: #153e4e; font-size: 18px; }
.w03-order-state > strong { color: #315668; font-size: 18px; }
.w03-order-row span { font-size: 14px; }
.w03-qr-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 210px; padding: 17px; border: 1px dashed #b7cdd3; border-radius: 13px; background: #f4f8f9; text-align: center; }
.w03-qr-mount { display: grid; place-items: center; width: 66px; height: 66px; margin-bottom: 12px; border: 2px solid #bad1d5; border-radius: 17px; color: #8eafb7; }
.w03-qr-panel strong { color: #315668; font-size: 14px; }
.w03-qr-panel p { max-width: 190px; margin: 7px 0 0; color: #486b78; font-size: 13px; line-height: 1.55; }
.w03-qr-panel[data-qr-state="pending"] { border-color: #dcc890; background: #fffaf0; }
.w03-qr-panel[data-qr-state="expired"] { border-color: #d8b4af; background: #fff7f5; }
.w03-checkout-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 26px; border: 1px solid #d5e7e9; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px rgba(9, 39, 53, .28); color: #173a49; }
.w03-checkout-dialog::backdrop { background: rgba(7, 31, 43, .6); backdrop-filter: blur(4px); }
.w03-checkout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.w03-checkout-head h3 { margin: 0; font-size: 23px; color: #173a49; }
.w03-checkout-head p { margin: 8px 0 0; color: #526b77; font-size: 14px; overflow-wrap: anywhere; }
.w03-checkout-head button { flex: none; }
.w03-checkout-dialog .w03-qr-panel { min-height: 280px; padding: 24px; }
.w03-checkout-dialog .w03-qr-mount { width: 172px; height: 172px; margin-bottom: 19px; border-radius: 16px; background: #fff; }
.w03-checkout-dialog .w03-qr-mount img, .w03-checkout-dialog .w03-qr-mount canvas, .w03-checkout-dialog .w03-qr-mount svg { display: block; width: 100%; height: 100%; object-fit: contain; }
.w03-checkout-dialog .w03-qr-panel strong { font-size: 17px; }
.w03-checkout-dialog .w03-qr-panel p { max-width: 270px; font-size: 14px; }
#w03CheckoutRefresh { width: 100%; margin-top: 16px; }
.w03-coupon-fieldset { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
.w03-coupon-fieldset legend { margin-bottom: 9px; color: #425968; font-size: 13px; font-weight: 700; }
.w03-coupon-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; color: #6a7f89; font-size: 13px; }
.w03-coupon-option { display: flex !important; flex-direction: row !important; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #d9e8eb; border-radius: 11px; background: #fbfefe; cursor: pointer; }
.w03-coupon-option:has(input:checked) { border-color: #268c9b; background: #eef9f8; }
.w03-coupon-option input { width: 17px; height: 17px; min-height: 0; flex: none; accent-color: #1d7f8c; }
.w03-coupon-option strong, .w03-coupon-option small { display: block; }
.w03-coupon-option strong { color: #173f51; font-size: 14px; }
.w03-coupon-option small { margin-top: 4px; color: #627d87; font-size: 12px; }
.w03-order-history { display: grid; gap: 10px; }
.w03-history-item { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 14px 16px; border: 1px solid #e0ebed; border-radius: 12px; background: #fbfefe; }
.w03-history-more { margin-top: 14px; }
.w03-history-item strong, .w03-history-item small { display: block; }
.w03-history-item small { margin-top: 5px; color: #627d87; }
.w03-history-item span { margin-left: auto; font-weight: 700; }
.w03-order-details > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
.w03-order-details .w03-detail-total { margin-top: 5px; padding-top: 15px; border-top: 1px solid #d9e8eb; font-size: 17px; }
.w03-order-details small { display: block; margin-top: 14px; color: #627d87; overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .w03-billing-hero { padding: 27px 23px; }
  .w03-billing-view .panel { padding: 19px; }
  .w03-checkout-dialog { padding: 20px; }
  .w03-coupon-list { grid-template-columns: 1fr; }
  .w03-checkout-head { flex-direction: column; }
}
.w03-billing-view #w03BillingError:empty { display: none; }
.w03-billing-hero h3 {
  font-size: clamp(25px, 2.4vw, 31px);
  line-height: 1.35;
  letter-spacing: .05em;
  font-weight: 700;
}
.w03-provider-note { font-size: 14px; font-weight: 750; }
#w03FirstPurchaseNote { padding: 12px 15px; border-radius: 10px; background: #eaf7f8; color: #1b5965; font-size: 14px; font-weight: 700; }
.w03-payment-option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; }
@media (max-width: 720px) {
  .w03-billing-hero { flex-direction: column; padding: 20px; }
  .w03-summary-grid, .w03-price-grid, .w03-choice-form { grid-template-columns: 1fr; }
  .w03-actions .w03-auto-renew-control { margin-left: 0; }
}
.gmail-settings p, .lifecycle-settings p { margin: 10px 0; line-height: 1.65; }
.gmail-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.data-control-dialog { width: min(680px, calc(100vw - 32px)); max-height: 85vh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 24px; color: var(--ink); background: var(--surface, #fff); }
.data-control-dialog::backdrop { background: rgba(7, 26, 33, .72); }
.data-control-dialog h3 { margin: 0 0 16px; }
.data-control-dialog p { line-height: 1.65; margin: 12px 0; }
.data-control-dialog label { display: block; margin-top: 16px; line-height: 1.6; }
#gmailConsentDialog label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
#gmailConsentCheckbox {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: .2em 0 0;
  padding: 0;
  accent-color: var(--accent);
}
.data-control-dialog input[type="password"] { display: block; width: 100%; margin-top: 8px; }
.data-control-dialog code { overflow-wrap: anywhere; }
.data-control-dialog [role="alert"] { color: #9b1c1c; }
.gmail-settings [role="status"], .lifecycle-settings [role="status"] { min-height: 1.5em; }

/* Customer-owned, read-only Gmail context; no inbox or message actions. */
.customer-gmail-disclosure { color: #657c79; font-size: 13px; margin: 0 0 12px; }
.customer-gmail-thread { border-top: 1px solid #e1ebe9; padding: 12px 0; }
.customer-gmail-thread summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.customer-gmail-thread summary strong { overflow-wrap: anywhere; }
.customer-gmail-thread summary span { color: #657c79; font-size: 12px; }
.customer-gmail-message { margin-top: 12px; padding: 12px; background: #f5f9f8; border-radius: 8px; min-width: 0; }
.customer-gmail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; overflow-wrap: anywhere; }
.customer-gmail-label { color: #123f49; background: #e1efec; padding: 2px 7px; border-radius: 4px; }
.customer-gmail-meta time { color: #657c79; }
.customer-gmail-message h4 { margin: 8px 0; overflow-wrap: anywhere; }
.customer-gmail-preview { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.65; }
