:root {
  --ink: #15231d;
  --ink-soft: #405149;
  --ink-faint: #66756e;
  --paper: #f3f5f1;
  --surface: #ffffff;
  --line: #d3dbd5;
  --line-strong: #b7c3bb;
  --pine: #183e35;
  --pine-light: #245548;
  --mint: #dcebe3;
  --accent: #d9582b;
  --accent-dark: #b83d16;
  --accent-soft: #fff1ea;
  --gold: #b8841f;
  --gold-soft: #fcf3d8;
  --blue: #1f6b80;
  --blue-soft: #e7f2f6;
  --danger: #a9342b;
  --danger-soft: #fbe9e7;
  --shadow-sm: 0 1px 2px rgba(20, 35, 30, .06), 0 5px 18px rgba(20, 35, 30, .04);
  --shadow-md: 0 16px 50px rgba(20, 35, 30, .12);
  --radius-sm: 7px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --sidebar-width: 242px;
  --topbar-height: 68px;
  --font: "Segoe UI Variable Text", "Segoe UI", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(232, 100, 53, .22);
  outline-offset: 1px;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.app-shell.is-hidden {
  display: none !important;
}

/* Authentication */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  min-height: 100vh;
  background: #f7f7f2;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 39px 48px 30px;
  color: #edf4f0;
  background: var(--pine);
  overflow: hidden;
}

.auth-visual::before {
  position: absolute;
  top: -170px;
  right: -160px;
  width: 470px;
  height: 470px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 50%;
  box-shadow: 0 0 0 65px rgba(255, 255, 255, .02), 0 0 0 130px rgba(255, 255, 255, .015);
  content: "";
  pointer-events: none;
}

.auth-visual::after {
  position: absolute;
  top: 0;
  right: 72px;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, .035);
  content: "";
  pointer-events: none;
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand .brand-mark {
  width: 40px;
  height: 40px;
}

.auth-brand strong {
  display: block;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.1;
}

.auth-brand span {
  display: block;
  margin-top: 4px;
  color: #a9c1b6;
  font-size: 10px;
  letter-spacing: .11em;
}

.auth-story {
  position: relative;
  z-index: 2;
  width: min(570px, 87%);
  margin-top: clamp(70px, 13vh, 145px);
}

.auth-kicker {
  color: #d7b660;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
}

.auth-story h1 {
  margin: 18px 0 16px;
  color: #fff;
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-size: clamp(29px, 3vw, 43px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.33;
}

.auth-story > p {
  max-width: 500px;
  margin: 0;
  color: #aec5ba;
  font-size: 12px;
  line-height: 1.85;
}

.auth-feature-list {
  display: grid;
  gap: 0;
  max-width: 450px;
  margin-top: 31px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.auth-feature {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.auth-feature > span {
  color: #d7b660;
  font-family: "Consolas", monospace;
  font-size: 8px;
  padding-top: 2px;
}

.auth-feature strong {
  display: block;
  color: #e8f0ec;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.auth-feature small {
  display: block;
  margin-top: 4px;
  color: #8fa99e;
  font-size: 9.5px;
  line-height: 1.45;
}

.auth-paper-stack {
  position: absolute;
  right: 42px;
  bottom: 74px;
  width: 294px;
  height: 360px;
  pointer-events: none;
}

.auth-paper {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 3px;
}

.auth-paper.back {
  transform: translate(20px, -21px) rotate(6deg);
  background: rgba(255, 255, 255, .08);
}

.auth-paper.middle {
  transform: translate(10px, -10px) rotate(3deg);
  background: rgba(255, 255, 255, .13);
}

.auth-paper.front {
  padding: 23px 21px;
  color: #26352f;
  background: #f7f5ee;
  box-shadow: 0 20px 60px rgba(9, 27, 20, .2);
  transform: rotate(-1deg);
}

.auth-paper-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 2px solid #183e35;
}

.auth-paper-head span {
  color: #183e35;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

.auth-paper-head strong {
  color: #e86838;
  font-family: "Consolas", monospace;
  font-size: 18px;
}

.auth-paper-lines {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.auth-paper-lines i {
  display: block;
  width: 68%;
  height: 4px;
  border-radius: 2px;
  background: #d5ded8;
}

.auth-paper-lines i:nth-child(2) {
  width: 48%;
}

.auth-paper-lines i:nth-child(3) {
  width: 79%;
}

.auth-paper-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 22px;
  background: #d6dfd9;
}

.auth-paper-table span {
  height: 26px;
  background: #fff;
}

.auth-paper-table span:nth-child(-n+2) {
  height: 31px;
  background: #e7eee9;
}

.auth-paper-total {
  margin-top: 22px;
  padding: 12px;
  color: #fff;
  background: #183e35;
  font-family: "Consolas", monospace;
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.auth-visual-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  color: #7f9b8f;
  font-size: 8.5px;
  letter-spacing: .06em;
}

.auth-visual-foot span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.auth-visual-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6fbe8b;
}

.auth-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 36px 23px;
  background: #f7f7f2;
}

.auth-card {
  width: min(430px, 100%);
  padding: 2px 3px;
}

.auth-card-head {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 36px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.auth-card-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #cbd8d0;
  border-radius: 7px;
  color: var(--pine);
  background: #edf4ef;
}

.auth-card-icon svg {
  width: 15px;
  height: 15px;
}

.auth-card h2 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-size: 31px;
  font-weight: 600;
  letter-spacing: -.035em;
}

.auth-subtitle {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin: 26px 0 22px;
  padding: 3px;
  border: 1px solid #dce1dc;
  border-radius: 8px;
  background: #ecefe9;
}

.auth-tabs button {
  height: 35px;
  border: 0;
  border-radius: 6px;
  color: var(--ink-faint);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.auth-tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 35, 30, .08);
}

.auth-form {
  display: grid;
}

.auth-form > label {
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap > span {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #89958f;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-input-wrap svg {
  width: 16px;
  height: 16px;
}

.auth-input-wrap input,
.auth-code-input {
  width: 100%;
  height: 49px;
  border: 1px solid #c7d0c9;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input-wrap input {
  padding: 0 14px 0 42px;
}

.auth-input-wrap input:focus,
.auth-code-input:focus {
  border-color: #709b8b;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(36, 85, 72, .09);
}

.auth-input-wrap input::placeholder,
.auth-code-input::placeholder {
  color: #a7b0aa;
}

.auth-submit {
  display: flex;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 14px;
  border: 1px solid var(--pine);
  border-radius: 7px;
  color: #fff;
  background: var(--pine);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 7px 18px rgba(24, 62, 53, .12);
}

.auth-submit:hover:not(:disabled) {
  background: var(--pine-light);
  border-color: var(--pine-light);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: .72;
}

.auth-submit svg {
  width: 15px;
  height: 15px;
}

.auth-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-sent-to {
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 5px;
  margin-bottom: 13px;
  padding: 8px 11px;
  border: 1px solid #dbe4de;
  border-radius: 6px;
  color: var(--ink-faint);
  background: #f1f6f2;
  font-size: 9.5px;
}

.auth-sent-to strong {
  overflow: hidden;
  color: var(--ink-soft);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-sent-to button {
  margin-left: auto;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font-size: 9.5px;
  cursor: pointer;
}

.auth-code-input {
  height: 59px;
  padding: 0 16px;
  font-family: "Consolas", monospace;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: .32em;
  text-align: center;
}

.auth-code-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 9px;
}

.auth-code-meta button {
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.auth-code-meta button:disabled {
  color: #a8b1ab;
  cursor: default;
}

.auth-error {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #efc9c4;
  border-radius: 6px;
  color: #9c342b;
  background: #fbeae8;
  font-size: 10px;
  line-height: 1.55;
}

.auth-security-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid #dfe3dd;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.6;
}

.auth-security-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #769489;
}

.auth-security-note strong {
  color: var(--ink-soft);
}

.auth-server-guide {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid #ebcf96;
  border-radius: 7px;
  background: #fff9e8;
}

.auth-server-guide strong {
  display: block;
  color: #715a23;
  font-size: 10.5px;
}

.auth-server-guide p {
  margin: 5px 0 0;
  color: #826e3e;
  font-size: 9.5px;
  line-height: 1.6;
}

.auth-server-guide code {
  padding: 1px 4px;
  border-radius: 3px;
  color: #5d4d28;
  background: #f5e9c8;
  font-family: "Consolas", monospace;
}

.auth-copyright {
  margin: auto 0 0;
  padding-top: 30px;
  color: #a0a9a3;
  font-size: 8.5px;
  letter-spacing: .06em;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 25px 16px 18px;
  color: #ecf2ee;
  background: var(--pine);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 28px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--pine);
  background: #ffffff;
  border-radius: 9px;
  overflow: hidden;
}

.brand-mark svg {
  width: 26px;
  height: 26px;
}

.brand-mark-logo img {
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
}

.brand strong {
  display: block;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.1;
}

.brand span {
  display: block;
  margin-top: 4px;
  color: #aec4ba;
  font-size: 11px;
  letter-spacing: .08em;
}

.main-nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #c7d8d0;
  background: transparent;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .065);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, .105);
  border-color: rgba(255, 255, 255, .075);
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.8;
}

.nav-count {
  display: inline-flex;
  min-width: 22px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 10px;
  color: #c9d8d1;
  background: rgba(255, 255, 255, .09);
  font-size: 11px;
}

.sidebar-guide {
  position: relative;
  margin-top: auto;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  background: rgba(255, 255, 255, .045);
}

.sidebar-guide::before {
  position: absolute;
  top: 0;
  left: 17px;
  width: 30px;
  height: 2px;
  background: var(--gold);
  content: "";
}

.guide-kicker {
  display: block;
  margin-bottom: 9px;
  color: #e6bd61;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .15em;
}

.sidebar-guide strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.sidebar-guide p {
  margin: 7px 0 12px;
  color: #aec4ba;
  font-size: 11px;
  line-height: 1.65;
}

.text-button {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
}

.text-button.light {
  color: #efd18c;
}

.sidebar-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 5px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.storage-state,
.sidebar-user {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  color: #9eb5aa;
  font-size: 11px;
}

.sidebar-user {
  min-width: 0;
  flex: 1;
  gap: 8px;
}

.sidebar-user > div {
  min-width: 0;
}

.sidebar-user strong {
  display: block;
  overflow: hidden;
  max-width: 138px;
  color: #dce9e2;
  font-size: 9.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span:last-child {
  display: block;
  margin-top: 3px;
  color: #86a095;
  font-size: 8.5px;
}

.sidebar-foot-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 1px;
}

.sidebar-foot-actions .icon-button {
  width: 29px;
  height: 29px;
}

.sidebar-foot-actions .icon-button svg {
  width: 14px;
  height: 14px;
}

.status-dot,
.user-status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #70bc8a;
  box-shadow: 0 0 0 3px rgba(112, 188, 138, .12);
}

.main-shell {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  height: var(--topbar-height);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.breadcrumb {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 12px;
}

.breadcrumb svg {
  width: 13px;
  height: 13px;
}

.breadcrumb strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-link {
  display: inline-flex;
  height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.topbar-link svg {
  width: 16px;
  height: 16px;
}

.topbar-link:hover {
  color: var(--ink);
}

.company-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-left: 3px;
  border: 1px solid #ccd7d0;
  border-radius: 50%;
  color: var(--pine);
  background: var(--mint);
  font-size: 11px;
  font-weight: 700;
}

.mobile-menu {
  display: none !important;
}

.view-host {
  padding: 30px 34px 50px;
}

.page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  animation: page-in .23s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.page-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 2.1vw, 32px);
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.18;
}

.page-title-serif {
  font-family: var(--font);
  font-weight: 720;
}

.page-subtitle {
  max-width: 660px;
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.primary-button {
  color: #fff;
  background: var(--pine);
  border-color: var(--pine);
  box-shadow: 0 4px 10px rgba(24, 62, 53, .13);
}

.primary-button:hover {
  background: var(--pine-light);
  border-color: var(--pine-light);
  box-shadow: 0 5px 15px rgba(24, 62, 53, .18);
}

.primary-button.accent {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(232, 100, 53, .18);
}

.primary-button.accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line-strong);
}

.secondary-button:hover {
  border-color: #aeb8b1;
  background: #fbfcfa;
}

.ghost-button {
  color: var(--ink-soft);
  background: transparent;
  border-color: transparent;
}

.ghost-button:hover {
  color: var(--ink);
  background: #ecefe9;
}

.danger-button {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f1c9c4;
}

.danger-button:hover {
  background: #f8dedb;
}

.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.danger-button svg {
  width: 16px;
  height: 16px;
}

.primary-button.compact {
  min-height: 36px;
  padding: 0 13px;
  font-size: 12px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--ink);
  background: #edf0eb;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button.inverse {
  color: #b9cbc3;
}

.icon-button.inverse:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.readiness-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  padding: 14px 17px;
  border: 1px solid #ebd79f;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--gold-soft);
}

.readiness-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #936d0e;
  background: #f3e4b8;
}

.readiness-icon svg {
  width: 17px;
  height: 17px;
}

.readiness-copy strong {
  display: block;
  font-size: 12.5px;
}

.readiness-copy p {
  margin: 3px 0 0;
  color: #725c28;
  font-size: 11.5px;
  line-height: 1.5;
}

.readiness-banner .text-button {
  font-size: 12px;
}

.readonly-chip {
  display: inline-flex;
  height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid #d7ddd8;
  border-radius: 16px;
  color: #69766f;
  background: #f2f4f0;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.readonly-chip svg {
  width: 13px;
  height: 13px;
}

.readonly-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dce2dd;
  border-left: 3px solid #729486;
  border-radius: 7px;
  color: #66736c;
  background: #f5f7f3;
}

.readonly-banner > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #688c7e;
}

.readonly-banner strong {
  display: block;
  color: #33433b;
  font-size: 11px;
}

.readonly-banner span {
  display: block;
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.55;
}

.readonly-mini {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: italic;
}

.demo-order-banner {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: center;
  gap: 19px;
  margin-bottom: 22px;
  padding: 17px 19px;
  border: 1px solid #cbd9d2;
  border-radius: 10px;
  background: #f1f6f2;
  overflow: hidden;
}

.demo-order-banner::after {
  position: absolute;
  top: -55px;
  right: 170px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(24, 62, 53, .08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.demo-product-visual {
  position: relative;
  width: 92px;
  height: 92px;
  border: 1px solid #d3ddd6;
  border-radius: 8px;
  color: var(--ink-faint);
  background: #e7e2d7;
  overflow: hidden;
}

.demo-product-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-product-visual > svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
}

.demo-product-visual > span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 3px 5px;
  border-radius: 3px;
  color: #fff;
  background: var(--accent);
  font-family: "Consolas", monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .08em;
}

.demo-order-main {
  min-width: 0;
}

.demo-order-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.demo-pill,
.demo-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a24425;
  background: #ffe6db;
  font-family: "Consolas", monospace;
  font-weight: 700;
  letter-spacing: .06em;
}

.demo-pill {
  height: 19px;
  padding: 0 7px;
  border-radius: 9px;
  font-size: 8px;
}

.demo-mini {
  height: 16px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 7px;
  vertical-align: 1px;
}

.order-mini {
  display: inline-flex;
  height: 16px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 3px;
  color: #265a48;
  background: #e2f0e8;
  font-family: "Consolas", monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .05em;
  vertical-align: 1px;
}

.demo-order-main h2 {
  margin: 7px 0 0;
  font-family: Georgia, "Times New Roman", "Noto Serif SC", serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.015em;
}

.demo-order-main p {
  max-width: 780px;
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.55;
}

.demo-doc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.demo-doc-chips button {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #cfdad3;
  border-radius: 5px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 9.5px;
  cursor: pointer;
}

.demo-doc-chips button:hover {
  color: var(--pine);
  border-color: #a7bbae;
  background: #fbfdfb;
}

.demo-doc-chips button span {
  color: var(--accent);
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
}

.demo-order-actions {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 190px;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  text-align: center;
}

.demo-order-actions .text-button {
  align-self: center;
  font-size: 10.5px;
}

.demo-order-actions > span {
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 28px;
}

.stat-card {
  position: relative;
  min-height: 118px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.stat-card::after {
  position: absolute;
  right: -7px;
  bottom: -11px;
  width: 62px;
  height: 62px;
  border: 1px solid #edf0ec;
  border-radius: 50%;
  content: "";
}

.stat-card-clickable {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.stat-card-clickable:hover {
  border-color: #aebfb3;
  box-shadow: 0 8px 22px rgba(29, 52, 42, .09);
  transform: translateY(-1px);
}

.stat-card-clickable:focus-visible {
  outline: 2px solid #2f7559;
  outline-offset: 2px;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.stat-label svg {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.stat-value {
  display: block;
  margin-top: 13px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
}

.stat-note {
  display: block;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.sales-heading {
  margin-top: 2px;
}

.sales-stat-card {
  border-top: 3px solid #d9b278;
}

.sales-stat-grid .stat-value.money {
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.section-heading .text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.section-heading .text-button svg {
  width: 13px;
  height: 13px;
}

.doc-type-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 29px;
}

.doc-type-card {
  position: relative;
  display: flex;
  min-height: 168px;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.doc-type-card:hover {
  border-color: #b6c2ba;
  box-shadow: 0 8px 24px rgba(20, 35, 30, .08);
  transform: translateY(-2px);
}

.doc-type-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 17px;
  border-radius: 7px;
  color: var(--doc-color, var(--pine));
  background: var(--doc-bg, var(--mint));
}

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

.doc-type-code {
  position: absolute;
  top: 17px;
  right: 15px;
  color: #a0aaa5;
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
}

.doc-type-card strong {
  font-size: 13px;
  font-weight: 700;
}

.doc-type-card span:last-child {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.4;
}

.doc-type-arrow {
  position: absolute;
  right: 15px;
  bottom: 15px;
  color: #adb5b0;
}

.doc-type-arrow svg {
  width: 15px;
  height: 15px;
}

.dashboard-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(260px, .65fr);
  gap: 16px;
}

.surface-panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.panel-head .text-button {
  font-size: 11.5px;
}

.recent-list {
  min-height: 210px;
}

.recent-row {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 9px 17px;
  border-bottom: 1px solid #edf0ec;
  cursor: pointer;
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-row:hover {
  background: #fafbf8;
}

.recent-business-row {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 37px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid #edf0ec;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.recent-business-row:last-child {
  border-bottom: 0;
}

.recent-business-row:hover {
  background: #f7faf7;
}

.recent-business-row .recent-main small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #98a29c;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-business-row .record-type-badge {
  min-width: 42px;
  justify-content: center;
}

.recent-business-amount {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 9.5px;
  white-space: nowrap;
}

.recent-type {
  display: grid;
  width: 34px;
  height: 37px;
  place-items: center;
  border: 1px solid #dde4de;
  border-radius: 6px;
  color: var(--pine);
  background: #f7f8f4;
}

.recent-type svg {
  width: 16px;
  height: 16px;
}

.recent-main {
  min-width: 0;
}

.recent-main strong {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-main span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-amount {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 10.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 10px;
  color: #286449;
  background: #e8f4ec;
  font-size: 9.5px;
  white-space: nowrap;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4b9c71;
  content: "";
}

.status-pill.draft {
  color: #78652d;
  background: #f8f1dc;
}

.status-pill.draft::before {
  background: #c7a843;
}

.crm-business-record.is-targeted-record {
  border-color: #bb8a4b;
  box-shadow: 0 0 0 3px rgba(187, 138, 75, .14), var(--shadow-sm);
  animation: targeted-record-pulse 1.1s ease 2;
}

@keyframes targeted-record-pulse {
  0%, 100% { background: #fff; }
  50% { background: #fffaf0; }
}

.quick-list {
  padding: 8px 16px 13px;
}

.quick-action {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid #edf0ec;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.quick-action:last-child {
  border-bottom: 0;
}

.quick-action:hover .quick-action-icon {
  color: var(--accent);
  border-color: #efd3c8;
}

.quick-action-icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fbfcf9;
}

.quick-action-icon svg {
  width: 15px;
  height: 15px;
}

.quick-action-copy {
  min-width: 0;
  flex: 1;
}

.quick-action-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
}

.quick-action-copy span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 10px;
}

.quick-action > svg {
  width: 14px;
  height: 14px;
  color: #aeb7b2;
}

.empty-state {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px;
  text-align: center;
}

.empty-state-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 14px;
  border: 1px solid #dbe3dc;
  border-radius: 50%;
  color: var(--pine);
  background: #f7f9f5;
}

.empty-state-icon svg {
  width: 23px;
  height: 23px;
}

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

.empty-state p {
  max-width: 380px;
  margin: 7px 0 17px;
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.65;
}

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

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-left {
  min-width: 0;
  flex: 1;
}

.product-library-toolbar .toolbar-left {
  min-width: 0;
  flex: 1;
}

.search-box {
  position: relative;
  width: min(320px, 100%);
}

.product-search-box,
.list-search-box {
  width: min(560px, 100%);
}

.product-search-box input,
.list-search-box input {
  height: 42px;
  padding-right: 16px;
  font-size: 12.5px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 39px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #a5ada8;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eff1ec;
}

.segmented button {
  min-height: 31px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 35, 30, .09);
}

.data-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.data-table th {
  height: 46px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-faint);
  background: #fafbf8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  height: 80px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0ec;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
  vertical-align: middle;
}

.data-table td > strong,
.data-table td .product-name strong {
  font-size: 13px !important;
}

.data-table td > span,
.data-table td .mono,
.data-table td small {
  font-size: 12px !important;
}

.data-table td [style*="font-size"] {
  font-size: 12px !important;
}

.data-table .status-pill,
.data-table .type-badge {
  font-size: 11px !important;
}

.data-table .order-mini,
.data-table .demo-mini {
  font-size: 9.5px !important;
}

.data-table .role-select {
  font-size: 12px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbfcfa;
}

.product-cell {
  display: flex;
  min-width: 220px;
  align-items: center;
  gap: 11px;
}

.product-thumb {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #e0e5df;
  border-radius: 7px;
  color: #9aa69f;
  background: #f4f6f2;
  overflow: hidden;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-thumb svg {
  width: 19px;
  height: 19px;
}

.product-name {
  min-width: 0;
}

.product-name strong {
  display: block;
  overflow: hidden;
  max-width: 260px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-name span {
  display: block;
  overflow: hidden;
  max-width: 260px;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-browse-row {
  cursor: pointer;
}

.product-browse-row:hover td {
  background: #f7faf7;
}

.product-browse-row:focus-visible {
  outline: 2px solid #7ba18e;
  outline-offset: -2px;
}

.product-detail-toolbar {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
}

.product-detail-toolbar > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.product-detail-toolbar > div:nth-child(2) strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-kicker {
  display: block;
  margin-bottom: 3px;
  color: #789083;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .1em;
}

.product-detail-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.product-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid #dce3de;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.product-detail-visual {
  position: relative;
  display: grid;
  min-height: 350px;
  place-items: center;
  border-right: 1px solid #e0e5e1;
  background:
    linear-gradient(145deg, rgba(239, 245, 241, .55), rgba(250, 249, 245, .9)),
    #f6f8f5;
  overflow: hidden;
}

.product-detail-visual > img {
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: contain;
  padding: 22px;
}

.product-detail-placeholder {
  display: grid;
  place-items: center;
  gap: 10px;
  color: #92a198;
}

.product-detail-placeholder svg {
  width: 42px;
  height: 42px;
}

.product-detail-placeholder small {
  font-size: 10px;
}

.product-detail-demo {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #765d23;
  background: #f5e7b9;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
}

.product-detail-intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 34px 36px;
}

.product-detail-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-detail-eyebrow span {
  padding: 4px 8px;
  border: 1px solid #dce5df;
  border-radius: 4px;
  color: #627269;
  background: #f6f9f6;
  font-size: 9.5px;
}

.product-detail-eyebrow .product-detail-model {
  color: #2e5e4a;
  border-color: #bed3c6;
  background: #edf5f0;
  font-family: "Consolas", monospace;
  font-weight: 700;
}

.product-detail-intro h1 {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.015em;
}

.product-detail-en {
  margin: 9px 0 0;
  color: #40594e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.45;
}

.product-detail-description {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.8;
}

.product-detail-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 25px;
  border: 1px solid #e0e6e1;
  border-radius: 7px;
  background: #e0e6e1;
}

.product-detail-highlight-grid > div {
  min-width: 0;
  padding: 12px 13px;
  background: #fbfcfa;
}

.product-detail-highlight-grid span {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.product-detail-highlight-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 14px;
  margin-top: 14px;
}

.product-detail-main,
.product-detail-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.product-detail-section {
  padding: 20px 22px;
  border: 1px solid #dce3de;
  border-radius: 8px;
  background: #fff;
}

.product-detail-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e5eae6;
}

.product-detail-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.product-detail-section-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.55;
}

.product-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
}

.product-detail-facts > div {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1.2fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0ed;
}

.product-detail-facts dt {
  color: var(--ink-faint);
  font-size: 9.5px;
}

.product-detail-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.product-feature-list {
  display: grid;
  gap: 9px;
  padding: 9px 0 0;
  margin: 0;
  list-style: none;
}

.product-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #506258;
  font-size: 10.5px;
  line-height: 1.65;
}

.product-feature-list svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: #5e8a74;
}

.product-tier-detail-list {
  display: grid;
  margin-top: 9px;
}

.product-tier-detail-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ed;
}

.product-tier-detail-list > div:last-child {
  border-bottom: 0;
}

.product-tier-detail-list span {
  color: var(--ink-soft);
  font-size: 9.5px;
}

.product-tier-detail-list strong {
  color: #255844;
  font-family: "Consolas", monospace;
  font-size: 10.5px;
}

.product-tier-detail-list small {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.product-detail-side-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #d7e2db;
  border-radius: 8px;
  color: #5c6e64;
  background: #f3f7f4;
}

.product-detail-side-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #5e8975;
}

.product-detail-side-note p {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.7;
}

.mono {
  color: var(--ink);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 10.5px;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

.table-actions .icon-button {
  width: 29px;
  height: 29px;
}

.table-actions .icon-button svg {
  width: 15px;
  height: 15px;
}

.doc-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.doc-search-tools {
  display: flex;
  min-width: min(560px, 100%);
  flex: 0 1 560px;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
}

.doc-search-tools > span {
  color: var(--ink-faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.doc-search-tools .list-search-box {
  min-width: 0;
  flex: 1;
}

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

.role-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.role-summary-card > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.role-summary-card svg {
  width: 15px;
  height: 15px;
}

.role-summary-card strong {
  display: block;
  margin-top: 10px;
  font-family: Georgia, serif;
  font-size: 27px;
}

.role-summary-card small {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 9px;
}

.role-select {
  width: 138px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 10.5px;
}

.user-name-cell {
  display: flex;
  min-width: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-name-cell > div {
  min-width: 0;
}

.user-name-cell strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.user-name-cell span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 11px;
}

.user-name-edit {
  display: inline-flex;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid #d5ded8;
  border-radius: 5px;
  color: #53675c;
  background: #f8faf8;
  font-size: 9.5px;
  cursor: pointer;
}

.user-name-edit:hover {
  border-color: #9fb7a9;
  color: var(--pine);
  background: #edf5f0;
}

.user-name-edit svg {
  width: 12px;
  height: 12px;
}

.user-profile-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d7e2db;
  border-radius: 6px;
  color: #5d7066;
  background: #f3f8f5;
  font-size: 10px;
  line-height: 1.6;
}

.user-profile-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #5d8976;
}

.role-permission-copy {
  display: block;
  max-width: 300px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.5;
}

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

.customer-layout-switch {
  flex: 0 0 auto;
}

.customer-search-count {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.customer-layout-switch button {
  display: grid;
  width: 31px;
  min-height: 31px;
  padding: 0;
  place-items: center;
}

.customer-layout-switch button svg {
  width: 15px;
  height: 15px;
}

.customer-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.customer-table {
  width: 100%;
  min-width: 1220px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.customer-table-col-created {
  width: 112px;
}

.customer-table-col-company {
  width: 205px;
}

.customer-table-col-contact {
  width: 128px;
}

.customer-table-col-email {
  width: 218px;
}

.customer-table-col-sales {
  width: 170px;
}

.customer-table-col-amount {
  width: 175px;
}

.customer-table-col-stage {
  width: 108px;
}

.customer-table-col-business-grade,
.customer-table-col-system-grade {
  width: 88px;
}

.customer-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  color: #4d5f56;
  background: #f7f8f4;
  font-size: 10.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.customer-table td {
  padding: 12px 13px;
  border-bottom: 1px solid #edf0ec;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
  vertical-align: middle;
}

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

.customer-table-row {
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}

.customer-table-row:hover td {
  background-color: #f8faf7;
}

.customer-table-row:focus-visible {
  outline: 2px solid #6f9a85;
  outline-offset: -2px;
}

.customer-table th.customer-table-value-column {
  color: #2d5545;
  background: #eaf3ed;
  font-size: 11px;
}

.customer-table td.customer-table-value-column {
  border-right: 1px solid #e1eae4;
  border-left: 1px solid #e1eae4;
  background-color: #f7fbf8;
}

.customer-table-row:hover td.customer-table-value-column {
  background-color: #eff7f1;
}

.customer-table-row.has-lead-value td:first-child,
.customer-table-row.has-opportunity-value td:first-child {
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 3px 100%;
}

.customer-table-row.has-lead-value td:first-child {
  background-image: linear-gradient(#c49a2c, #c49a2c);
}

.customer-table-row.has-opportunity-value td:first-child {
  background-image: linear-gradient(#3e8197, #3e8197);
}

.customer-table-row.has-lead-value.has-opportunity-value td:first-child {
  background-image: linear-gradient(180deg, #c49a2c 0 50%, #3e8197 50% 100%);
}

.customer-table-row[hidden] {
  display: none;
}

.customer-table-created strong,
.customer-table-created small,
.customer-table-number strong,
.customer-table-number small {
  display: block;
}

.customer-table-created strong {
  color: #53635b;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.customer-table-created small,
.customer-table-number small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.customer-table-company {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.customer-table-company strong {
  overflow: hidden;
  color: #26362f;
  font-size: 12.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-table-company small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.customer-table-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.customer-table-copy span {
  display: block;
  overflow: hidden;
  color: #52645b;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-table-email span {
  color: #3f6254;
}

.customer-table-copy .customer-table-placeholder {
  color: #a2aaa5;
}

.customer-table-sales {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.customer-table-sales-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  color: #334d41;
  background: #dcebdc;
  font-size: 10px;
  font-weight: 800;
}

.customer-table-sales > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.customer-table-sales strong,
.customer-table-sales small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-table-sales strong {
  color: #35483f;
  font-size: 10.5px;
}

.customer-table-sales small {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.customer-table-number {
  text-align: right;
}

.customer-table-amount-list {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.customer-table-money {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap;
}

.customer-table-money em {
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.customer-table-money strong {
  font-family: "Consolas", monospace;
  font-size: 12px;
  font-weight: 800;
}

.customer-table-money.is-lead em {
  color: #806018;
  background: #fbf1cf;
}

.customer-table-money.is-lead strong {
  color: #9a711d;
}

.customer-table-money.is-opportunity em {
  color: #276579;
  background: #e5f1f5;
}

.customer-table-money.is-opportunity strong {
  color: #2d7087;
}

.customer-table-money.is-empty {
  color: #8b9690;
}

.customer-table-money.is-empty em {
  color: #77837c;
  background: #f0f2ef;
}

.customer-table-stage-note {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.customer-table .record-type-badge {
  width: max-content;
}

.customer-import-intro {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid #d7e2db;
  border-radius: 7px;
  background: #f4f8f5;
}

.customer-import-intro > div {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 7px;
  color: #35634f;
  background: #e3efe8;
}

.customer-import-intro svg {
  width: 22px;
  height: 22px;
}

.customer-import-intro strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.customer-import-intro p {
  margin: 4px 0 11px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.customer-import-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 13px 0;
}

.customer-import-steps span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #e1e6e2;
  border-radius: 5px;
  color: var(--ink-soft);
  background: #fbfcfa;
  font-size: 9.5px;
}

.customer-import-steps b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #557967;
  font-size: 9px;
}

.customer-import-dropzone {
  display: flex;
  width: 100%;
  min-height: 105px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #b8c9be;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fbfcfa;
  cursor: pointer;
}

.customer-import-dropzone:hover {
  border-color: #739885;
  background: #f5f9f6;
}

.customer-import-dropzone svg {
  width: 25px;
  height: 25px;
  color: #648574;
}

.customer-import-dropzone strong {
  font-size: 11px;
}

.customer-import-dropzone span {
  color: var(--ink-faint);
  font-size: 9px;
}

.customer-import-preview {
  margin-top: 12px;
}

.customer-import-placeholder,
.customer-import-loading {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e1e6e2;
  border-radius: 6px;
  color: var(--ink-faint);
  background: #fbfcfa;
  font-size: 9.5px;
  text-align: center;
}

.customer-import-file {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #dce4de;
  border-radius: 6px;
  background: #fff;
}

.customer-import-file svg {
  width: 17px;
  height: 17px;
  color: #537a66;
}

.customer-import-file strong {
  display: block;
  font-size: 10px;
}

.customer-import-file span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.customer-import-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 9px;
  border: 1px solid #dfe5e0;
  border-radius: 6px;
  background: #dfe5e0;
}

.customer-import-counts > div {
  padding: 10px 12px;
  background: #fbfcfa;
}

.customer-import-counts span {
  display: block;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.customer-import-counts strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.customer-import-ready {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 9px 11px;
  border: 1px solid #cde0d3;
  border-radius: 6px;
  color: #2e684c;
  background: #eef7f1;
  font-size: 9.5px;
}

.customer-import-ready svg {
  width: 15px;
  height: 15px;
}

.customer-import-errors {
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid #eccfc7;
  border-radius: 6px;
  color: #844d3f;
  background: #fff6f3;
  font-size: 9.5px;
}

.customer-import-errors strong {
  display: block;
  color: #a03f2c;
  font-size: 10px;
}

.customer-import-errors ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding-left: 17px;
}

.customer-import-errors p {
  margin: 7px 0 0;
}

.customer-import-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-import-result-grid > div {
  padding: 13px;
  border: 1px solid #dde4df;
  border-radius: 6px;
  background: #fbfcfa;
}

.customer-import-result-grid span {
  display: block;
  color: var(--ink-faint);
  font-size: 9px;
}

.customer-import-result-grid strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 22px;
}

.customer-import-result-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 11px;
  padding: 9px 11px;
  border: 1px solid #d7e4dc;
  border-radius: 6px;
  color: #4e6b5c;
  background: #f4f8f5;
  font-size: 9px;
  line-height: 1.55;
}

.customer-import-result-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.customer-card {
  position: relative;
  display: flex;
  min-height: 230px;
  overflow: hidden;
  flex-direction: column;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.customer-card.has-lead-value::before,
.customer-card.has-opportunity-value::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: #3e8197;
  content: "";
}

.customer-card.has-lead-value::before {
  background: #c49a2c;
}

.customer-card.has-lead-value.has-opportunity-value::before {
  background: linear-gradient(180deg, #c49a2c 0 50%, #3e8197 50% 100%);
}

.customer-card:hover {
  border-color: #aebdb4;
  box-shadow: 0 9px 28px rgba(20, 35, 30, .08);
  transform: translateY(-2px);
}

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

.customer-card-flags {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.customer-grade {
  display: inline-flex;
  min-width: 58px;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px;
  border: 1px solid #dce4df;
  border-radius: 6px;
  background: #fff;
}

.customer-grade em {
  color: #77867e;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.customer-grade strong {
  color: #43554c;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
}

.customer-grade-business.grade-a {
  border-color: #aed0b9;
  background: #eff8f2;
}

.customer-grade-business.grade-a strong {
  color: #236442;
}

.customer-grade-business.grade-b {
  border-color: #b9d2df;
  background: #f0f7fa;
}

.customer-grade-business.grade-b strong {
  color: #2c667e;
}

.customer-grade-business.grade-c {
  border-color: #e2d1a7;
  background: #fff9eb;
}

.customer-grade-business.grade-c strong {
  color: #80631f;
}

.customer-grade-business.grade-d {
  border-color: #e0c2ba;
  background: #fff5f1;
}

.customer-grade-business.grade-d strong {
  color: #8f4e3e;
}

.customer-grade-system.is-imp {
  border-color: #d9b0a4;
  background: #fff0e9;
}

.customer-grade-system.is-imp strong {
  color: #a3422c;
}

.customer-grade.is-empty {
  opacity: .7;
}

.customer-grade.is-compact {
  min-width: 0;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 9px;
}

.customer-grade.is-compact em {
  font-size: 8px;
}

.customer-grade.is-compact strong {
  font-size: 8.5px;
}

.customer-value-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border-radius: 9px;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.customer-value-badge.is-lead {
  border: 1px solid #ead79a;
  color: #806018;
  background: #fff8dc;
}

.customer-value-badge.is-opportunity {
  border: 1px solid #bfdce5;
  color: #256477;
  background: #edf7fa;
}

.customer-value-badge svg {
  width: 11px;
  height: 11px;
}

.customer-avatar,
.customer-detail-logo {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--pine);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
}

.customer-owner {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card h2 {
  margin: 15px 0 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.customer-value-summary {
  display: grid;
  gap: 5px;
  margin-top: 11px;
}

.customer-value-line {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 6px 8px;
  border-left: 2px solid #3e8197;
  color: #2d7087;
  background: #f0f7f9;
}

.customer-value-line.is-lead {
  border-left-color: #c49a2c;
  color: #8a681c;
  background: #fff9e5;
}

.customer-value-line span {
  overflow: hidden;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-value-line strong {
  flex: 0 0 auto;
  font-family: "Consolas", monospace;
  font-size: 9.5px;
  white-space: nowrap;
}

.customer-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 16px;
}

.customer-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 4px;
  color: #607067;
  background: #f1f4f0;
  font-size: 9px;
}

.customer-metrics svg {
  width: 12px;
  height: 12px;
}

.customer-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #edf0ec;
  color: #9aa39e;
  font-size: 8.5px;
}

.customer-card-foot svg {
  width: 14px;
  height: 14px;
}

.customer-select-block {
  border-color: #cfded6;
  background: #f4f9f6;
}

.customer-select-block select {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.customer-detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border: 1px solid #dbe4de;
  border-radius: 8px;
  background: #f6f9f6;
}

.customer-detail-logo {
  width: 46px;
  height: 46px;
  font-size: 20px;
}

.customer-detail-hero > div {
  min-width: 0;
  flex: 1;
}

.customer-detail-hero h3 {
  margin: 0;
  font-size: 15px;
}

.customer-detail-hero p,
.customer-detail-hero a {
  display: block;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-notes {
  margin-top: 12px;
  padding: 11px 13px;
  border-left: 2px solid #cdb46f;
  color: #6e6243;
  background: #fbf8ed;
  font-size: 10px;
  line-height: 1.6;
}

.customer-detail-section {
  margin-top: 17px;
}

.customer-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 8px;
}

.customer-detail-heading h3 {
  display: inline;
  margin: 0;
  font-size: 12px;
}

.customer-detail-heading span {
  margin-left: 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.customer-detail-heading .text-button {
  font-size: 9.5px;
}

.customer-detail-list,
.customer-record-list {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.customer-detail-row,
.customer-record-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 9px 11px;
  border-bottom: 1px solid #edf0ec;
  background: #fff;
}

.customer-detail-row:last-child,
.customer-record-row:last-child {
  border-bottom: 0;
}

.detail-row-icon {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 5px;
  color: #5d7c70;
  background: #edf4ef;
}

.detail-row-icon svg {
  width: 13px;
  height: 13px;
}

.customer-detail-row strong,
.record-main strong {
  display: block;
  font-size: 10px;
}

.customer-detail-row span:not(.detail-row-icon):not(.detail-row-actions),
.record-main span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-row-actions {
  display: flex;
  gap: 1px;
}

.customer-detail-empty {
  padding: 19px;
  color: var(--ink-faint);
  background: #fafbf8;
  font-size: 9.5px;
  text-align: center;
}

.customer-record-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.customer-record-row.is-voided {
  opacity: .56;
}

.record-type-badge {
  display: inline-flex;
  min-width: 43px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #4f665c;
  background: #edf2ee;
  font-size: 8.5px;
  font-weight: 600;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-tabs button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.filter-tabs button:hover {
  background: #ecefe9;
}

.filter-tabs button.active {
  color: var(--pine);
  border-color: #cbdad2;
  background: var(--mint);
  font-weight: 600;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--badge-color, var(--pine));
  background: var(--badge-bg, var(--mint));
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
}

.document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
}

.empty-inline {
  padding: 60px 25px;
  color: var(--ink-faint);
  text-align: center;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 22px;
}

.settings-main {
  display: grid;
  gap: 18px;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.form-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.form-section-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.form-section-head p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.5;
}

.form-section-body {
  padding: 20px;
}

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

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

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

.form-grid .span-3 {
  grid-column: span 3;
}

.field {
  min-width: 0;
}

.field > label,
.field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.required-mark {
  color: var(--accent);
}

.field input,
.field select,
.field textarea,
.control {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
  transition: border-color .14s ease, box-shadow .14s ease;
}

.field input,
.field select,
.control {
  height: 39px;
  padding: 0 11px;
}

.field select {
  padding-right: 30px;
  cursor: pointer;
}

.field textarea {
  min-height: 82px;
  padding: 10px 11px;
  line-height: 1.55;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.control:focus {
  border-color: #7da79a;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(36, 85, 72, .09);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a7afa9;
}

.field-hint {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 18px;
}

.side-card {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.side-card + .side-card {
  margin-top: 15px;
}

.side-card h3 {
  margin: 0 0 15px;
  font-size: 13px;
}

.side-card p {
  margin: 8px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.logo-uploader {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-preview {
  display: grid;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px dashed #bfcac2;
  border-radius: 8px;
  color: #9ba69f;
  background: #f8f9f6;
  overflow: hidden;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preview svg {
  width: 21px;
  height: 21px;
}

.upload-actions {
  display: grid;
  flex: 1;
  gap: 7px;
}

.upload-actions .secondary-button {
  width: 100%;
  min-height: 34px;
  font-size: 11px;
}

.standard-note {
  display: flex;
  gap: 10px;
  padding: 13px;
  border-radius: 7px;
  color: #234e43;
  background: #edf5f0;
}

.standard-note svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.standard-note strong {
  display: block;
  font-size: 11px;
}

.standard-note span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.55;
}

.backup-actions {
  display: grid;
  gap: 7px;
}

.backup-actions button {
  width: 100%;
  justify-content: flex-start;
  min-height: 37px;
  font-size: 11px;
}

.backup-warning {
  margin-top: 13px !important;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

/* Editor */
.editor-page {
  max-width: none;
}

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

.editor-title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.back-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
}

.back-button:hover {
  color: var(--ink);
  border-color: #aab6ae;
}

.back-button svg {
  width: 16px;
  height: 16px;
}

.editor-title-row h1 {
  overflow: hidden;
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-title-badge {
  display: inline-flex;
  height: 18px;
  align-items: center;
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid #c9d9d0;
  border-radius: 3px;
  color: var(--pine);
  background: var(--mint);
  font-family: "Consolas", monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .07em;
  vertical-align: 3px;
}

.editor-title-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.save-state::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #65a57e;
  content: "";
}

.save-state.unsaved::before {
  background: #d7a735;
}

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

.editor-layout {
  display: grid;
  grid-template-columns: minmax(390px, 460px) minmax(500px, 1fr);
  align-items: start;
  gap: 16px;
}

.editor-form-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 15px);
  height: calc(100vh - var(--topbar-height) - 72px);
  min-height: 550px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.editor-tabs {
  display: flex;
  height: 47px;
  align-items: stretch;
  padding: 0 9px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.editor-tab {
  position: relative;
  flex: 1;
  padding: 0 4px;
  border: 0;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.editor-tab:hover {
  color: var(--ink);
}

.editor-tab.active {
  color: var(--pine);
}

.editor-tab.active::after {
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.editor-form-scroll {
  height: calc(100% - 47px);
  padding: 19px;
  overflow-y: auto;
}

.editor-section {
  display: none;
}

.editor-section.active {
  display: block;
  animation: section-in .16s ease both;
}

@keyframes section-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.editor-section-title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.editor-section-title span {
  margin-left: 5px;
  color: var(--ink-faint);
  font-size: 9.5px;
  font-weight: 400;
}

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

.doc-charge-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #dce5df;
  border-radius: 5px;
  color: #617169;
  background: #f7faf8;
  font-size: 9px;
  line-height: 1.55;
}

.doc-charge-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #5b806e;
}

.sales-rep-block {
  margin-bottom: 13px;
  border-color: #cfe0d6;
  background: #f8fbf9;
}

.editor-fields .span-2 {
  grid-column: span 2;
}

.editor-fields .field > label {
  font-size: 10.5px;
}

.editor-fields .field input,
.editor-fields .field select {
  height: 36px;
  font-size: 11.5px;
}

.editor-fields .field textarea {
  min-height: 62px;
  font-size: 11.5px;
}

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

.type-choice {
  display: flex;
  min-height: 45px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 10.5px;
  text-align: left;
  cursor: pointer;
}

.type-choice:hover {
  border-color: #aebfb5;
}

.type-choice.active {
  border-color: #85a99c;
  color: var(--pine);
  background: #f0f6f2;
  box-shadow: inset 0 0 0 1px rgba(24, 62, 53, .05);
}

.type-choice svg {
  width: 15px;
  height: 15px;
}

.order-type-lock {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #cbdad2;
  border-radius: 7px;
  color: var(--pine);
  background: #f2f7f3;
}

.order-type-lock > svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.order-type-lock strong {
  display: block;
  font-size: 11px;
}

.order-type-lock span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.order-master-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #d7e4dc;
  border-radius: 7px;
  color: #4f665c;
  background: #f5f9f6;
}

.order-master-note > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #65907f;
}

.order-master-note strong {
  display: block;
  color: #23483c;
  font-size: 10.5px;
}

.order-master-note span {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.55;
}

.fx-conversion-card {
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #d5e1da;
  border-radius: 8px;
  background: #f6faf7;
}

.fx-conversion-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.fx-conversion-icon {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: #286850;
  background: #dfeee5;
}

.fx-conversion-icon svg {
  width: 15px;
  height: 15px;
}

.fx-conversion-head strong {
  display: block;
  color: #24463b;
  font-size: 10.5px;
}

.fx-conversion-head span:last-child {
  display: block;
  margin-top: 3px;
  color: #708178;
  font-size: 9px;
  line-height: 1.5;
}

.fx-rate-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e0e9e3;
  color: #53685e;
  font-size: 10px;
}

.fx-rate-line input {
  width: 112px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #c9d7ce;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  font-family: "Consolas", monospace;
  font-size: 10.5px;
  text-align: right;
}

.fx-rate-line input:disabled {
  color: #64776d;
  background: #edf3ef;
}

.fx-rate-line strong {
  color: #24463b;
  font-family: "Consolas", monospace;
  font-size: 10.5px;
}

.fx-rate-line .text-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 9.5px;
}

.fx-rate-line .text-button svg {
  width: 11px;
  height: 11px;
}

.fx-rate-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: #8a9990;
  font-size: 8px;
  line-height: 1.45;
}

.fx-rate-meta span:last-child {
  overflow: hidden;
  max-width: 64%;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-linked-note {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px dashed #dbe6df;
  color: #718279;
  font-size: 8.5px;
  line-height: 1.55;
}

.fx-conversion-card.is-base {
  border-color: #e2e5df;
  background: #fafbf8;
}

.fx-conversion-card.is-base .fx-conversion-icon {
  color: #56675f;
  background: #edf0eb;
}

.party-block {
  padding: 12px;
  border: 1px solid #e5e9e4;
  border-radius: 7px;
  background: #fbfcfa;
}

.party-block + .party-block {
  margin-top: 11px;
}

.party-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
}

.party-block-title .text-button {
  font-size: 9.5px;
}

.line-items-editor {
  display: grid;
  gap: 8px;
}

.line-item-empty {
  padding: 24px 14px;
  border: 1px dashed #ccd5ce;
  border-radius: 7px;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
}

.editor-line-item {
  padding: 10px;
  border: 1px solid #e1e6e0;
  border-radius: 7px;
  background: #fbfcfa;
}

.line-item-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.line-item-head img,
.line-item-head .mini-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
  background: #eef1ec;
}

.mini-placeholder {
  display: grid;
  place-items: center;
  color: #9aa69f;
}

.mini-placeholder svg {
  width: 14px;
  height: 14px;
}

.line-item-head strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-item-head span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.line-item-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.line-mini-field label {
  display: block;
  margin-bottom: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.line-mini-field input {
  width: 100%;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #d7ded8;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
}

.line-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8ece7;
}

.line-item-total {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 9.5px;
}

.icon-button.tiny {
  width: 25px;
  height: 25px;
}

.icon-button.tiny svg {
  width: 13px;
  height: 13px;
}

.add-line-button {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 1px dashed #b8c6bd;
  border-radius: 6px;
  color: var(--pine);
  background: #f8faf7;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.add-line-button:hover {
  border-color: #8eaa9e;
  background: #f2f7f3;
}

.editor-totals {
  margin-top: 13px;
  padding: 11px 13px;
  border-radius: 7px;
  background: #f2f5f1;
}

.editor-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.editor-total-row strong {
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 11px;
}

.editor-total-row.grand {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #d8dfd9;
  color: var(--ink);
  font-weight: 700;
}

.editor-total-row.grand strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.preview-panel {
  min-width: 0;
}

.preview-toolbar {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.preview-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.preview-toolbar-left strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.preview-stage {
  width: 100%;
  min-height: calc(100vh - 160px);
  padding: 19px;
  border: 1px solid #dce2dc;
  border-radius: 9px;
  background: #e9ece7;
  overflow: hidden;
}

.preview-sheet-holder {
  width: 100%;
  overflow: hidden;
}

/* A4 document */
.doc-sheet {
  width: 794px;
  min-height: 1123px;
  padding: 42px 45px 34px;
  color: #1b2723;
  background: #fff;
  box-shadow: 0 6px 25px rgba(20, 35, 30, .13);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-size: 10px;
  line-height: 1.45;
  transform-origin: top left;
}

.doc-brand-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 25px;
  padding-bottom: 18px;
  border-bottom: 2px solid #183e35;
}

.doc-company {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.doc-logo {
  display: grid;
  width: 66px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  color: #183e35;
  overflow: hidden;
}

.doc-logo img {
  max-width: 100%;
  max-height: 54px;
  object-fit: contain;
}

.doc-logo-fallback {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #cbd7d1;
  border-radius: 4px;
  color: #183e35;
  background: #f2f6f3;
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 700;
}

.doc-company-text h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.15;
}

.doc-company-text .doc-company-cn {
  margin-top: 2px;
  color: #4f5d57;
  font-size: 9px;
  letter-spacing: .04em;
}

.doc-company-text .doc-address {
  max-width: 410px;
  margin-top: 7px;
  color: #59655f;
  font-size: 8.3px;
  line-height: 1.5;
  white-space: pre-line;
}

.doc-company-contact {
  margin-top: 3px;
  color: #737e78;
  font-size: 7.8px;
}

.doc-sales-contact {
  margin-top: 4px;
  color: #345849;
  font-size: 7.5px;
  line-height: 1.45;
}

.doc-sales-contact span {
  color: #6f7d76;
  font-size: 6.6px;
  font-weight: 700;
  letter-spacing: .05em;
}

.doc-title-block {
  min-width: 195px;
  text-align: right;
}

.doc-title-block h2 {
  margin: 0;
  color: #183e35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: .7px;
  line-height: 1;
}

.doc-title-block .doc-title-cn {
  margin-top: 5px;
  color: #738079;
  font-size: 9px;
  letter-spacing: .12em;
}

.doc-demo-flag {
  display: inline-block;
  margin-top: 7px;
  padding: 2px 6px;
  border: 1px solid #e1ab96;
  color: #b24c2b;
  background: #fff1eb;
  font-family: "Consolas", monospace;
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: .1em;
}

.doc-number-label {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 8px;
  color: #fff;
  background: #183e35;
  font-family: "Courier New", monospace;
  font-size: 8.3px;
  letter-spacing: .04em;
}

.doc-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 13px;
  border: 1px solid #d9e0db;
  border-bottom: 0;
}

.doc-meta-item {
  min-height: 45px;
  padding: 7px 9px;
  border-right: 1px solid #d9e0db;
  border-bottom: 1px solid #d9e0db;
}

.doc-meta-item:nth-child(4n) {
  border-right: 0;
}

.doc-meta-item > span {
  display: block;
  margin-bottom: 3px;
  color: #7a857f;
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc-meta-item > strong {
  display: block;
  color: #24312c;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.35;
}

.doc-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 15px;
}

.doc-party {
  min-height: 94px;
  padding: 10px 11px;
  border-left: 2px solid #183e35;
  background: #f7f8f5;
}

.doc-party-label {
  margin-bottom: 6px;
  color: #6b7771;
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: .11em;
}

.doc-party strong {
  display: block;
  color: #17231f;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.35;
}

.doc-party p {
  margin: 3px 0 0;
  color: #5b6761;
  font-size: 7.8px;
  line-height: 1.5;
  white-space: pre-line;
}

.doc-shipping-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 12px;
  border-top: 1px solid #d9e0db;
  border-left: 1px solid #d9e0db;
}

.doc-shipping-grid .doc-meta-item {
  min-height: 39px;
}

.doc-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  table-layout: fixed;
}

.doc-table th {
  padding: 7px 6px;
  border-top: 1px solid #5c756a;
  border-bottom: 1px solid #5c756a;
  color: #253c32;
  background: #edf2ee;
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  text-align: right;
  text-transform: uppercase;
}

.doc-table th:first-child,
.doc-table th:nth-child(2) {
  text-align: left;
}

.doc-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #e3e8e4;
  color: #35423d;
  font-size: 7.8px;
  line-height: 1.45;
  text-align: right;
  vertical-align: top;
}

.doc-table td:first-child {
  color: #7a857f;
  text-align: center;
}

.doc-table td:nth-child(2) {
  text-align: left;
}

.doc-item-name {
  display: block;
  color: #17231f;
  font-size: 8.4px;
  font-weight: 700;
  line-height: 1.35;
}

.doc-item-meta {
  display: block;
  margin-top: 2px;
  color: #77837d;
  font-size: 6.6px;
  line-height: 1.4;
}

.doc-table .doc-empty-row td {
  height: 92px;
  color: #a0aaa5;
  text-align: center;
  vertical-align: middle;
}

.doc-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 16px;
  margin-top: 13px;
}

.doc-amount-words {
  align-self: start;
  padding: 8px 10px;
  border: 1px solid #d9e0db;
  color: #59665f;
  background: #fbfcfa;
}

.doc-amount-words span {
  display: block;
  color: #78837d;
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.doc-amount-words strong {
  display: block;
  margin-top: 3px;
  color: #34413c;
  font-size: 7.8px;
  font-weight: 600;
  line-height: 1.4;
}

.doc-total-box {
  border: 1px solid #d9e0db;
}

.doc-total-row {
  display: flex;
  min-height: 27px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 9px;
  border-bottom: 1px solid #e2e7e3;
  color: #59665f;
  font-size: 7.5px;
}

.doc-total-row:last-child {
  border-bottom: 0;
}

.doc-total-row strong {
  color: #26342e;
  font-family: "Courier New", monospace;
  font-size: 8.3px;
}

.doc-total-row.grand {
  min-height: 34px;
  color: #fff;
  background: #183e35;
  font-size: 8px;
  font-weight: 700;
}

.doc-total-row.grand strong {
  color: #fff;
  font-size: 10px;
}

.doc-terms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin-top: 15px;
  padding: 10px 12px;
  border: 1px solid #dfe5e0;
  background: #fbfcfa;
}

.doc-term {
  display: grid;
  grid-template-columns: 91px minmax(0, 1fr);
  gap: 7px;
  min-height: 17px;
  align-items: start;
  font-size: 7.5px;
  line-height: 1.45;
}

.doc-term span {
  color: #7a857f;
  font-size: 6.7px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.doc-term strong {
  color: #34413c;
  font-weight: 600;
  white-space: pre-line;
}

.contract-terms-section {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 2px solid #183e35;
}

.contract-preamble {
  margin-bottom: 13px;
}

.contract-preamble strong,
.contract-terms-section > h3 {
  color: #1c3329;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.contract-preamble p {
  margin: 5px 0 0;
  color: #3f4e47;
  font-size: 9.5px;
  line-height: 1.62;
  text-align: justify;
}

.contract-terms-section > h3 {
  margin: 0 0 12px;
  font-size: 11.5px;
}

.contract-clause {
  margin-top: 12px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.contract-clause h4 {
  margin: 0 0 5px;
  color: #17231f;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.45;
}

.contract-clause p {
  margin: 4px 0;
  color: #3e4b45;
  font-size: 9.2px;
  line-height: 1.62;
  text-align: justify;
}

.contract-appendix-heading,
.contract-final-heading {
  display: grid;
  gap: 3px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid #9fb0a6;
  break-after: avoid;
  page-break-after: avoid;
}

.contract-appendix-heading strong,
.contract-final-heading strong {
  color: #1c3329;
  font-size: 10.5px;
  font-weight: 800;
}

.contract-appendix-heading span,
.contract-final-heading span {
  color: #6e7b74;
  font-size: 8.8px;
  line-height: 1.5;
}

.contract-product-table td.contract-item-remarks {
  color: #5c6962;
  font-size: 8px;
  line-height: 1.5;
  text-align: left;
}

.contract-product-table .doc-item-meta {
  font-size: 6.7px;
}

.doc-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
}

.doc-lower-grid.no-signature {
  grid-template-columns: 1fr;
}

.doc-signature-stack {
  display: grid;
  gap: 8px;
}

.doc-bank {
  min-height: 95px;
  padding: 10px 11px;
  border: 1px solid #dfe5e0;
}

.doc-bank h3,
.doc-signature h3 {
  margin: 0 0 7px;
  color: #6a7770;
  font-size: 6.8px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.doc-bank p {
  margin: 2px 0;
  color: #425049;
  font-size: 7.5px;
  line-height: 1.5;
}

.doc-bank p span {
  display: inline-block;
  min-width: 61px;
  color: #7d8882;
  font-size: 6.8px;
}

.doc-signature {
  display: flex;
  min-height: 95px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 11px;
  border: 1px solid #dfe5e0;
  text-align: right;
}

.doc-signature.buyer-signature {
  min-height: 82px;
}

.doc-signature h3 {
  align-self: flex-start;
}

.signature-image {
  max-width: 160px;
  max-height: 40px;
  object-fit: contain;
}

.signature-line {
  width: 160px;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid #aab5ae;
  color: #6e7a73;
  font-size: 6.8px;
}

.doc-signature small {
  width: 160px;
  margin-top: 4px;
  color: #7d8882;
  font-size: 6.4px;
  text-align: left;
}

.doc-declaration {
  margin-top: 12px;
  color: #6e7973;
  font-size: 6.7px;
  line-height: 1.55;
}

.doc-declaration strong {
  color: #3b4943;
}

.doc-demo-notice {
  padding: 6px 9px;
  border: 1px solid #ecc8b9;
  color: #9a4d32;
  background: #fff8f5;
}

.doc-demo-notice strong {
  color: #a33f20;
}

.doc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding-top: 7px;
  border-top: 1px solid #dfe5e0;
  color: #8a948f;
  font-size: 6.2px;
  letter-spacing: .02em;
}

.doc-footer strong {
  color: #607069;
  font-weight: 600;
}

.packing-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  border: 1px solid #d9e0db;
}

.packing-total-cell {
  padding: 8px 9px;
  border-right: 1px solid #d9e0db;
  text-align: right;
}

.packing-total-cell:last-child {
  border-right: 0;
}

.packing-total-cell span {
  display: block;
  color: #77827c;
  font-size: 6.7px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.packing-total-cell strong {
  display: block;
  margin-top: 3px;
  color: #26342e;
  font-family: "Courier New", monospace;
  font-size: 10px;
}

.packing-total-cell:last-child strong {
  color: #183e35;
  font-size: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(16, 27, 23, .52);
  backdrop-filter: blur(3px);
  animation: fade-in .15s ease both;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  display: flex;
  width: min(700px, 100%);
  max-height: calc(100vh - 44px);
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(8, 18, 14, .28);
  overflow: hidden;
  animation: modal-in .18s ease both;
}

.modal.wide {
  width: min(930px, 100%);
}

.modal.crm-wide {
  width: min(1180px, 100%);
  max-height: calc(100vh - 30px);
}

.modal.crm-wide .modal-body {
  padding: 0;
  background: #f6f7f3;
}

.modal.narrow {
  width: min(520px, 100%);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 21px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -.02em;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.modal-body {
  padding: 21px;
  overflow-y: auto;
}

.rich-image-viewer {
  display: grid;
  gap: 10px;
}

.rich-image-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid #dce4de;
  border-radius: 6px;
  background: #f7faf8;
}

.rich-image-toolbar > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rich-image-toolbar span {
  min-width: 42px;
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 10px;
  text-align: center;
}

.rich-image-canvas {
  max-height: calc(100vh - 210px);
  padding: 12px;
  border: 1px solid #d8dfda;
  border-radius: 6px;
  background:
    linear-gradient(45deg, #eef1ee 25%, transparent 25%),
    linear-gradient(-45deg, #eef1ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1ee 75%),
    linear-gradient(-45deg, transparent 75%, #eef1ee 75%),
    #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  overflow: auto;
}

.rich-image-canvas img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0 auto;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 8px rgba(24, 45, 35, .12);
  cursor: zoom-in;
  transition: width .14s ease;
}

.draft-restored-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 8px 10px;
  border: 1px solid #ead49a;
  border-radius: 6px;
  color: #725d28;
  background: #fff9e8;
  font-size: 10px;
}

.draft-restored-note > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.draft-restored-note > span {
  flex: 1;
}

.draft-restored-note > button {
  padding: 0;
  border: 0;
  color: #a34c2b;
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.page-draft-note {
  margin-bottom: 14px;
}

.draft-recovery-summary {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.draft-recovery-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 13px;
  background: #fff;
}

.draft-recovery-summary span {
  color: var(--ink-faint);
  font-size: 10px;
}

.draft-recovery-summary strong {
  color: var(--ink);
  font-size: 11px;
  text-align: right;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 21px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

.modal-footer .left-action {
  margin-right: auto;
}

.crm-detail-shell {
  min-height: 620px;
}

.crm-company-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 25px 18px;
  border-bottom: 1px solid #dce2dd;
  background: #fff;
}

.crm-company-identity {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 14px;
}

.crm-company-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--pine);
  font-family: Georgia, serif;
  font-size: 23px;
  font-weight: 700;
}

.crm-company-identity > div {
  min-width: 0;
}

.crm-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.crm-title-line h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -.02em;
}

.crm-status-dot {
  display: inline-flex;
  height: 20px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-radius: 10px;
  color: #2e6b4f;
  background: #e8f4ec;
  font-size: 8px;
}

.crm-status-dot::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a9b70;
  content: "";
}

.crm-pipeline-flag {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 10px;
  font-family: "Consolas", monospace;
  font-size: 8.5px;
  font-weight: 700;
}

.crm-pipeline-flag.is-lead {
  border: 1px solid #ead79a;
  color: #806018;
  background: #fff8dc;
}

.crm-pipeline-flag.is-opportunity {
  border: 1px solid #bfdce5;
  color: #256477;
  background: #edf7fa;
}

.crm-pipeline-flag svg {
  width: 11px;
  height: 11px;
}

.crm-company-identity p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.crm-address-line {
  display: block;
  overflow: hidden;
  max-width: 760px;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.crm-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #dce2dd;
  background: #fbfcfa;
}

.crm-metric-strip > div {
  min-height: 71px;
  padding: 12px 15px;
  border-right: 1px solid #e3e8e3;
}

.crm-metric-strip > div:last-child {
  border-right: 0;
}

.crm-metric-strip span {
  display: block;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .04em;
}

.crm-metric-strip strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
}

.crm-metric-strip small {
  display: block;
  margin-top: 4px;
  color: #9ca69f;
  font-size: 7px;
  text-transform: uppercase;
}

.crm-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0 25px;
  border-bottom: 1px solid #dce2dd;
  background: #fff;
}

.crm-tabs button {
  position: relative;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  color: var(--ink-faint);
  background: transparent;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.crm-tabs button:hover {
  color: var(--ink);
}

.crm-tabs button.active {
  color: var(--pine);
}

.crm-tabs button.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  background: var(--accent);
  content: "";
}

.crm-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 262px;
  align-items: start;
}

.crm-main-column {
  min-width: 0;
  min-height: 470px;
  padding: 21px 25px 28px;
}

.crm-side-column {
  min-height: 470px;
  padding: 18px;
  border-left: 1px solid #dce2dd;
  background: #f1f4ef;
}

.crm-content-section {
  animation: section-in .16s ease both;
}

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

.crm-section-head h3 {
  margin: 0;
  font-size: 14px;
}

.crm-section-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.5;
}

.crm-record-grid,
.crm-address-list,
.crm-record-table {
  display: grid;
  gap: 8px;
}

.crm-contact-item,
.crm-address-item,
.crm-business-record {
  display: grid;
  align-items: center;
  gap: 11px;
  padding: 12px 13px;
  border: 1px solid #dfe5e0;
  border-radius: 7px;
  background: #fff;
}

.crm-contact-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.crm-contact-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: var(--pine);
  background: #e8f2ec;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 700;
}

.crm-contact-main {
  min-width: 0;
}

.crm-contact-main > strong {
  display: block;
  font-size: 10.5px;
}

.crm-contact-main > span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.crm-contact-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.crm-contact-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #607068;
  font-size: 8.5px;
}

.crm-contact-meta svg {
  width: 11px;
  height: 11px;
}

.crm-contact-main p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.5;
}

.crm-row-actions {
  display: flex;
  gap: 1px;
}

.crm-stage-action {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid #cbdad2;
  border-radius: 4px;
  color: #285d4a;
  background: #edf5f0;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.crm-stage-action:hover {
  border-color: #8fb1a1;
  background: #e3f0e8;
}

.crm-conversion-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid #d4e3da;
  border-radius: 7px;
  color: #5d7066;
  background: #f3f8f5;
}

.crm-conversion-notice > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #5d8976;
}

.crm-conversion-notice strong {
  display: block;
  color: #2e5646;
  font-size: 10.5px;
}

.crm-conversion-notice span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.55;
}

.crm-order-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  align-items: end;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
}

.crm-order-builder .secondary-button {
  min-height: 39px;
}

.crm-order-items {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  border: 1px solid #dfe5e0;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.crm-order-item-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 26px;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf0ec;
}

.crm-order-item-row:last-child {
  border-bottom: 0;
}

.crm-order-item-row .product-thumb {
  width: 36px;
  height: 36px;
}

.crm-order-item-row > div {
  min-width: 0;
}

.crm-order-item-row strong {
  display: block;
  font-size: 9.5px;
}

.crm-order-item-row div span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-order-item-row > strong {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 9px;
}

.crm-order-fields {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.crm-payment-history {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #dce4de;
  border-radius: 7px;
  background: #f8faf7;
}

.crm-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 10px;
  border: 1px solid #dfe5e0;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}

.crm-payment-summary > div {
  padding: 9px 10px;
  border-right: 1px solid #e3e8e4;
}

.crm-payment-summary > div:last-child {
  border-right: 0;
}

.crm-payment-summary span {
  display: block;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-payment-summary strong {
  display: block;
  margin-top: 4px;
  font-family: "Consolas", monospace;
  font-size: 10px;
}

.crm-payment-list {
  display: grid;
  gap: 1px;
  background: #e0e6e1;
  border-radius: 5px;
  overflow: hidden;
}

.crm-payment-list > div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 38px;
  align-items: center;
  padding: 7px 9px;
  background: #fff;
}

.crm-payment-list span,
.crm-payment-list small {
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-payment-list strong {
  font-size: 9px;
}

.crm-address-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: flex-start;
}

.crm-address-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: #5a7e70;
  background: #edf4ef;
}

.crm-address-icon svg {
  width: 16px;
  height: 16px;
}

.crm-address-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.crm-address-title strong {
  font-size: 10.5px;
}

.crm-address-item p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.crm-address-item > div > span {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.crm-pipeline-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 11px;
  border: 1px solid #dfe5e0;
  border-radius: 7px;
  overflow: hidden;
}

.crm-pipeline-strip > div {
  padding: 9px 11px;
  border-right: 1px solid #e3e8e4;
  background: #fbfcfa;
}

.crm-pipeline-strip > div:last-child {
  border-right: 0;
}

.crm-pipeline-strip span {
  display: block;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-pipeline-strip strong {
  display: block;
  margin-top: 3px;
  font-family: Georgia, serif;
  font-size: 17px;
}

.crm-business-record {
  grid-template-columns: auto minmax(0, 1fr) 100px auto;
}

.crm-business-record.is-voided {
  opacity: .55;
}

.crm-business-main {
  min-width: 0;
}

.crm-business-main > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.crm-business-main strong {
  font-size: 10.5px;
}

.crm-business-main > span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-record-status {
  padding: 2px 6px;
  border-radius: 8px;
  color: #607068;
  background: #eef2ee;
  font-size: 7.5px;
}

.crm-business-main > .crm-latest-followup {
  overflow: visible;
  color: #416a58;
  font-size: 9px;
  text-overflow: clip;
  white-space: normal;
}

.crm-followup-panel {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 2px;
  padding-top: 13px;
  border-top: 1px solid #e3e8e4;
}

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

.crm-followup-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.crm-followup-heading > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #d5e1da;
  border-radius: 6px;
  color: #567d6b;
  background: #f2f7f4;
}

.crm-followup-heading svg {
  width: 14px;
  height: 14px;
}

.crm-followup-heading strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.crm-followup-heading small {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.crm-followup-add {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border: 1px solid #b9d0c3;
  border-radius: 5px;
  color: #315f4c;
  background: #eef6f1;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.crm-followup-add:hover {
  border-color: #8eb19f;
  background: #e4f1e9;
}

.crm-followup-add svg {
  width: 12px;
  height: 12px;
}

.crm-followup-timeline {
  display: grid;
  gap: 9px;
}

.crm-followup-entry {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.crm-followup-stamp {
  padding-top: 9px;
  text-align: right;
}

.crm-followup-stamp strong {
  display: block;
  color: #53655b;
  font-family: "Consolas", monospace;
  font-size: 9px;
}

.crm-followup-stamp span {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-followup-card {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dfe6e1;
  border-radius: 6px;
  background: #fbfcfa;
}

.crm-followup-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.crm-followup-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: #315b49;
  background: #e5f0e9;
  font-size: 10px;
  font-weight: 700;
}

.crm-followup-entry-head > div:not(.crm-followup-actions) {
  min-width: 0;
  flex: 1;
}

.crm-followup-entry-head strong {
  display: block;
  color: var(--ink);
  font-size: 10px;
}

.crm-followup-entry-head span:not(.crm-followup-avatar) {
  display: block;
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-followup-highlight {
  color: #c76524;
  font-style: normal;
  font-weight: 700;
}

.crm-followup-method {
  padding: 1px 4px;
  border-radius: 3px;
  background: #fff1e6;
}

.crm-followup-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 1px;
}

.crm-followup-content {
  margin-top: 8px;
  color: #52645a;
  font-size: 9.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.crm-followup-content > :first-child {
  margin-top: 0;
}

.crm-followup-content > :last-child {
  margin-bottom: 0;
}

.crm-followup-content img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 8px 0;
  border: 1px solid #d8e1db;
  border-radius: 5px;
  background: #fff;
  cursor: zoom-in;
}

.crm-followup-content img:hover,
.crm-record-rich-preview img:hover,
.crm-followup-content img:focus-visible,
.crm-record-rich-preview img:focus-visible {
  outline: 2px solid #6f9984;
  outline-offset: 2px;
}

.crm-followup-content table {
  width: 100%;
  border-collapse: collapse;
}

.crm-followup-content th,
.crm-followup-content td {
  padding: 5px 7px;
  border: 1px solid #dce4de;
}

.crm-followup-no-copy {
  margin: 8px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  font-style: italic;
}

.crm-followup-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px dashed #d4ddd7;
  border-radius: 6px;
  color: var(--ink-faint);
  background: #fbfcfa;
  font-size: 8.5px;
  line-height: 1.55;
}

.crm-followup-empty svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #7b9487;
}

.crm-followup-modal-intro {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid #d4e3da;
  border-radius: 7px;
  color: #5d7066;
  background: #f3f8f5;
}

.crm-followup-modal-intro svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #5d8976;
}

.crm-followup-modal-intro strong {
  display: block;
  color: #2e5646;
  font-size: 10.5px;
}

.crm-followup-modal-intro span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.55;
}

.crm-record-amount {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 9.5px;
  text-align: right;
}

.record-type-badge.type-lead {
  color: #7a6327;
  background: #f8f1dc;
}

.record-type-badge.type-opportunity {
  color: #256477;
  background: #e8f3f6;
}

.record-type-badge.type-order {
  color: #8b4b2d;
  background: #fbece5;
}

.record-type-badge.type-payment {
  color: #2d694e;
  background: #e8f4ec;
}

.crm-empty-state {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px dashed #cfd8d1;
  border-radius: 7px;
  color: var(--ink-faint);
  background: #fbfcfa;
  text-align: center;
}

.crm-empty-state svg {
  width: 22px;
  height: 22px;
  margin-bottom: 9px;
}

.crm-empty-state strong {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.crm-empty-state span {
  margin-top: 4px;
  font-size: 9px;
}

.crm-overview-note {
  margin-bottom: 15px;
  padding: 10px 12px;
  border-left: 2px solid #cdb46f;
  color: #6d6348;
  background: #fbf8ee;
}

.crm-overview-note strong {
  display: block;
  font-size: 9px;
}

.crm-overview-note p {
  margin: 4px 0 0;
  font-size: 9px;
  line-height: 1.6;
}

.crm-overview-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.crm-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.crm-block-title h4 {
  margin: 0;
  font-size: 10.5px;
}

.crm-block-title .text-button {
  font-size: 8.5px;
}

.crm-overview-list {
  border: 1px solid #dfe5e0;
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.crm-overview-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 51px;
  padding: 8px 10px;
  border-bottom: 1px solid #edf0ec;
}

.crm-overview-item:last-child {
  border-bottom: 0;
}

.crm-overview-item strong {
  display: block;
  font-size: 9.5px;
}

.crm-overview-item span:not(.record-type-badge) {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-overview-item em {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-style: normal;
}

.crm-overview-log {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #edf0ec;
}

.crm-overview-log:last-child {
  border-bottom: 0;
}

.crm-overview-log > span {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #7e9b8d;
}

.crm-overview-log strong {
  display: block;
  font-size: 9px;
  line-height: 1.45;
}

.crm-overview-log small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.crm-overview-empty {
  padding: 21px 12px;
  color: var(--ink-faint);
  font-size: 9px;
  text-align: center;
}

.crm-business-summary {
  display: grid;
  gap: 7px;
}

.crm-summary-stage,
.crm-summary-followup,
.crm-summary-contact,
.crm-summary-metrics > div {
  border: 1px solid #dfe6e1;
  border-radius: 7px;
  background: #fff;
}

.crm-summary-stage {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  background: #f7faf7;
}

.crm-summary-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #315f4a;
}

.crm-summary-stage > div {
  min-width: 0;
}

.crm-summary-stage span:not(.crm-summary-icon),
.crm-summary-metrics span,
.crm-summary-followup span,
.crm-summary-contact span {
  display: block;
  color: #718178;
  font-size: 9px;
  font-weight: 700;
}

.crm-summary-stage strong,
.crm-summary-metrics strong,
.crm-summary-followup strong,
.crm-summary-contact strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.crm-summary-stage small,
.crm-summary-metrics small,
.crm-summary-followup small,
.crm-summary-contact small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.crm-summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.crm-summary-metrics > div {
  padding: 9px 10px;
  background: #fcfdfb;
}

.crm-summary-metrics strong {
  color: #285a45;
  font-family: "Consolas", monospace;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.crm-summary-metrics > div:last-child strong {
  color: #a0513c;
}

.crm-summary-followup,
.crm-summary-contact {
  padding: 9px 10px;
  border-left-width: 3px;
}

.crm-summary-followup.is-healthy {
  border-left-color: #4f8069;
  background: #f8fbf8;
}

.crm-summary-followup.is-warning {
  border-left-color: #c9872e;
  background: #fffaf0;
}

.crm-summary-followup.is-danger {
  border-left-color: #bb5942;
  background: #fff7f4;
}

.crm-summary-followup.is-muted {
  border-left-color: #9aa8a0;
  background: #fafbfa;
}

.crm-summary-contact {
  border-left-color: #6c8da2;
}

.rich-editor-field {
  min-width: 0;
}

.rich-editor-shell {
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.rich-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 34px;
  padding: 3px 6px;
  border-bottom: 1px solid #e3e8e3;
  background: #f8faf7;
}

.rich-editor-toolbar button {
  display: inline-flex;
  min-width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.rich-editor-toolbar button:hover {
  color: var(--ink);
  background: #e9eeea;
}

.rich-editor-toolbar > span {
  flex: 1;
}

.rich-editor-toolbar svg {
  width: 12px;
  height: 12px;
}

.rich-editor {
  min-height: 150px;
  max-height: 310px;
  padding: 12px;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.7;
  overflow-y: auto;
  outline: 0;
}

.rich-editor:empty::before {
  color: #9da7a1;
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  margin: 8px 0;
  border-radius: 5px;
  object-fit: contain;
}

.rich-editor ul,
.rich-editor ol {
  padding-left: 20px;
}

.rich-editor blockquote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 2px solid #cfb46a;
  color: #6b6046;
}

.rich-editor table {
  width: 100%;
  border-collapse: collapse;
}

.rich-editor th,
.rich-editor td {
  padding: 4px 6px;
  border: 1px solid #dfe5e0;
  font-size: 9.5px;
}

.rich-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.rich-attachment-chip {
  display: inline-flex;
  max-width: 100%;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 3px 5px 3px 7px;
  border: 1px solid #d6dfd9;
  border-radius: 5px;
  color: #52655b;
  background: #f7faf7;
  font-size: 8.5px;
}

.rich-attachment-chip > span {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rich-attachment-chip small {
  color: var(--ink-faint);
  font-size: 7.5px;
}

.rich-attachment-chip button {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 3px;
  color: var(--ink-faint);
  background: transparent;
  cursor: pointer;
}

.rich-attachment-chip button:hover {
  color: var(--danger);
  background: #f5e9e7;
}

.crm-record-rich-preview {
  max-height: 520px;
  margin-top: 7px;
  padding: 9px 10px;
  border-left: 2px solid #d8c17f;
  color: #59675f;
  background: #fbf9f2;
  font-size: 10.5px;
  line-height: 1.7;
  overflow: auto;
}

.crm-business-record > .crm-record-rich-preview,
.crm-business-record > .crm-record-attachments,
.crm-business-record > .crm-record-documents {
  grid-column: 1 / -1;
  width: 100%;
}

.crm-business-record > .crm-record-rich-preview {
  margin-top: 1px;
}

.crm-record-rich-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 7px 0;
  border: 1px solid #dfe5e0;
  border-radius: 5px;
  background: #fff;
  cursor: zoom-in;
}

.crm-record-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.crm-record-attachments a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border: 1px solid #d7dfd9;
  border-radius: 4px;
  color: #536a5e;
  background: #fff;
  font-size: 8px;
  text-decoration: none;
}

.crm-record-attachments a:hover {
  border-color: #aec1b5;
}

.crm-record-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed #e1e6e2;
}

.crm-record-documents button {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid #d5dfd8;
  border-radius: 4px;
  color: #4d685c;
  background: #f8fbf8;
  font-size: 8px;
  cursor: pointer;
}

.crm-record-documents button:hover {
  color: var(--pine);
  border-color: #9fb8aa;
  background: #edf5f0;
}

.crm-record-documents svg {
  width: 13px;
  height: 13px;
}

.crm-full-timeline {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 7px;
}

.crm-timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 17px;
}

.crm-timeline-row:not(:last-child)::before {
  position: absolute;
  top: 25px;
  bottom: 0;
  left: 13px;
  width: 1px;
  background: #d7dfd9;
  content: "";
}

.crm-timeline-dot {
  z-index: 1;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #d2ddd5;
  border-radius: 50%;
  color: #5f8273;
  background: #f8fbf8;
}

.crm-timeline-dot svg {
  width: 12px;
  height: 12px;
}

.crm-timeline-row strong {
  display: block;
  padding-top: 2px;
  font-size: 10px;
}

.crm-timeline-row span:not(.crm-timeline-dot) {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-side-section {
  padding: 0 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #d9e0da;
}

.crm-side-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.crm-side-section h4 {
  margin: 0 0 10px;
  color: #66736c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.crm-side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.crm-side-heading .text-button {
  margin-bottom: 10px;
  font-size: 8px;
}

.crm-owner-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.crm-owner-row > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #547a6b;
  font-size: 11px;
  font-weight: 700;
}

.crm-owner-row strong {
  display: block;
  overflow: hidden;
  max-width: 180px;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-owner-row small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-facts {
  display: grid;
  gap: 9px;
  margin: 0;
}

.crm-facts > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
}

.crm-facts dt {
  color: var(--ink-faint);
  font-size: 8px;
}

.crm-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 8.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.crm-facts a {
  color: var(--blue);
  text-decoration: none;
}

.crm-mini-timeline {
  display: grid;
  gap: 10px;
}

.crm-mini-timeline-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.crm-mini-timeline-row > span {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #789789;
}

.crm-mini-timeline-row strong {
  display: block;
  font-size: 8.5px;
  line-height: 1.45;
}

.crm-mini-timeline-row small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7.5px;
}

.crm-side-empty {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.crm-quick-actions {
  display: grid;
  gap: 6px;
}

.crm-quick-actions h4 {
  margin-bottom: 3px;
}

.crm-quick-actions button {
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid #d3ddd6;
  border-radius: 5px;
  color: #4e6258;
  background: #fff;
  font-size: 8.5px;
  text-align: left;
  cursor: pointer;
}

.crm-quick-actions button:hover {
  border-color: #9eb4a8;
  color: var(--pine);
}

.crm-quick-actions svg {
  width: 13px;
  height: 13px;
}

.crm-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.crm-footer-note svg {
  width: 13px;
  height: 13px;
}

/* Customer workspace page */
.customer-detail-page {
  max-width: 1500px;
}

.customer-page-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 17px;
}

.customer-page-toolbar > div {
  min-width: 0;
}

.customer-page-toolbar h1 {
  overflow: hidden;
  margin: 2px 0 0;
  font-family: Georgia, "Noto Serif SC", "Times New Roman", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-page-toolbar p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.customer-page-kicker {
  color: #a37f30;
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
}

.customer-page-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f7f3;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.customer-page-shell .crm-detail-shell {
  min-height: 0;
}

.customer-page-shell .crm-company-header {
  padding: 26px 29px 22px;
}

.customer-page-shell .crm-company-mark {
  width: 58px;
  height: 58px;
  font-size: 25px;
}

.customer-page-shell .crm-title-line h3 {
  font-size: 23px;
}

.customer-page-shell .crm-status-dot {
  height: 23px;
  padding: 0 9px;
  font-size: 9.5px;
}

.customer-page-shell .crm-company-identity p {
  margin-top: 9px;
  font-size: 12px;
}

.customer-page-shell .crm-address-line {
  margin-top: 6px;
  font-size: 11px;
  white-space: normal;
}

.customer-page-shell .crm-header-actions button {
  min-height: 38px;
  font-size: 11px;
}

.customer-page-shell .crm-metric-strip > div {
  min-height: 84px;
  padding: 15px 18px;
}

.customer-page-shell .crm-metric-strip span {
  font-size: 9.5px;
}

.customer-page-shell .crm-metric-strip strong {
  margin-top: 7px;
  font-size: 24px;
}

.customer-page-shell .crm-metric-strip small {
  margin-top: 5px;
  font-size: 8px;
}

.customer-page-shell .crm-tabs {
  padding: 0 29px;
}

.customer-page-shell .crm-tabs button {
  min-height: 49px;
  padding: 0 16px;
  font-size: 11.5px;
}

.customer-page-shell .crm-workspace {
  grid-template-columns: minmax(0, 1fr) 308px;
}

.customer-page-shell .crm-main-column {
  min-height: 560px;
  padding: 26px 29px 34px;
}

.customer-page-shell .crm-side-column {
  min-height: 560px;
  padding: 22px;
}

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

.customer-page-shell .crm-section-head p {
  font-size: 11px;
}

.customer-page-shell .crm-section-head button {
  min-height: 36px;
  font-size: 11px;
}

.customer-page-shell .crm-contact-item {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 15px;
}

.customer-page-shell .crm-contact-avatar {
  width: 44px;
  height: 44px;
  font-size: 17px;
}

.customer-page-shell .crm-contact-main > strong {
  font-size: 13px;
}

.customer-page-shell .crm-contact-main > span,
.customer-page-shell .crm-contact-meta span,
.customer-page-shell .crm-contact-main p {
  font-size: 10.5px;
}

.customer-page-shell .crm-address-item {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 13px;
  padding: 15px;
}

.customer-page-shell .crm-address-icon {
  width: 40px;
  height: 40px;
}

.customer-page-shell .crm-address-title strong {
  font-size: 13px;
}

.customer-page-shell .crm-address-item p,
.customer-page-shell .crm-address-item > div > span {
  font-size: 10.5px;
}

.customer-page-shell .record-type-badge {
  min-width: 50px;
  height: 25px;
  font-size: 10px;
}

.customer-page-shell .crm-business-record {
  grid-template-columns: auto minmax(0, 1fr) 120px auto;
  gap: 13px;
  padding: 15px;
}

.customer-page-shell .crm-business-main strong {
  font-size: 13px;
}

.customer-page-shell .crm-business-main > span {
  margin-top: 6px;
  font-size: 10.5px;
}

.customer-page-shell .crm-record-status {
  padding: 3px 7px;
  font-size: 9px;
}

.customer-page-shell .crm-record-amount {
  font-size: 11px;
}

.customer-page-shell .crm-record-rich-preview {
  max-height: 560px;
  padding: 11px 12px;
  font-size: 11.5px;
  line-height: 1.7;
}

.customer-page-shell .crm-followup-heading strong {
  font-size: 12.5px;
}

.customer-page-shell .crm-followup-heading small,
.customer-page-shell .crm-followup-entry-head span:not(.crm-followup-avatar),
.customer-page-shell .crm-followup-stamp span {
  font-size: 9.5px;
}

.customer-page-shell .crm-followup-add,
.customer-page-shell .crm-followup-stamp strong,
.customer-page-shell .crm-followup-entry-head strong {
  font-size: 10.5px;
}

.customer-page-shell .crm-followup-content {
  font-size: 11px;
}

.customer-page-shell .crm-followup-empty {
  font-size: 10px;
}

.customer-page-shell .crm-record-documents button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 9.5px;
}

.customer-page-shell .crm-stage-action {
  min-height: 29px;
  padding: 0 9px;
  font-size: 9.5px;
}

.customer-page-shell .crm-overview-note strong,
.customer-page-shell .crm-block-title h4 {
  font-size: 12px;
}

.customer-page-shell .crm-overview-note p,
.customer-page-shell .crm-overview-item strong,
.customer-page-shell .crm-overview-log strong {
  font-size: 11px;
}

.customer-page-shell .crm-overview-item span:not(.record-type-badge),
.customer-page-shell .crm-overview-log small,
.customer-page-shell .crm-overview-item em {
  font-size: 9.5px;
}

.customer-page-shell .crm-timeline-row strong {
  font-size: 11.5px;
}

.customer-page-shell .crm-timeline-row span:not(.crm-timeline-dot) {
  font-size: 9.5px;
}

.customer-page-shell .crm-side-section h4 {
  font-size: 9.5px;
}

.customer-page-shell .crm-owner-row strong,
.customer-page-shell .crm-facts dd,
.customer-page-shell .crm-mini-timeline-row strong {
  font-size: 10.5px;
}

.customer-page-shell .crm-owner-row small,
.customer-page-shell .crm-facts dt,
.customer-page-shell .crm-mini-timeline-row small {
  font-size: 9px;
}

.customer-page-shell .crm-quick-actions button {
  min-height: 35px;
  font-size: 10px;
}

.customer-page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  color: var(--ink-faint);
  font-size: 9px;
}

.customer-page-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.customer-page-footer svg {
  width: 13px;
  height: 13px;
}

.modal-close {
  width: 31px;
  height: 31px;
}

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

.modal-form-grid .span-2 {
  grid-column: span 2;
}

.tier-pricing-box {
  padding: 13px;
  border: 1px solid #dbe4dd;
  border-radius: 8px;
  background: #f7f9f6;
}

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

.tier-pricing-head strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.tier-pricing-head span:not(.tier-fixed-currency) {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.45;
}

.tier-fixed-currency {
  display: inline-flex;
  height: 20px;
  align-items: center;
  padding: 0 6px;
  border: 1px solid #cddbd3;
  border-radius: 3px;
  color: #3b6756;
  background: #e9f2ed;
  font-family: "Consolas", monospace;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .06em;
}

.tier-price-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tier-price-grid .field > label {
  font-size: 9px;
}

.tier-price-grid .field input {
  height: 34px;
  font-family: "Consolas", monospace;
  font-size: 10.5px;
}

.image-dropzone {
  position: relative;
  display: flex;
  min-height: 135px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #b9c7be;
  border-radius: 8px;
  color: var(--ink-faint);
  background: #f9fbf8;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.image-dropzone:hover,
.image-dropzone.dragover {
  border-color: #779b8e;
  background: #f2f7f3;
}

.image-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-dropzone-content {
  padding: 18px;
}

.image-dropzone-content svg {
  width: 24px;
  height: 24px;
  margin: 0 auto 8px;
  color: #8fa198;
}

.image-dropzone-content strong {
  display: block;
  color: var(--ink-soft);
  font-size: 11px;
}

.image-dropzone-content span {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
}

.image-dropzone-preview {
  width: 100%;
  height: 135px;
  object-fit: contain;
  background: #f4f6f2;
}

.image-dropzone.has-image {
  border-style: solid;
}

.remove-image {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  color: var(--danger);
  background: #fff;
  border-color: #efd0cc;
}

.picker-search {
  margin-bottom: 13px;
}

.product-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 430px;
  overflow-y: auto;
}

.product-picker-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 67px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.product-picker-item:hover {
  border-color: #a8b9b0;
  background: #fbfcfa;
}

.product-picker-item .product-thumb {
  width: 42px;
  height: 42px;
}

.product-picker-item strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-picker-item span {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-picker-item .picker-price {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 9.5px;
}

.generated-set-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 15px;
  padding: 14px;
  border: 1px solid #cfe2d5;
  border-radius: 7px;
  background: #f2f8f3;
}

.generated-set-mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #2d7451;
  background: #dcefe2;
}

.generated-set-mark svg {
  width: 18px;
  height: 18px;
}

.generated-set-summary strong {
  display: block;
  color: #244a3b;
  font-size: 12px;
}

.generated-set-summary p {
  margin: 5px 0 0;
  color: #60746b;
  font-size: 10px;
  line-height: 1.65;
}

.generated-doc-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.generated-doc-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 59px;
  padding: 9px 13px;
  border: 0;
  border-bottom: 1px solid #e8ece7;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.generated-doc-row:last-child {
  border-bottom: 0;
}

.generated-doc-row:hover {
  background: #fbfcfa;
}

.generated-doc-row > svg {
  width: 14px;
  height: 14px;
  color: #a7b1ab;
}

.generated-doc-copy {
  min-width: 0;
}

.generated-doc-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generated-doc-copy em {
  margin-left: 5px;
  color: var(--ink-faint);
  font-family: "Consolas", monospace;
  font-size: 7.5px;
  font-style: normal;
  letter-spacing: .04em;
}

.generated-doc-copy small {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
}

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

.standard-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
}

.standard-card span {
  color: var(--accent);
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
}

.standard-card strong {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
}

.standard-card p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: grid;
  width: min(360px, calc(100vw - 48px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  color: #fff;
  background: #1d312a;
  box-shadow: 0 12px 35px rgba(13, 27, 21, .22);
  font-size: 11.5px;
  line-height: 1.45;
  animation: toast-in .22s ease both;
}

.toast.error {
  background: #7c302c;
}

.toast svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.toast.leaving {
  animation: toast-out .2s ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(6px); }
}

.print-surface {
  display: none;
}

/* Readability and information hierarchy */
button,
input,
select,
textarea {
  letter-spacing: 0;
}

input::placeholder,
textarea::placeholder {
  color: #74827a;
  opacity: 1;
}

.brand strong {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 720;
  letter-spacing: 0;
}

.brand span {
  color: #bfd0c7;
  font-size: 11.5px;
  letter-spacing: .04em;
}

.nav-count {
  color: #e0ebe5;
  font-size: 11.5px;
}

.guide-kicker {
  color: #efca76;
  font-size: 10.5px;
}

.sidebar-guide p {
  color: #c0d1c8;
  font-size: 12px;
}

.sidebar-user strong {
  color: #f0f6f2;
  font-size: 11.5px;
}

.sidebar-user span:last-child {
  color: #aac0b6;
  font-size: 10.5px;
}

.breadcrumb,
.topbar-link {
  font-size: 12.5px;
}

.readonly-chip {
  font-size: 12px;
  font-weight: 650;
}

.readonly-banner strong {
  font-size: 13px;
}

.readonly-banner span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.readonly-mini {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.toolbar-count,
#doc-search-result-count,
#product-search-count,
.customer-search-count {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  font-size: 13px;
  font-weight: 650;
}

.primary-button.compact,
.secondary-button.compact,
.ghost-button.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

.compact-text-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.text-button {
  font-size: 12.5px;
  font-weight: 650;
}

.section-heading h2 {
  font-size: 17px;
  letter-spacing: 0;
}

.section-heading p {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}

.panel-head h3 {
  font-size: 14.5px;
}

.panel-head .text-button {
  font-size: 12.5px;
}

.stat-card {
  border-color: #d2dbd5;
}

.stat-label {
  color: #35483f;
  font-size: 12.5px;
  font-weight: 650;
}

.stat-label svg {
  color: #386956;
}

.stat-value {
  color: var(--ink);
  font-family: var(--font);
  font-size: 34px;
  font-weight: 750;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.stat-value-date {
  margin-top: 17px !important;
  font-family: var(--font) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

.stat-note {
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.5;
}

.sales-stat-grid .stat-value.money {
  color: #234f40;
  font-size: 22px;
  font-weight: 750;
}

.sales-stat-card:nth-child(2) .stat-value.money {
  color: #8b6417;
}

.sales-stat-card:nth-child(4) .stat-value.money {
  color: #1f697f;
}

.sales-stat-button {
  display: block;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.sales-stat-button:hover {
  border-color: #9fb7aa;
  box-shadow: 0 7px 18px rgba(31, 67, 53, .09);
  transform: translateY(-1px);
}

.sales-stat-button:focus-visible {
  outline: 2px solid #c56c4c;
  outline-offset: 2px;
}

.sales-stat-jump {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #dbe4dd;
  border-radius: 50%;
  color: #5f786c;
  background: #f5f8f5;
}

.sales-stat-jump svg {
  width: 13px;
  height: 13px;
}

.sales-record-page {
  max-width: 1460px;
}

.sales-record-page-toolbar {
  align-items: center;
}

.sales-record-page-toolbar > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.sales-record-summary {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.sales-record-summary > span {
  display: grid;
  min-width: 126px;
  gap: 4px;
  padding: 9px 12px;
  border: 1px solid #d8e2db;
  border-radius: 7px;
  color: #5f7268;
  background: #f8faf7;
  font-size: 10.5px;
}

.sales-record-summary strong {
  color: #234f40;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.sales-record-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.sales-record-tabs button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  padding: 13px 15px;
  border: 1px solid #d8e1da;
  border-radius: 8px;
  color: #52675c;
  background: #fbfcfa;
  text-align: left;
  cursor: pointer;
}

.sales-record-tabs button > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
}

.sales-record-tabs button > span svg {
  width: 15px;
  height: 15px;
}

.sales-record-tabs button > strong {
  grid-row: span 2;
  align-self: center;
  color: #263f34;
  font-family: var(--font);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}

.sales-record-tabs button > small {
  color: #7c8e84;
  font-family: "Consolas", monospace;
  font-size: 10.5px;
}

.sales-record-tabs button:hover {
  border-color: #a9beb2;
  background: #f4f8f4;
}

.sales-record-tabs button.active {
  border-color: #739c86;
  color: #244d3c;
  background: #edf6f0;
  box-shadow: inset 0 3px 0 #4f8069;
}

.sales-record-tabs button.active > strong {
  color: #1f5a41;
}

.sales-record-toolbar {
  margin-bottom: 11px;
}

.sales-record-search-box {
  width: min(520px, 100%);
}

.sales-record-list {
  display: grid;
  gap: 8px;
}

.sales-record-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(260px, 1.55fr) minmax(150px, .78fr) minmax(145px, .72fr) minmax(190px, .95fr) 28px;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid #dbe3dc;
  border-left: 3px solid #d6b56a;
  border-radius: 8px;
  color: inherit;
  background: #fff;
  box-shadow: 0 1px 2px rgba(24, 52, 40, .03);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.sales-record-row.type-opportunity {
  border-left-color: #4f8ca1;
}

.business-update-row.type-order {
  border-left-color: #4f8069;
}

.business-update-row.type-payment {
  border-left-color: #8d6aa8;
}

.business-update-load-more {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.sales-record-row:hover {
  border-color: #9bb5a7;
  box-shadow: 0 5px 15px rgba(33, 70, 55, .08);
  transform: translateY(-1px);
}

.sales-record-row:focus-visible {
  outline: 2px solid #c56c4c;
  outline-offset: 2px;
}

.sales-record-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.sales-record-copy,
.sales-record-value,
.sales-record-party,
.sales-record-followup {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.sales-record-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-record-copy small,
.sales-record-value small,
.sales-record-party small,
.sales-record-followup small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-record-value strong {
  color: #76571b;
  font-family: "Consolas", monospace;
  font-size: 12.5px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.sales-record-row.type-opportunity .sales-record-value strong {
  color: #24677c;
}

.sales-record-party strong {
  color: #334a3f;
  font-size: 11.5px;
  font-weight: 700;
}

.sales-record-followup strong {
  color: #455a4f;
  font-size: 11px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.sales-record-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #6d8277;
  background: #f0f4f1;
}

.sales-record-arrow svg {
  width: 15px;
  height: 15px;
}

.sales-record-row:hover .sales-record-arrow {
  color: #fff;
  background: #4f8069;
}

.doc-type-card strong {
  font-size: 14.5px;
}

.doc-type-card span:last-child {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.doc-type-code {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.recent-main strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 680;
}

.recent-main span {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.recent-business-row .recent-main small {
  color: var(--ink-faint);
  font-size: 11px;
}

.recent-amount,
.recent-business-amount {
  color: #30463c;
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-pill,
.record-type-badge {
  min-height: 24px;
  font-size: 11px;
  font-weight: 700;
}

.quick-action-copy strong {
  font-size: 13px;
}

.quick-action-copy span {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.5;
}

.data-table th {
  color: #44564d;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

.data-table td {
  color: #3d4e46;
  font-size: 13px;
  line-height: 1.55;
}

.data-table td > strong,
.data-table td .product-name strong {
  font-size: 14px !important;
}

.data-table td > span,
.data-table td .mono,
.data-table td small {
  font-size: 12.5px !important;
}

.data-table td [style*="font-size"] {
  font-size: 12.5px !important;
}

.data-table .status-pill,
.data-table .type-badge {
  font-size: 11.5px !important;
}

.data-table .order-mini,
.data-table .demo-mini {
  color: #5d6c64;
  font-size: 10.5px !important;
}

.product-name span {
  color: var(--ink-soft);
  font-size: 12px !important;
  line-height: 1.5;
}

.product-model {
  display: block;
  color: var(--ink);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 13px;
  font-weight: 750;
}

.product-code {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.product-price-range {
  color: #175c46;
  font-size: 13px !important;
  font-weight: 750;
}

.product-tier-note {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 11px;
}

.product-detail-kicker {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.product-detail-toolbar > div:nth-child(2) strong {
  color: var(--ink);
  font-size: 13.5px;
}

.product-detail-intro h1 {
  color: var(--ink);
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: 0;
}

.product-detail-en {
  color: var(--ink-soft);
  font-size: 16px;
}

.product-detail-description {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.product-detail-highlight-grid span {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.product-detail-highlight-grid strong {
  color: #173f35;
  font-size: 17px;
  font-weight: 750;
}

.product-detail-section-head h2 {
  font-size: 17px;
}

.product-detail-section-head p {
  color: var(--ink-soft);
  font-size: 12px;
}

.product-detail-facts dt {
  color: var(--ink-faint);
  font-size: 11.5px;
}

.product-detail-facts dd {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.product-detail-facts > .product-internal-fact {
  grid-column: 1 / -1;
  margin: 8px 0;
  padding: 11px 12px;
  border: 1px solid #d5e2da;
  border-radius: 7px;
  background: #f3f8f5;
}

.product-internal-fact dt {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-internal-tag {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 0 6px;
  border-radius: 9px;
  color: #735719;
  background: #f5e7b9;
  font-size: 10px;
  font-weight: 700;
}

.product-internal-note {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #7b9f8d;
  color: var(--ink-soft);
  background: #f6f9f7;
  font-size: 11.5px;
  line-height: 1.6;
}

.product-tier-detail-list span {
  color: var(--ink-soft);
  font-size: 12px;
}

.product-tier-detail-list strong {
  color: #175c46;
  font-size: 14px;
}

.product-tier-detail-list small,
.product-detail-side-note p {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.document-number {
  color: var(--ink) !important;
  font-size: 12.5px !important;
  font-weight: 750;
}

.document-row.is-order-master td {
  height: 94px;
  border-bottom-color: #ead9b8;
  background: #fff8e8;
}

.document-row.is-order-master td:first-child {
  box-shadow: inset 4px 0 0 #b77920;
}

.data-table .document-row.is-order-master .document-number {
  display: block;
  color: #5e4115 !important;
  font-size: 16.5px !important;
  font-weight: 800 !important;
  letter-spacing: .015em;
  white-space: nowrap;
}

.data-table .document-row.is-order-master .document-buyer {
  font-size: 14.5px !important;
}

.data-table .document-row.is-order-master .document-amount {
  color: #744912 !important;
  font-size: 14px !important;
  font-weight: 780 !important;
}

.data-table .document-row.is-order-master .status-pill,
.data-table .document-row.is-order-master .type-badge {
  font-size: 11.5px !important;
}

.data-table .document-row.is-order-master .order-master-badge {
  display: flex;
  width: max-content;
  min-height: 25px;
  align-items: center;
  gap: 5px;
  margin: 6px 0 0;
  padding: 3px 8px;
  border: 1px solid #d9b978;
  border-radius: 5px;
  color: #6f4611 !important;
  background: #f2ddb2;
  font-size: 10.5px !important;
  font-weight: 800;
  white-space: nowrap;
}

.order-master-badge svg {
  width: 13px;
  height: 13px;
}

.data-table .document-row.is-order-master .order-master-note {
  display: block;
  margin-top: 6px;
  color: #956f34 !important;
  font-size: 10.5px !important;
  font-weight: 650;
}

.document-row.is-order-master:hover td {
  background: #fff2d5;
}

.document-number-cell {
  min-width: 168px;
}

.document-buyer-cell {
  min-width: 190px;
}

.document-order-reference {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 11px;
}

.document-owner {
  color: var(--ink-soft);
  font-size: 12px !important;
}

.document-buyer {
  display: block;
  overflow: hidden;
  max-width: 220px;
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-country {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft) !important;
  font-size: 11.5px !important;
}

.document-amount {
  color: #175c46 !important;
  font-size: 13px !important;
  font-weight: 750;
  white-space: nowrap;
}

.document-updated {
  color: var(--ink-soft);
  font-size: 12px !important;
}

.role-summary-card > span {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
}

.role-summary-card strong {
  color: var(--ink);
  font-family: var(--font);
  font-size: 27px;
  font-weight: 750;
}

.role-summary-card small {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.user-email {
  display: block;
  color: var(--ink) !important;
  font-size: 13px !important;
  font-weight: 700;
}

.user-name-cell strong {
  font-size: 13.5px;
}

.user-name-cell span {
  color: var(--ink-soft);
  font-size: 12px;
}

.user-name-edit,
.role-permission-copy {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

.role-select {
  min-height: 38px;
  font-size: 12.5px;
}

.customer-table th {
  color: #3e5248;
  font-size: 12px;
  font-weight: 750;
}

.customer-table td {
  font-size: 12px;
}

.customer-table-created strong {
  color: var(--ink);
  font-size: 12.5px;
}

.customer-table-created small,
.customer-table-number small {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.customer-table-company strong {
  color: var(--ink);
  font-size: 14px;
}

.customer-table-company small {
  color: var(--ink-soft);
  font-size: 11px;
}

.customer-table-copy span {
  color: #3e5147;
  font-size: 11.5px;
}

.customer-table-sales strong {
  color: var(--ink);
  font-size: 12px;
}

.customer-table-sales small {
  color: var(--ink-soft);
  font-size: 10px;
}

.customer-table-money em {
  font-size: 9.5px;
}

.customer-table-money strong {
  font-size: 13px;
}

.customer-table-stage-note {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.customer-card h2 {
  color: var(--ink);
  font-size: 16px;
}

.customer-card > p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.customer-owner {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.customer-value-badge {
  font-size: 10px;
}

.customer-value-line span {
  font-size: 11px;
}

.customer-value-line strong {
  font-size: 12px;
}

.customer-metrics span {
  color: #41564b;
  font-size: 10.5px;
}

.customer-card-foot {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.crm-company-identity p,
.crm-address-line {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.crm-title-line h3 {
  letter-spacing: 0;
}

.crm-pipeline-flag,
.crm-status-dot {
  font-size: 10.5px;
}

.crm-metric-strip span {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.crm-metric-strip strong {
  color: var(--ink);
  font-size: 24px;
}

.crm-metric-strip small {
  color: var(--ink-soft);
  font-size: 11px;
}

.crm-tabs button {
  font-size: 12.5px;
}

.crm-section-head h3,
.crm-block-title h4 {
  color: var(--ink);
  font-size: 15px;
}

.crm-section-head p,
.crm-overview-note p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.crm-contact-main > strong,
.crm-address-title strong,
.crm-business-main strong {
  color: var(--ink);
  font-size: 13px;
}

.crm-contact-main > span,
.crm-contact-meta span,
.crm-business-main > span,
.crm-address-item p,
.crm-address-item > div > span {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.55;
}

.crm-latest-followup,
.crm-record-status,
.crm-record-amount {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.crm-followup-heading strong {
  font-size: 13px;
}

.crm-followup-heading small,
.crm-followup-entry-head span:not(.crm-followup-avatar),
.crm-followup-content {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.crm-overview-item strong,
.crm-overview-log strong {
  font-size: 12.5px;
}

.crm-overview-item span:not(.record-type-badge),
.crm-overview-log small {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.form-section-head h2 {
  color: var(--ink);
  font-size: 18px;
}

.form-section-head p,
.field-hint,
.side-card p {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.field > label,
.field-label,
.line-mini-field label {
  color: #33473d;
  font-size: 12.5px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea,
.editor-fields .field input,
.editor-fields .field select,
.editor-fields .field textarea,
.line-mini-field input {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.field input,
.field select,
.editor-fields .field input,
.editor-fields .field select,
.line-mini-field input {
  min-height: 42px;
}

.side-card h3 {
  font-size: 15px;
}

.modal-header h2 {
  color: var(--ink);
  font-size: 23px;
  letter-spacing: 0;
}

.modal-header p {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

.modal-body {
  color: var(--ink-soft);
  font-size: 13px;
}

.editor-section-title {
  color: var(--ink);
  font-size: 15px;
}

.editor-title-row h1 {
  letter-spacing: 0;
}

.editor-title-meta,
.editor-total-row,
.preview-toolbar-left strong {
  font-size: 12.5px;
}

.auth-brand span {
  color: #bfd0c7;
  font-size: 11.5px;
}

.auth-kicker {
  font-size: 10.5px;
}

.auth-story > p {
  color: #c3d4cb;
  font-size: 13.5px;
  line-height: 1.8;
}

.auth-feature > span {
  font-size: 10px;
}

.auth-feature strong {
  color: #f3f7f4;
  font-size: 12.5px;
}

.auth-feature small {
  color: #b5c9bf;
  font-size: 11.5px;
  line-height: 1.55;
}

.auth-visual-foot,
.auth-copyright {
  color: #9bb2a7;
  font-size: 10px;
}

.auth-card-head,
.auth-form > label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
}

.auth-card h2 {
  font-family: var(--font);
  font-size: 32px;
  font-weight: 730;
  letter-spacing: 0;
}

.auth-subtitle {
  color: var(--ink-soft);
  font-size: 13.5px;
}

.auth-tabs button {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.auth-input-wrap input {
  font-size: 14px;
}

.auth-submit {
  font-size: 13px;
}

.auth-sent-to,
.auth-sent-to button,
.auth-code-meta,
.auth-code-meta button {
  font-size: 11.5px;
}

.auth-error,
.auth-security-note,
.auth-server-guide p {
  font-size: 11.5px;
}

.auth-server-guide strong {
  font-size: 12.5px;
}

.panel-head .text-button {
  white-space: nowrap;
}

.product-detail-eyebrow span,
.product-detail-eyebrow .product-detail-model {
  font-size: 11px;
}

.document-row td:nth-child(5),
.document-row td:nth-child(8) {
  white-space: nowrap;
}

.document-row .type-badge {
  white-space: nowrap;
}

.knowledge-page .stat-grid {
  margin-bottom: 22px;
}

.knowledge-filter-bar {
  align-items: flex-start;
}

.knowledge-search-box {
  width: min(500px, 100%);
}

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

.knowledge-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 17px;
  border: 1px solid #d7e0da;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(26, 59, 45, .04);
}

.knowledge-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-card-opening {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.knowledge-card-copy {
  min-width: 0;
  flex: 1;
}

.knowledge-card-manage-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 5px;
  margin-left: auto;
}

.knowledge-card-manage-actions .knowledge-delete {
  margin-left: 0;
}

.knowledge-type-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: #2b5d48;
  background: #eaf3ed;
}

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

.knowledge-category-badge,
.knowledge-format-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
}

.knowledge-category-badge {
  color: #355c4b;
  background: #edf4ef;
}

.knowledge-format-badge {
  margin-left: auto;
  color: #76551e;
  background: #f8efd9;
  font-family: "Consolas", monospace;
}

.knowledge-disabled-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  color: #8b3f2e;
  background: #fff0ea;
  font-size: 10px;
  font-weight: 750;
}

.knowledge-card.is-disabled {
  border-color: #d9dedb;
  background: #fafbf9;
}

.knowledge-card.is-disabled .knowledge-type-icon {
  color: #6c7a72;
  background: #edf0ed;
}

.knowledge-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.knowledge-card-copy > p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 43px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.knowledge-meta {
  display: grid;
  gap: 5px;
}

.knowledge-meta span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: #6e7d75;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-meta svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.knowledge-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 9px 10px;
  border: 1px solid #e4eae6;
  border-radius: 6px;
  color: #66766e;
  background: #f8faf7;
  font-size: 10.5px;
}

.knowledge-card-stats strong {
  color: #285a45;
  font-size: 12px;
}

.knowledge-card-actions {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 2px;
}

.knowledge-card-link-records {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid #e5ebe7;
}

.knowledge-card-link-records-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.knowledge-card-link-records-head strong {
  color: #334b40;
  font-size: 10.5px;
}

.knowledge-card-link-records-head span {
  color: #718178;
  font-size: 9px;
  font-weight: 700;
}

.knowledge-card-link-list {
  display: grid;
  gap: 5px;
}

.knowledge-card-link-row {
  display: grid;
  grid-template-columns: minmax(125px, 1.15fr) minmax(110px, .9fr) minmax(105px, .8fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #e3e9e5;
  border-radius: 6px;
  background: #fbfcfa;
}

.knowledge-card-link-row > div {
  min-width: 0;
}

.knowledge-card-link-access {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid #e8ece9;
}

.knowledge-card-link-url {
  min-width: 0;
}

.knowledge-card-link-url input {
  width: 100%;
  height: 29px;
  padding: 0 7px;
  border: 1px solid #d8e1db;
  border-radius: 5px;
  color: #445a4e;
  background: #fff;
  font-family: "Consolas", monospace;
  font-size: 8.5px;
}

.knowledge-card-link-legacy {
  display: block;
  padding: 7px 8px;
  border: 1px dashed #e0c5b5;
  border-radius: 5px;
  color: #9a5d43;
  background: #fff8f4;
  font-size: 8.5px;
}

.knowledge-card-link-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px 9px;
}

.knowledge-card-link-controls .text-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 8.5px;
}

.knowledge-link-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 9px;
  font-size: 8px;
  font-weight: 750;
}

.knowledge-link-status.is-active {
  color: #2e684d;
  background: #eaf4ed;
}

.knowledge-link-status.is-disabled {
  color: #994b37;
  background: #fff0ea;
}

.knowledge-card-link-row em {
  display: block;
  margin-bottom: 2px;
  color: #7c8b82;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
}

.knowledge-card-link-row span,
.knowledge-card-link-row small {
  display: block;
  overflow-wrap: anywhere;
  color: #53665b;
  font-size: 9px;
  line-height: 1.4;
}

.knowledge-card-link-customer strong {
  display: block;
  overflow-wrap: anywhere;
  color: #1d3b2e;
  font-size: 10px;
  line-height: 1.4;
}

.knowledge-card-link-customer small {
  margin-top: 2px;
  color: #7b8a82;
}

.knowledge-card-link-empty {
  padding: 9px 10px;
  border: 1px dashed #dce4df;
  border-radius: 6px;
  color: #7c8b82;
  background: #fbfcfa;
  font-size: 9.5px;
}

.knowledge-card-control {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 5px;
  border: 1px solid #d9e2dc;
  border-radius: 6px;
  color: #52675c;
  background: #f8faf7;
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.knowledge-card-control:hover {
  border-color: #aebfb3;
  color: #294f3e;
  background: #f1f7f2;
}

.knowledge-card-control:focus-visible {
  outline: 2px solid #2f7559;
  outline-offset: 2px;
}

.knowledge-card-control:disabled {
  cursor: wait;
  opacity: .62;
}

.knowledge-card-control-icon {
  display: grid;
  place-items: center;
}

.knowledge-delete {
  color: #a14a3c;
  background: #fffafa;
}

.knowledge-status-toggle {
  color: #5d6f65;
}

.knowledge-share-doc,
.knowledge-link-success,
.knowledge-followup-required {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 15px;
  padding: 12px 13px;
  border: 1px solid #dce5df;
  border-radius: 7px;
  background: #f7faf7;
}

.knowledge-share-doc > span,
.knowledge-link-success > span,
.knowledge-followup-required > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #315f4a;
}

.knowledge-share-doc > div,
.knowledge-link-success > div,
.knowledge-followup-required > div {
  min-width: 0;
}

.knowledge-share-doc strong,
.knowledge-link-success strong,
.knowledge-followup-required strong {
  color: var(--ink);
  font-size: 13px;
}

.knowledge-share-doc small,
.knowledge-link-success p,
.knowledge-followup-required p {
  display: block;
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
}

.knowledge-share-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 11px;
  border: 1px solid #e2e7df;
  border-radius: 6px;
  color: #5d6e65;
  background: #fbfcfa;
  font-size: 11.5px;
  line-height: 1.6;
}

.knowledge-share-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: #4c7a64;
}

.knowledge-link-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.knowledge-link-field input {
  min-width: 0;
  padding: 0 11px;
  border: 1px solid #ccd8d0;
  border-radius: 6px;
  color: #264d3d;
  background: #f8faf7;
  font-family: "Consolas", monospace;
  font-size: 11.5px;
}

.knowledge-share-table-wrap {
  overflow: auto;
  max-height: 520px;
  border: 1px solid #dce4de;
  border-radius: 7px;
}

.knowledge-share-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.knowledge-share-table th,
.knowledge-share-table td {
  padding: 10px;
  border-bottom: 1px solid #e8ece9;
  color: #51635a;
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
}

.knowledge-share-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #40564b;
  background: #f2f6f3;
  font-weight: 700;
}

.knowledge-open-feed {
  margin-bottom: 24px;
  border: 1px solid #d7e0da;
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.knowledge-open-feed.is-highlighted {
  border-color: #2f7559;
  box-shadow: 0 0 0 3px rgba(47, 117, 89, .14), var(--shadow-sm);
}

.knowledge-open-feed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e3e9e5;
  background: linear-gradient(180deg, #fbfcfa 0%, #f6f9f6 100%);
}

.knowledge-open-feed-kicker {
  color: #b84a24;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}

.knowledge-open-feed-head h2 {
  margin: 4px 0 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.knowledge-open-feed-head p {
  margin: 0;
  color: #607168;
  font-size: 11.5px;
  line-height: 1.55;
}

.knowledge-open-feed-count {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #d4dfd7;
  border-radius: 999px;
  color: #315a48;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.knowledge-open-feed-list {
  display: grid;
}

.knowledge-open-feed-item {
  display: grid;
  grid-template-columns: 140px minmax(145px, .9fr) minmax(190px, 1.25fr) minmax(155px, .9fr) minmax(145px, .8fr) 24px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 13px 18px;
  border: 0;
  border-bottom: 1px solid #edf1ee;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease;
}

.knowledge-open-feed-item:last-child {
  border-bottom: 0;
}

.knowledge-open-feed-item:hover {
  background: #f5faf6;
}

.knowledge-open-feed-item:focus-visible {
  outline: 2px solid #2f7559;
  outline-offset: -2px;
}

.knowledge-open-feed-time,
.knowledge-open-feed-customer,
.knowledge-open-feed-doc,
.knowledge-open-feed-location,
.knowledge-open-feed-sender {
  min-width: 0;
}

.knowledge-open-feed-item strong {
  display: block;
  overflow-wrap: anywhere;
  color: #263d32;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

.knowledge-open-feed-item small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #718178;
  font-size: 10.5px;
  line-height: 1.45;
}

.knowledge-open-feed-time strong {
  white-space: nowrap;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.knowledge-open-feed-duration {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 5px !important;
  padding: 2px 5px;
  border: 1px solid #d8e1dc;
  border-radius: 3px;
  color: #315a48 !important;
  background: #f3f8f5;
  font-family: "Consolas", monospace;
  font-size: 9px !important;
  font-weight: 700;
}

.knowledge-open-feed-location small {
  color: #53675d;
  font-family: "Consolas", monospace;
  font-size: 9.5px;
  font-weight: 600;
}

.knowledge-open-feed-arrow {
  color: #2f7559;
  text-align: right;
}

.knowledge-open-feed-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 96px;
  padding: 18px 20px;
  color: #496158;
}

.knowledge-open-feed-empty > svg {
  flex: 0 0 auto;
  color: #2f7559;
}

.knowledge-open-feed-empty strong,
.knowledge-open-feed-empty span {
  display: block;
}

.knowledge-open-feed-empty strong {
  font-size: 12.5px;
}

.knowledge-open-feed-empty span {
  margin-top: 3px;
  color: #718178;
  font-size: 11px;
}

.knowledge-open-feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  border-top: 1px solid #edf1ee;
  color: #718178;
  background: #fafcfa;
  font-size: 11px;
}

.knowledge-followup-pending,
.knowledge-followup-done {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
}

.knowledge-followup-pending {
  color: #9a412c;
  background: #fff0e9;
}

.knowledge-followup-done {
  color: #2d674e;
  background: #e9f4ed;
}

.knowledge-followup-required {
  border-color: #e5c78f;
  background: #fff8e8;
}

.knowledge-followup-required > span {
  background: #a56e1e;
}

.knowledge-followup-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-followup-context > div {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #e0e6e2;
  border-radius: 7px;
  background: #fbfcfa;
}

.knowledge-followup-context > div.span-2 {
  grid-column: 1 / -1;
}

.knowledge-followup-context span,
.knowledge-followup-context strong,
.knowledge-followup-context small,
.knowledge-followup-context p {
  display: block;
}

.knowledge-followup-context span {
  color: #718178;
  font-size: 10.5px;
  font-weight: 700;
}

.knowledge-followup-context strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.knowledge-followup-context small,
.knowledge-followup-context p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.knowledge-followup-context p {
  padding-top: 7px;
  border-top: 1px solid #e8ece9;
}

@media (max-width: 900px) {
  .knowledge-card-opening {
    flex-wrap: wrap;
  }

  .knowledge-card-manage-actions {
    margin-left: auto;
  }

  .knowledge-card-link-row {
    grid-template-columns: 1fr;
  }

  .knowledge-card-link-access {
    grid-template-columns: 1fr;
  }

  .knowledge-card-link-controls {
    justify-content: flex-start;
  }

  .knowledge-followup-context {
    grid-template-columns: 1fr;
  }

  .knowledge-followup-context > div.span-2 {
    grid-column: 1;
  }

  .knowledge-open-feed-head {
    align-items: center;
  }

  .knowledge-open-feed-item {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 9px 12px;
    padding: 14px 16px;
  }

  .knowledge-open-feed-time,
  .knowledge-open-feed-customer,
  .knowledge-open-feed-doc,
  .knowledge-open-feed-location,
  .knowledge-open-feed-sender {
    grid-column: 1;
  }

  .knowledge-open-feed-time strong {
    white-space: normal;
  }

  .knowledge-open-feed-arrow {
    grid-column: 2;
    grid-row: 1 / span 5;
    align-self: center;
  }

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

@media (max-width: 640px) {
  .knowledge-filter-bar {
    align-items: stretch;
  }

  .knowledge-card-actions .primary-button,
  .knowledge-card-actions .secondary-button {
    flex: 1;
  }

  .knowledge-link-field {
    grid-template-columns: 1fr;
  }
}

.customer-table-money em {
  font-size: 10px;
}

.customer-page-toolbar h1 {
  font-family: var(--font);
  font-size: 28px;
  font-weight: 730;
  letter-spacing: 0;
}

.customer-page-toolbar p {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.customer-page-kicker {
  color: #8b681d;
  font-size: 10.5px;
}

.customer-page-shell .crm-status-dot,
.customer-page-shell .crm-pipeline-flag {
  font-size: 10.5px;
}

.customer-page-shell .crm-company-identity p {
  font-size: 12.5px;
}

.customer-page-shell .crm-address-line {
  color: var(--ink-soft);
  font-size: 12px;
}

.customer-page-shell .crm-header-actions button {
  font-size: 12px;
}

.customer-page-shell .crm-metric-strip span {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.customer-page-shell .crm-metric-strip small {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.customer-page-shell .crm-tabs button {
  font-size: 12.5px;
}

.customer-page-shell .crm-section-head p,
.customer-page-shell .crm-section-head button {
  font-size: 12px;
}

.customer-page-shell .crm-contact-main > span,
.customer-page-shell .crm-contact-meta span,
.customer-page-shell .crm-contact-main p,
.customer-page-shell .crm-address-item p,
.customer-page-shell .crm-address-item > div > span,
.customer-page-shell .crm-business-main > span {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.customer-page-shell .record-type-badge {
  font-size: 10.5px;
}

.customer-page-shell .crm-record-status {
  font-size: 10.5px;
}

.customer-page-shell .crm-record-amount {
  color: #245a46;
  font-size: 12px;
  font-weight: 700;
}

.customer-page-shell .crm-followup-heading strong {
  font-size: 13px;
}

.customer-page-shell .crm-followup-heading small,
.customer-page-shell .crm-followup-entry-head span:not(.crm-followup-avatar),
.customer-page-shell .crm-followup-stamp span {
  color: var(--ink-soft);
  font-size: 11px;
}

.customer-page-shell .crm-followup-add,
.customer-page-shell .crm-followup-stamp strong,
.customer-page-shell .crm-followup-entry-head strong {
  font-size: 12px;
}

.customer-page-shell .crm-followup-content {
  color: var(--ink-soft);
  font-size: 12px;
}

.customer-page-shell .crm-record-documents button,
.customer-page-shell .crm-stage-action {
  min-height: 32px;
  font-size: 11.5px;
}

.customer-page-shell .crm-overview-note strong,
.customer-page-shell .crm-block-title h4 {
  font-size: 13px;
}

.customer-page-shell .crm-overview-note p,
.customer-page-shell .crm-overview-item strong,
.customer-page-shell .crm-overview-log strong {
  font-size: 12px;
}

.customer-page-shell .crm-overview-item span:not(.record-type-badge),
.customer-page-shell .crm-overview-log small,
.customer-page-shell .crm-overview-item em,
.customer-page-shell .crm-timeline-row span:not(.crm-timeline-dot) {
  color: var(--ink-soft);
  font-size: 11px;
}

.customer-page-shell .crm-side-section h4 {
  color: #52645b;
  font-size: 11px;
}

.customer-page-shell .crm-owner-row strong,
.customer-page-shell .crm-facts dd,
.customer-page-shell .crm-mini-timeline-row strong {
  font-size: 12px;
}

.customer-page-shell .crm-owner-row small,
.customer-page-shell .crm-facts dt,
.customer-page-shell .crm-mini-timeline-row small {
  color: var(--ink-soft);
  font-size: 11px;
}

.customer-page-shell .crm-quick-actions button {
  font-size: 12px;
}

.customer-page-shell .text-button {
  font-size: 11.5px;
}

.crm-overview-empty,
.crm-side-empty {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.crm-block-title .text-button {
  font-size: 11.5px;
}

.customer-page-footer {
  color: var(--ink-soft);
  font-size: 11.5px;
}

/* Device management */
.device-table {
  min-width: 1120px;
}

.device-row {
  cursor: pointer;
}

.device-row:hover {
  background: #f8faf7;
}

.device-row:focus-visible {
  outline: 2px solid #6f9a85;
  outline-offset: -2px;
}

.device-number,
.device-product-name,
.device-customer-name,
.device-owner {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.device-number {
  font-family: "Cascadia Mono", "Consolas", monospace;
}

.device-key-hint,
.device-model,
.device-updated {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.device-updated,
.device-order-number {
  white-space: nowrap;
}

.device-order-number {
  color: #355b4a;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 11.5px;
  font-weight: 700;
}

.device-status-pill,
.device-ticket-status,
.device-ticket-type,
.device-ticket-priority {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.device-status-pill.status-active,
.device-ticket-status.status-completed {
  color: #286449;
  background: #e8f4ec;
}

.device-status-pill.status-servicing,
.device-ticket-status.status-in_progress {
  color: #806018;
  background: #fbf1cf;
}

.device-status-pill.status-replaced {
  color: #256477;
  background: #e8f3f6;
}

.device-status-pill.status-inactive,
.device-ticket-status.status-cancelled {
  color: #66736d;
  background: #eef1ee;
}

.device-ticket-status.status-pending {
  color: #815b2c;
  background: #fff3df;
}

.device-latest-ticket strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
}

.device-latest-ticket span,
.device-no-ticket {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.device-detail-page {
  max-width: 1500px;
}

.device-page-toolbar {
  align-items: flex-start;
}

.device-page-toolbar > div:nth-child(2) {
  flex: 1;
}

.device-detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.device-detail-hero {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 21px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.device-detail-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--pine);
}

.device-detail-identity {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.device-detail-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.device-detail-title strong {
  color: var(--ink);
  font-size: 21px;
}

.device-detail-identity > span {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.device-secret-box {
  display: grid;
  grid-template-columns: minmax(130px, auto) auto auto;
  align-items: center;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid #d8e2dc;
  border-radius: 8px;
  background: #f7faf8;
}

.device-secret-box > span {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 650;
}

.device-secret-box code {
  color: #274b3e;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  font-weight: 700;
}

.device-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 315px;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.device-ticket-panel .panel-head > div {
  display: grid;
  gap: 3px;
}

.device-ticket-panel .panel-head > div > span {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.device-ticket-list {
  display: grid;
  gap: 11px;
  padding: 15px;
}

.device-ticket-card {
  padding: 15px;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
}

.device-ticket-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.device-ticket-card-head .icon-button {
  margin-left: auto;
}

.device-ticket-type.type-repair {
  color: #8b4b2d;
  background: #fbece5;
}

.device-ticket-type.type-replacement {
  color: #256477;
  background: #e8f3f6;
}

.device-ticket-type.type-parts {
  color: #806018;
  background: #fbf1cf;
}

.device-ticket-type.type-maintenance,
.device-ticket-type.type-inspection {
  color: #30644f;
  background: #eaf4ee;
}

.device-ticket-type.type-other {
  color: #5e5579;
  background: #efedf6;
}

.device-ticket-priority.priority-high,
.device-ticket-priority.priority-urgent {
  color: #a9342b;
  background: #fbe9e7;
}

.device-ticket-priority.priority-low,
.device-ticket-priority.priority-normal {
  color: var(--ink-soft);
  background: #eef1ee;
}

.device-ticket-card h4 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 14.5px;
}

.device-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 8px;
}

.device-ticket-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 11px;
}

.device-ticket-card > p,
.device-ticket-resolution span {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.device-ticket-resolution {
  margin-top: 10px;
  padding: 10px 11px;
  border-left: 3px solid #6d9a84;
  background: #f4f8f5;
}

.device-ticket-resolution strong {
  display: block;
  margin-bottom: 4px;
  color: #35594a;
  font-size: 11.5px;
}

.device-ticket-actor {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid #edf0ec;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.device-ticket-empty {
  min-height: 290px;
  border: 1px dashed #d3ddd6;
  border-radius: 8px;
}

.device-info-panel {
  padding: 19px;
}

.device-info-panel h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 15px;
}

.device-info-list {
  display: grid;
  margin: 0;
}

.device-info-list > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ec;
}

.device-info-list > div:last-child {
  border-bottom: 0;
}

.device-info-list dt {
  color: var(--ink-soft);
  font-size: 11px;
}

.device-info-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.device-notes {
  margin: 14px 0 0;
  padding: 10px 11px;
  border: 1px solid #e1e7e2;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fafbf9;
  font-size: 11.5px;
  line-height: 1.65;
}

.device-import-dropzone {
  display: flex;
  min-height: 130px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 1px dashed #aebfb4;
  border-radius: 9px;
  color: var(--ink-soft);
  background: #f8fbf8;
  cursor: pointer;
}

.device-import-dropzone:hover,
.device-import-dropzone.dragover {
  border-color: #5e8d76;
  background: #f0f7f2;
}

.device-import-dropzone > svg {
  width: 26px;
  height: 26px;
  color: #4f7d69;
}

.device-import-dropzone strong {
  color: var(--ink);
  font-size: 13px;
}

.device-import-dropzone span {
  color: var(--ink-soft);
  font-size: 11.5px;
}

.device-import-column-guide {
  margin-top: 12px;
  padding: 13px 14px;
  border: 1px solid #dce6df;
  border-radius: 8px;
  background: #fbfcfa;
}

.device-import-column-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.device-import-column-guide-head > div {
  display: grid;
  gap: 3px;
}

.device-import-column-guide-head strong {
  color: var(--ink);
  font-size: 13px;
}

.device-import-column-guide-head span {
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.5;
}

.device-import-minimum {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  color: #286449 !important;
  background: #e8f3ec;
  font-size: 10.5px !important;
  font-weight: 700;
}

.device-import-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 8px;
}

.device-import-column-group {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e5ebe7;
  border-radius: 7px;
  background: #fff;
}

.device-import-column-group.is-required {
  border-color: #d6e4db;
  background: #f7faf8;
}

.device-import-column-group > strong {
  display: block;
  margin-bottom: 6px;
  color: #40594c;
  font-size: 11.5px;
}

.device-import-column-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.device-import-column-group code {
  padding: 2px 5px;
  border: 1px solid #e6ebe7;
  border-radius: 4px;
  color: #52665b;
  background: #f5f7f4;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 9.5px;
  line-height: 1.4;
}

.device-import-column-guide > p {
  margin: 10px 0 0;
  color: #5e6d65;
  font-size: 11.5px;
  line-height: 1.65;
}

.device-import-column-guide > p strong {
  color: #2f5f49;
}

.device-import-analysis {
  margin-top: 14px;
}

.device-import-placeholder,
.device-import-error {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border: 1px solid #e0e6e1;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fbfcfa;
  font-size: 11.5px;
  text-align: center;
}

.device-import-error {
  min-height: 0;
  margin-top: 10px;
  justify-content: flex-start;
  border-color: #eacbc5;
  color: #8e3e33;
  background: #fff4f1;
  text-align: left;
}

.device-import-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid #d8e3dc;
  border-radius: 7px;
  background: #f3f8f5;
}

.device-import-summary > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.device-import-summary strong {
  color: #2d5b48;
  font-size: 12.5px;
}

.device-import-summary span {
  color: var(--ink-soft);
  font-size: 11px;
}

.device-import-summary > span {
  flex: 0 0 auto;
  color: #286449;
  font-weight: 700;
}

.device-import-summary > span.has-error {
  color: #a9342b;
}

.device-import-mapping {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 13px;
}

.device-import-mapping > span {
  padding: 4px 7px;
  border-radius: 5px;
  color: #40594c;
  background: #edf3ef;
  font-size: 10.5px;
}

.device-import-mapping > span.is-missing {
  color: #8a5e25;
  background: #fff5e5;
}

.device-import-association {
  padding: 13px;
  border: 1px solid #dbe4de;
  border-radius: 8px;
  background: #fafcfa;
}

.device-import-field-help {
  display: block;
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.device-import-preview-wrap {
  overflow: auto;
  max-height: 420px;
  margin-top: 12px;
  border: 1px solid #dbe2dd;
  border-radius: 8px;
}

.device-import-preview {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  background: #fff;
}

.device-import-preview th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px;
  color: #40534a;
  background: #f4f6f2;
  font-size: 10.5px;
  text-align: left;
}

.device-import-preview td {
  padding: 9px 10px;
  border-top: 1px solid #edf0ec;
  color: var(--ink-soft);
  font-size: 11px;
}

.device-import-preview tr.has-error td {
  background: #fff7f4;
}

.device-import-preview code {
  color: #334d41;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 10.5px;
}

.device-import-row-ok {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #286449;
  font-weight: 700;
}

.device-import-row-error {
  color: #a9342b;
}

.device-import-match {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 4px;
  color: #286449;
  background: #e7f3eb;
  font-size: 9.5px;
}

.device-ticket-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid #dbe4de;
  border-radius: 7px;
  background: #f5f9f6;
}

.device-ticket-modal-head > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--pine);
}

.device-ticket-modal-head > div {
  display: grid;
  gap: 3px;
}

.device-ticket-modal-head strong {
  color: var(--ink);
  font-size: 13px;
}

.device-ticket-modal-head small {
  color: var(--ink-soft);
  font-size: 11px;
}

@media (max-width: 980px) {
  .device-detail-layout {
    grid-template-columns: 1fr;
  }

  .device-detail-hero {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .device-secret-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .device-detail-hero {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 16px;
  }

  .device-detail-icon {
    width: 48px;
    height: 48px;
  }

  .device-detail-actions {
    width: 100%;
    margin-left: 0;
  }

  .device-detail-actions button {
    flex: 1;
  }

  .device-page-toolbar {
    flex-wrap: wrap;
  }

  .device-ticket-card-head .icon-button {
    margin-left: 0;
  }
}

.bootstrap-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.bootstrap-module {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bootstrap-module div,
.bootstrap-module strong,
.bootstrap-module small {
  display: block;
}

.bootstrap-module strong {
  color: var(--ink);
  font-size: 12px;
}

.bootstrap-module small {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.bootstrap-module-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c9a53f;
  box-shadow: 0 0 0 4px rgba(201, 165, 63, .12);
  animation: bootstrap-pulse 1.1s ease-in-out infinite;
}

.bootstrap-module.status-done .bootstrap-module-dot {
  background: #4d9870;
  box-shadow: 0 0 0 4px rgba(77, 152, 112, .12);
  animation: none;
}

.bootstrap-module.status-error .bootstrap-module-dot {
  background: #b34a40;
  box-shadow: 0 0 0 4px rgba(179, 74, 64, .12);
  animation: none;
}

.bootstrap-module.status-skipped {
  opacity: .68;
}

.bootstrap-module.status-skipped .bootstrap-module-dot {
  background: #97a19b;
  box-shadow: none;
  animation: none;
}

@keyframes bootstrap-pulse {
  0%, 100% { opacity: .45; transform: scale(.9); }
  50% { opacity: 1; transform: scale(1); }
}

.bootstrap-skeleton {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.bootstrap-skeleton-row {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr .45fr;
  gap: 20px;
  padding: 18px;
  border-bottom: 1px solid #edf0ec;
}

.bootstrap-skeleton-row:last-child {
  border-bottom: 0;
}

.bootstrap-skeleton-row span {
  height: 13px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2ef 20%, #f8faf8 50%, #eef2ef 80%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s linear infinite;
}

@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.load-more-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.load-more-complete {
  color: var(--ink-faint);
  font-size: 10.5px;
}

.customer-detail-loading {
  display: flex;
  min-height: 480px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: var(--ink-soft);
  background: #fff;
}

.customer-detail-loading strong {
  color: var(--ink);
  font-size: 15px;
}

.customer-detail-loading p {
  margin: 0;
  font-size: 11.5px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  margin-bottom: 5px;
  border: 2px solid #d7e3dc;
  border-top-color: var(--pine);
  border-radius: 50%;
  animation: auth-spin .75s linear infinite;
}

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

@media (max-width: 560px) {
  .bootstrap-progress {
    grid-template-columns: 1fr;
  }

  .bootstrap-skeleton-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .doc-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .doc-type-card {
    min-height: 145px;
  }

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

  .dashboard-lower {
    grid-template-columns: 1fr;
  }

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

  .customer-table {
    min-width: 1180px;
  }

  .editor-layout {
    grid-template-columns: 400px minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 218px;
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(390px, .9fr);
  }

  .auth-visual {
    padding: 32px 34px 26px;
  }

  .auth-story {
    width: min(500px, 95%);
    margin-top: 90px;
  }

  .auth-paper-stack {
    display: none;
  }

  .auth-panel {
    padding-right: 28px;
    padding-left: 28px;
  }

  .view-host {
    padding: 24px 24px 45px;
  }

  .topbar {
    padding: 0 24px;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

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

  .side-card + .side-card {
    margin-top: 0;
  }

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

  .editor-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .crm-workspace {
    grid-template-columns: 1fr;
  }

  .crm-side-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    border-top: 1px solid #dce2dd;
    border-left: 0;
  }

  .crm-side-section {
    min-width: 0;
  }

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

  .product-detail-visual {
    min-height: 280px;
    border-right: 0;
    border-bottom: 1px solid #e0e5e1;
  }

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

  .editor-form-panel {
    position: static;
    height: auto;
  }

  .editor-form-scroll {
    height: auto;
    max-height: 700px;
  }

  .preview-stage {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .auth-shell {
    display: block;
    min-height: 100vh;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    align-items: stretch;
    justify-content: flex-start;
    padding: 34px 20px 18px;
  }

  .auth-card {
    width: min(430px, 100%);
    margin: 8vh auto 0;
  }

  .auth-card-head {
    margin-bottom: 27px;
  }

  .auth-card h2 {
    font-size: 28px;
  }

  .auth-copyright {
    width: min(430px, 100%);
    margin: 30px auto 0;
    text-align: center;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    width: 250px;
    transform: translateX(-101%);
    transition: transform .2s ease;
    box-shadow: 16px 0 40px rgba(10, 25, 18, .18);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-shell {
    width: 100%;
  }

  .mobile-menu {
    display: inline-grid !important;
    margin-right: -5px;
  }

  .topbar {
    height: 60px;
    padding: 0 17px;
  }

  .breadcrumb > span:first-child,
  .breadcrumb > svg {
    display: none;
  }

  .topbar-link {
    display: none;
  }

  .company-avatar {
    display: none;
  }

  .view-host {
    padding: 21px 17px 40px;
  }

  .page-heading {
    flex-direction: column;
    margin-bottom: 20px;
  }

  .heading-actions {
    width: 100%;
  }

  .heading-actions .primary-button,
  .heading-actions .secondary-button {
    flex: 1;
  }

  .stat-grid {
    gap: 9px;
  }

  .role-summary-grid,
  .customer-card-grid {
    grid-template-columns: 1fr;
  }

  .customer-table {
    min-width: 1140px;
  }

  .customer-table th,
  .customer-table td {
    padding: 11px 12px;
  }

  .stat-card {
    min-height: 105px;
    padding: 14px;
  }

  .stat-value {
    font-size: 26px;
  }

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

  .doc-type-card {
    min-height: 140px;
    padding: 13px;
  }

  .doc-type-icon {
    margin-bottom: 13px;
  }

  .dashboard-lower {
    gap: 17px;
  }

  .recent-row,
  .recent-business-row {
    grid-template-columns: 37px minmax(0, 1fr) auto;
  }

  .recent-amount,
  .recent-business-amount {
    display: none;
  }

  .toolbar,
  .doc-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-left,
  .toolbar-right {
    width: 100%;
  }

  .doc-search-tools {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: space-between;
  }

  .doc-search-tools .list-search-box {
    flex: 1;
  }

  .search-box {
    width: 100%;
  }

  .toolbar-right {
    justify-content: flex-end;
  }

  .form-grid,
  .form-grid.three,
  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .rich-image-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .rich-image-toolbar > div {
    flex-wrap: wrap;
    justify-content: center;
  }

  .rich-image-canvas {
    max-height: calc(100vh - 260px);
    padding: 7px;
  }

  .form-grid .span-2,
  .form-grid .span-3,
  .modal-form-grid .span-2 {
    grid-column: span 1;
  }

  .tier-pricing-box {
    grid-column: span 1;
  }

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

  .settings-aside {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 14px 14px 0 0;
  }

  .modal.crm-wide {
    max-height: 96vh;
  }

  .crm-company-header {
    flex-direction: column;
    padding: 17px;
  }

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

  .crm-header-actions button {
    flex: 1;
  }

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

  .crm-metric-strip > div:nth-child(even) {
    border-right: 0;
  }

  .crm-tabs {
    padding: 0 8px;
    overflow-x: auto;
  }

  .crm-tabs button {
    flex: 0 0 auto;
    padding: 0 10px;
  }

  .crm-main-column {
    padding: 17px;
  }

  .customer-page-shell .crm-workspace {
    grid-template-columns: 1fr;
  }

  .customer-page-shell .crm-main-column {
    padding: 17px;
  }

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

  .customer-page-shell .crm-side-column {
    grid-template-columns: 1fr;
    padding: 17px;
  }

  .crm-overview-columns {
    grid-template-columns: 1fr;
  }

  .product-detail-toolbar {
    flex-wrap: wrap;
  }

  .product-detail-toolbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .product-detail-intro {
    padding: 24px 21px;
  }

  .product-detail-intro h1 {
    font-size: 32px;
  }

  .product-detail-highlight-grid,
  .product-detail-facts {
    grid-template-columns: 1fr;
  }

  .product-detail-section {
    padding: 17px;
  }

  .crm-business-record {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .customer-page-shell .crm-business-record {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .customer-page-shell .crm-business-record > .crm-business-main {
    grid-column: 2;
  }

  .customer-page-shell .crm-business-record > .crm-row-actions,
  .customer-page-shell .crm-business-record > .status-pill {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .crm-followup-entry {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .crm-followup-stamp {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 0;
    text-align: left;
  }

  .crm-followup-stamp span {
    margin-top: 0;
  }

  .crm-record-amount {
    display: none;
  }

  .crm-order-builder {
    grid-template-columns: 1fr;
  }

  .crm-order-item-row {
    grid-template-columns: 30px minmax(0, 1fr) 24px;
  }

  .crm-order-item-row > strong {
    display: none;
  }

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

  .crm-payment-summary > div {
    border-right: 0;
    border-bottom: 1px solid #e3e8e4;
  }

  .crm-payment-summary > div:last-child {
    border-bottom: 0;
  }

  .crm-payment-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .crm-footer-note {
    display: none;
  }

  .product-picker-list {
    grid-template-columns: 1fr;
  }

  .standards-modal-grid {
    grid-template-columns: 1fr;
  }

  .editor-heading {
    gap: 13px;
  }

  .editor-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .editor-actions button {
    flex: 1;
  }

  .order-title-badge {
    display: none;
  }

  .editor-actions .ghost-button {
    flex: 0 0 auto;
  }

  .editor-form-scroll {
    padding: 15px;
  }

  .editor-fields {
    gap: 11px;
  }

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

  .preview-stage {
    padding: 12px;
  }

  .toast-root {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
  }
}

@media (max-width: 560px) {
  .customer-table {
    min-width: 1100px;
  }
}

@media (max-width: 440px) {
  .tier-price-grid {
    grid-template-columns: 1fr;
  }

  .doc-type-grid {
    grid-template-columns: 1fr;
  }

  .doc-type-card {
    min-height: 115px;
  }

  .doc-type-arrow {
    display: none;
  }

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

  .readiness-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .readiness-banner .text-button {
    grid-column: 2;
    justify-self: start;
  }

  .demo-order-banner {
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: start;
    gap: 13px;
    padding: 14px;
  }

  .demo-product-visual {
    width: 68px;
    height: 68px;
  }

  .demo-order-kicker {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .demo-order-main h2 {
    font-size: 15px;
  }

  .demo-order-actions {
    grid-column: 2;
    max-width: none;
    align-items: flex-start;
    text-align: left;
  }

  .demo-order-actions .primary-button {
    width: 100%;
  }

  .editor-tabs {
    padding: 0 4px;
  }

  .editor-tab {
    font-size: 9.5px;
  }

  .line-item-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .sales-record-row {
    grid-template-columns: minmax(0, 1fr) auto 30px;
  }

  .sales-record-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .sales-record-value {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .sales-record-party {
    grid-column: 1;
    grid-row: 2;
  }

  .sales-record-followup {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .sales-record-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 720px) {
  .sales-record-page-toolbar {
    flex-wrap: wrap;
  }

  .sales-record-summary {
    width: calc(100% - 43px);
    margin-left: 43px;
  }

  .sales-record-summary > span {
    min-width: 0;
    flex: 1;
  }

  .sales-record-tabs {
    grid-template-columns: 1fr;
  }

  .sales-record-row {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 10px;
  }

  .sales-record-identity {
    grid-column: 1;
    grid-row: 1;
  }

  .sales-record-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .sales-record-value,
  .sales-record-party,
  .sales-record-followup {
    grid-column: 1 / span 2;
    text-align: left;
  }

  .sales-record-value {
    grid-row: 2;
    padding-top: 7px;
    border-top: 1px solid #edf1ed;
  }

  .sales-record-party {
    grid-row: 3;
  }

  .sales-record-followup {
    grid-row: 4;
  }
}

/* AI prospecting workspace */
.ai-prospecting-page {
  --ai-blue: #245b74;
  --ai-blue-soft: #eaf3f6;
  --ai-gold-soft: #fbf3df;
}

.ai-page-heading {
  align-items: center;
}

.ai-page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--ai-blue);
  font-family: "Consolas", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.ai-page-eyebrow svg {
  width: 14px;
  height: 14px;
}

.ai-safety-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid #e6d3a3;
  border-radius: 6px;
  color: #775713;
  background: var(--ai-gold-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-safety-chip svg {
  width: 14px;
  height: 14px;
}

.ai-mode-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 10px;
}

.ai-mode-section-head > span {
  color: #8a9a92;
  font-family: "Consolas", monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .1em;
}

.ai-mode-section-head > strong {
  color: var(--ink);
  font-size: 14px;
}

.ai-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}

.ai-mode-card {
  --mode-color: var(--pine);
  --mode-soft: #edf5f1;
  --mode-border: #bfd5cb;
  position: relative;
  display: grid;
  min-height: 98px;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 17px 17px 17px 18px;
  border: 1px solid var(--mode-border);
  border-radius: 9px;
  color: var(--ink-soft);
  background: #fcfdfc;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}

.ai-mode-card.mode-product {
  --mode-color: #1b5846;
  --mode-soft: #eaf5ef;
  --mode-border: #afcec0;
  background: #f8fcfa;
}

.ai-mode-card.mode-industry {
  --mode-color: #285f74;
  --mode-soft: #eaf3f6;
  --mode-border: #b9d3dc;
}

.ai-mode-card:hover {
  border-color: var(--mode-color);
  box-shadow: 0 9px 24px rgba(30, 55, 44, .08);
  transform: translateY(-1px);
}

.ai-mode-card.active {
  border-color: var(--mode-color);
  background: var(--mode-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mode-color) 18%, transparent), 0 7px 21px rgba(30, 55, 44, .07);
}

.ai-mode-card.active::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--mode-color);
  content: "";
}

.ai-mode-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--mode-color);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--mode-border);
}

.ai-mode-card.active .ai-mode-card-icon {
  color: #fff;
  background: var(--mode-color);
  box-shadow: none;
}

.ai-mode-card-icon svg {
  width: 22px;
  height: 22px;
}

.ai-mode-card-copy {
  min-width: 0;
}

.ai-mode-card-copy > * {
  display: block;
}

.ai-mode-card-topline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: #77877f;
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .07em;
}

.ai-mode-card-topline em {
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--mode-color);
  background: #fff;
  font-style: normal;
  letter-spacing: 0;
}

.ai-mode-card.mode-product .ai-mode-card-topline em {
  color: #875813;
  background: #fff3d9;
}

.ai-mode-card-copy > strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
}

.ai-mode-card-copy > small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.ai-mode-card-arrow {
  color: var(--mode-color);
  opacity: .65;
}

.ai-mode-card-arrow svg {
  width: 17px;
  height: 17px;
}

.ai-mode-card.active .ai-mode-card-arrow {
  opacity: 1;
}

.ai-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  gap: 14px;
  align-items: stretch;
}

.ai-builder-panel,
.ai-prompt-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.ai-panel-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--ai-blue);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .08em;
}

.ai-builder-body,
.ai-prompt-body {
  padding: 17px;
}

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

.ai-form-grid .span-2 {
  grid-column: span 2;
}

.ai-form-grid .field > label {
  font-size: 11px;
}

.ai-form-grid .field input,
.ai-form-grid .field textarea {
  font-size: 12.5px;
}

.ai-quick-options {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 7px;
}

.ai-quick-options > span {
  flex: 0 0 auto;
  padding-top: 3px;
  color: #86938c;
  font-size: 8px;
  font-weight: 700;
}

.ai-quick-options > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 4px;
}

.ai-quick-options button {
  min-height: 23px;
  padding: 2px 6px;
  border: 1px solid #dce5df;
  border-radius: 4px;
  color: #53665d;
  background: #f9fbf9;
  font-size: 8.5px;
  line-height: 1.3;
  cursor: pointer;
}

.ai-quick-options button:hover {
  border-color: #9cb5a9;
  color: var(--pine);
  background: #f2f8f4;
}

.ai-quick-options button.selected {
  border-color: #6f9c8a;
  color: #214d3e;
  background: #e8f4ed;
  font-weight: 700;
}

.ai-form-grid .field textarea {
  min-height: 72px;
}

.ai-product-builder {
  display: grid;
  gap: 14px;
}

.ai-product-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #cbdcd3;
  border-left: 3px solid var(--pine);
  border-radius: 6px;
  background: #f4f9f6;
}

.ai-product-context > div {
  min-width: 0;
}

.ai-product-context span,
.ai-product-context strong,
.ai-product-context small {
  display: block;
}

.ai-product-context span {
  color: var(--ai-blue);
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
}

.ai-product-context strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
}

.ai-product-context small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.ai-product-context p {
  max-width: 55%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.55;
}

.ai-option-section {
  padding: 12px;
  border: 1px solid #e1e8e3;
  border-radius: 7px;
  background: #fbfcfa;
}

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

.ai-option-head strong,
.ai-option-head span {
  display: block;
}

.ai-option-head strong {
  color: var(--ink);
  font-size: 11px;
}

.ai-option-head span {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9px;
}

.ai-option-head .text-button {
  font-size: 9.5px;
}

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

.ai-option-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid #dfe6e1;
  border-radius: 5px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 9.5px;
  line-height: 1.45;
  cursor: pointer;
}

.ai-option-card:hover {
  border-color: #aebfb6;
}

.ai-option-card.selected {
  border-color: #75a08f;
  color: #214d3e;
  background: #eef7f2;
}

.ai-option-card input {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--pine);
}

.ai-product-settings {
  padding-top: 2px;
}

.ai-product-phase {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 39px;
  align-items: center;
}

.ai-product-phase span {
  padding: 4px 7px;
  border: 1px solid #d9e2dd;
  border-radius: 4px;
  color: var(--ink-faint);
  background: #fff;
  font-size: 8.5px;
  font-weight: 700;
}

.ai-product-phase span.active {
  border-color: #8caf9f;
  color: #285746;
  background: #edf7f2;
}

.ai-product-empty {
  display: flex;
  min-height: 100px;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px dashed #ccd8d1;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fafcf9;
}

.ai-product-empty svg {
  width: 22px;
  height: 22px;
  color: var(--ai-blue);
}

.ai-product-empty strong,
.ai-product-empty span {
  display: block;
}

.ai-product-empty strong {
  font-size: 11.5px;
}

.ai-product-empty span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.ai-builder-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: auto;
  padding: 14px 17px;
  border-top: 1px solid #e7ece8;
  background: #fbfcfa;
}

.ai-builder-footer button:disabled {
  cursor: wait;
  opacity: .7;
}

.ai-prompt-status {
  padding: 3px 7px;
  border-radius: 4px;
  color: var(--ink-faint);
  background: #f0f3ef;
  font-size: 9px;
  font-weight: 700;
}

.ai-model-selector {
  padding: 13px 17px;
  border-bottom: 1px solid #e7ece8;
  background: #f8faf7;
}

.ai-model-selector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.ai-model-selector-head strong,
.ai-model-selector-head span {
  display: block;
}

.ai-model-selector-head strong {
  color: var(--ink);
  font-size: 11px;
}

.ai-model-selector-head > div > span {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.45;
}

.ai-model-cost-note {
  flex: 0 0 auto;
  padding: 3px 6px;
  border: 1px solid #cbdcd4;
  border-radius: 4px;
  color: #315d4f;
  background: #eef7f2;
  font-size: 8.5px;
  font-weight: 700;
}

.ai-model-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.ai-model-options button {
  display: grid;
  min-width: 0;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #dce4df;
  border-radius: 6px;
  color: var(--ink-soft);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.ai-model-options button:hover {
  border-color: #abc0b6;
}

.ai-model-options button.active {
  border-color: #6f9d8d;
  color: var(--pine);
  background: #f3faf6;
  box-shadow: inset 0 0 0 1px rgba(24, 62, 53, .06);
}

.ai-model-options button:disabled {
  cursor: wait;
  opacity: .68;
}

.ai-model-radio {
  width: 11px;
  height: 11px;
  border: 1px solid #9dafa6;
  border-radius: 50%;
  background: #fff;
}

.ai-model-options button.active .ai-model-radio {
  border: 3px solid var(--pine);
}

.ai-model-options strong,
.ai-model-options small {
  display: block;
}

.ai-model-options strong {
  font-size: 10.5px;
}

.ai-model-options small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.35;
}

.ai-model-options em {
  padding: 2px 4px;
  border-radius: 3px;
  color: #6a5a35;
  background: #f6f0df;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 700;
}

.ai-model-options button:last-child em {
  color: #8d4f24;
  background: #fff0df;
}

.ai-model-guidance {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 8px 0 0;
  color: #6f7d76;
  font-size: 9px;
  line-height: 1.45;
}

.ai-model-guidance.is-advanced {
  color: #8b5d24;
}

.ai-model-guidance svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.ai-prompt-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.ai-prompt-body textarea {
  width: 100%;
  min-height: 390px;
  flex: 1;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: #26332d;
  background: #fcfdfb;
  font-family: "Consolas", "Microsoft YaHei UI", monospace;
  font-size: 11.5px;
  line-height: 1.75;
  resize: vertical;
}

.ai-prompt-body textarea:focus {
  border-color: #7da79a;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(36, 85, 72, .09);
}

.ai-prompt-body textarea::placeholder {
  color: #97a49d;
}

.ai-prompt-difference {
  margin-top: 7px;
  color: #7d8a83;
  font-size: 9px;
  line-height: 1.45;
}

.ai-prompt-difference.is-ok {
  color: #39705c;
  font-weight: 700;
}

.ai-prompt-difference.is-over {
  padding: 5px 7px;
  border: 1px solid #efc8c3;
  border-radius: 4px;
  color: #9a3c32;
  background: #fff4f2;
  font-weight: 700;
}

.ai-run-action {
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: .01em;
}

.ai-run-action:disabled {
  cursor: wait;
  opacity: .72;
}

.ai-prompt-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 11px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.ai-prompt-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--pine);
}

.ai-results-panel {
  margin-top: 16px;
  padding: 20px;
}

.ai-product-company-list {
  display: grid;
  gap: 10px;
}

.ai-product-company {
  border: 1px solid #dbe4de;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ai-product-company.is-selected {
  border-color: #6f9c8a;
  box-shadow: inset 3px 0 0 var(--pine);
}

.ai-product-company-main {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid #e9eeea;
  background: #fbfcfa;
}

.ai-company-check {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.ai-company-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--pine);
}

.ai-product-company-title {
  min-width: 0;
}

.ai-product-company-title h3 {
  margin: 1px 0 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ai-product-company-title p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.ai-product-fit {
  text-align: right;
}

.ai-product-fit strong {
  display: block;
  color: var(--ai-blue);
  font-family: "Consolas", monospace;
  font-size: 20px;
  line-height: 1;
}

.ai-product-fit span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.ai-product-company-body {
  padding: 14px 15px;
}

.ai-product-link-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.ai-product-link-grid > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #e5ebe7;
  border-radius: 4px;
  background: #fafcfa;
  color: var(--ink-soft);
  font-size: 9px;
}

.ai-product-link-grid > div > span {
  display: block;
  margin-bottom: 3px;
  color: #84918a;
  font-size: 8px;
  font-weight: 700;
}

.ai-product-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 15px;
  margin: 12px 0 0;
}

.ai-product-details > div {
  min-width: 0;
}

.ai-product-details .span-2 {
  grid-column: span 2;
}

.ai-product-details dt {
  margin-bottom: 3px;
  color: #7b8982;
  font-size: 8.5px;
  font-weight: 700;
}

.ai-product-details dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.ai-product-company-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid #edf1ee;
  color: #75847c;
  font-size: 8.5px;
}

.ai-product-company-foot span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-product-company-foot svg {
  width: 12px;
  height: 12px;
}

.ai-deep-research-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #e2c894;
  border-radius: 7px;
  background: #fdf8eb;
}

.ai-deep-research-bar strong {
  display: block;
  color: #5e481d;
  font-size: 12px;
}

.ai-deep-research-bar p {
  margin: 4px 0 0;
  color: #7d6b47;
  font-size: 9.5px;
  line-height: 1.5;
}

.ai-contact-research-list {
  display: grid;
  gap: 13px;
}

.ai-contact-research-company {
  padding: 15px;
  border: 1px solid #dbe4de;
  border-radius: 8px;
  background: #fff;
}

.ai-contact-research-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 11px;
  border-bottom: 1px solid #e8ede9;
}

.ai-contact-research-head h3 {
  margin: 2px 0 0;
  font-size: 14px;
}

.ai-contact-research-head p {
  margin: 4px 0 0;
  font-size: 9.5px;
}

.ai-contact-company-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.ai-contact-company-actions > span {
  color: var(--ink-faint);
  font-size: 9px;
}

.ai-contact-company-channels {
  display: grid;
  grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.ai-contact-company-channels > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #e7ece8;
  border-radius: 5px;
  background: #fafcfa;
  color: var(--ink-soft);
  font-size: 9.5px;
}

.ai-contact-company-channels span {
  display: block;
  margin-bottom: 3px;
  color: #819087;
  font-size: 8px;
  font-weight: 700;
}

.ai-contact-research-company .ai-contact-grid {
  margin-top: 10px;
}

.ai-target-roles {
  margin-top: 11px;
  padding: 11px 12px;
  border: 1px solid #e6d4a8;
  border-radius: 6px;
  background: #fffaf0;
}

.ai-target-roles > div {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.ai-target-roles svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #8a651e;
}

.ai-target-roles strong,
.ai-target-roles p {
  display: block;
  margin: 0;
}

.ai-target-roles strong {
  color: #684f1d;
  font-size: 10px;
}

.ai-target-roles p {
  margin-top: 2px;
  color: #89774f;
  font-size: 8.5px;
  line-height: 1.45;
}

.ai-target-roles ul {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.ai-target-roles li {
  padding: 3px 6px;
  border: 1px solid #eadab3;
  border-radius: 4px;
  color: #725821;
  background: #fff;
  font-size: 8.5px;
}

.ai-run-history-panel {
  margin-top: 16px;
}

.ai-run-history-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ai-run-history-head > span {
  color: var(--ink-faint);
  font-family: "Consolas", monospace;
  font-size: 9px;
}

.ai-run-list {
  display: grid;
}

.ai-run-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 17px;
  border-bottom: 1px solid #e9eeea;
  cursor: pointer;
  transition: background .15s ease;
}

.ai-run-row:last-child {
  border-bottom: 0;
}

.ai-run-row:hover {
  background: #f6faf7;
}

.ai-run-row:focus-visible {
  outline: 2px solid #2f7559;
  outline-offset: -2px;
}

.ai-history-context {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
  padding: 12px 14px;
  border: 1px solid #d9c28e;
  border-radius: 7px;
  background: #fdf8e9;
}

.ai-history-context-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 6px;
  color: #6f571f;
  background: #f4e7c2;
}

.ai-history-context-icon svg {
  width: 16px;
  height: 16px;
}

.ai-history-context strong,
.ai-history-context span,
.ai-history-context small {
  display: block;
}

.ai-history-context strong {
  color: #5e481d;
  font-size: 11px;
}

.ai-history-context span {
  margin-top: 2px;
  color: #79683f;
  font-size: 9px;
}

.ai-history-context small {
  margin-top: 3px;
  color: #8a7b58;
  font-size: 8.5px;
}

.ai-history-context .text-button {
  font-size: 9px;
}

.ai-run-row-main {
  min-width: 0;
}

.ai-run-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.ai-run-task,
.ai-run-status,
.ai-run-model {
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 8.5px;
  font-weight: 700;
}

.ai-run-task {
  color: #255f4d;
  background: #eaf5ef;
}

.ai-run-status {
  color: #725a1f;
  background: #fbf2da;
}

.ai-run-status.status-completed {
  color: #285d4b;
  background: #eaf5ef;
}

.ai-run-status.status-failed {
  color: #9a3c32;
  background: #fbecea;
}

.ai-run-model {
  color: #4f6673;
  background: #edf3f6;
}

.ai-run-row-main > p {
  display: -webkit-box;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.ai-run-meta .is-error {
  color: var(--danger);
}

.ai-run-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-run-actions .text-button {
  font-size: 9.5px;
  white-space: nowrap;
}

.ai-run-history-more {
  padding: 12px;
  border-top: 1px solid #e9eeea;
  text-align: center;
}

.ai-run-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ai-run-detail-meta > div {
  padding: 9px;
  border: 1px solid #e2e9e4;
  border-radius: 5px;
  background: #fafcfa;
}

.ai-run-detail-meta span,
.ai-run-detail-meta strong {
  display: block;
}

.ai-run-detail-meta span {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
}

.ai-run-detail-meta strong {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9.5px;
  overflow-wrap: anywhere;
}

.ai-run-detail-section {
  margin-top: 13px;
}

.ai-run-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #dfe7e2;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #f8faf7;
}

.ai-run-detail-head strong {
  font-size: 10px;
}

.ai-run-detail-head .text-button {
  font-size: 9px;
}

.ai-run-detail-section pre {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  border: 1px solid #dfe7e2;
  border-radius: 0 0 6px 6px;
  color: #31423a;
  background: #fff;
  font-family: "Consolas", "Microsoft YaHei UI", monospace;
  font-size: 9.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
}

.ai-result-empty,
.ai-result-loading,
.ai-result-error {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  color: var(--ink-soft);
  text-align: left;
}

.ai-result-empty.is-idle {
  min-height: 180px;
  border: 1px dashed #cdd8d1;
  border-radius: 8px;
  background: #fafcf9;
}

.ai-result-empty > svg,
.ai-result-error > svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  color: var(--ai-blue);
}

.ai-result-error > svg {
  color: var(--danger);
}

.ai-result-empty strong,
.ai-result-loading strong,
.ai-result-error strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.ai-result-empty p,
.ai-result-loading p,
.ai-result-error p {
  max-width: 780px;
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.6;
}

.ai-result-error {
  justify-content: flex-start;
  border: 1px solid #efcec9;
  border-radius: 8px;
  background: #fff8f6;
}

.ai-result-error .secondary-button {
  margin-left: auto;
}

.ai-result-loading {
  min-height: 190px;
}

.ai-result-loading .loading-spinner {
  width: 29px;
  height: 29px;
}

.ai-wait-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.ai-wait-status span {
  padding: 4px 7px;
  border: 1px solid #d9e4dd;
  border-radius: 4px;
  color: #50685d;
  background: #f4f8f5;
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
}

.ai-button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .75s linear infinite;
}

.ai-result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin: -3px 0 16px;
  color: var(--ink-faint);
  font-size: 10px;
}

.ai-result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ai-result-meta svg {
  width: 13px;
  height: 13px;
}

.ai-result-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e4eae5;
}

.ai-result-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--ai-blue);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .1em;
}

.ai-result-summary h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.ai-result-summary p {
  margin: 6px 0 0;
  color: var(--ink-faint);
  font-size: 11.5px;
  line-height: 1.6;
}

.ai-result-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

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

.ai-company-card {
  position: relative;
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 13px rgba(25, 45, 36, .035);
  overflow: hidden;
}

.ai-company-card.is-priority {
  border-color: #d7bc82;
  box-shadow: inset 3px 0 0 #c69535, 0 3px 13px rgba(25, 45, 36, .035);
}

.ai-company-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ai-company-card-head > div {
  min-width: 0;
}

.ai-company-index {
  display: inline-block;
  margin-bottom: 5px;
  color: #8a9b93;
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
}

.ai-company-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ai-company-card-head p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
}

.ai-verification-badge {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid #e5d5ad;
  border-radius: 4px;
  color: #765917;
  background: #fff8e7;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.ai-verification-badge.partial {
  border-color: #b9d3ca;
  color: #285e4e;
  background: #edf7f2;
}

.ai-company-flags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.ai-priority-flag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 4px;
  color: #925313;
  background: #fff0df;
  font-size: 9px;
  font-weight: 700;
}

.ai-priority-flag svg {
  width: 12px;
  height: 12px;
}

.ai-confidence {
  color: var(--ink-faint);
  font-size: 9.5px;
}

.ai-company-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 14px 0 0;
  padding: 12px 0;
  border-top: 1px solid #edf1ee;
  border-bottom: 1px solid #edf1ee;
}

.ai-company-facts > div:first-child {
  grid-column: span 2;
}

.ai-company-facts dt,
.ai-research-facts dt,
.ai-contact-facts dt {
  margin: 0 0 3px;
  color: #7d8c84;
  font-size: 9px;
  font-weight: 700;
}

.ai-company-facts dd,
.ai-research-facts dd,
.ai-contact-facts dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ai-role-chip {
  display: inline-block;
  margin: 0 4px 4px 0;
  padding: 2px 5px;
  border: 1px solid #d4e2dc;
  border-radius: 3px;
  color: #315f50;
  background: #f2f8f5;
  font-size: 9px;
}

.ai-company-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ai-company-contact-grid.is-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

.ai-company-contact-grid > div {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid #e7ece8;
  border-radius: 5px;
  background: #fafcfa;
  color: var(--ink-soft);
  font-size: 10px;
}

.ai-company-contact-grid > div > span:first-child {
  display: block;
  margin-bottom: 3px;
  color: #84928b;
  font-size: 8.5px;
  font-weight: 700;
}

.ai-text-link {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  color: #1f6477;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.ai-text-link:hover {
  text-decoration: underline;
}

.ai-text-link svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.ai-linkedin-profile-link {
  color: #0a66c2;
  font-family: "Consolas", monospace;
  font-size: 9.5px;
  line-height: 1.5;
}

.ai-linkedin-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  color: #6f7f77;
}

.ai-linkedin-search > svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.ai-linkedin-search small {
  flex-basis: 100%;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.ai-muted {
  color: #9aa69f;
}

.ai-insight-block {
  margin-top: 10px;
  padding: 10px 11px;
  border-left: 2px solid #91afa3;
  background: #f8faf8;
}

.ai-insight-block.is-accent {
  border-left-color: var(--accent);
  background: #fff8f4;
}

.ai-insight-block > span {
  display: block;
  margin-bottom: 4px;
  color: #708078;
  font-size: 9px;
  font-weight: 700;
}

.ai-insight-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.ai-priority-reason {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.ai-priority-reason strong {
  margin-right: 6px;
  color: #8b5c19;
}

.ai-company-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid #edf1ee;
}

.ai-company-card-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #808e87;
  font-size: 9px;
}

.ai-company-card-footer svg {
  width: 13px;
  height: 13px;
}

.ai-company-card-footer .text-button {
  flex: 0 0 auto;
  font-size: 10.5px;
}

.ai-company-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-industry-phase {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e7ece8;
}

.ai-industry-phase .text-button {
  margin-left: auto;
  font-size: 9px;
}

.ai-research-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
  gap: 13px;
}

.ai-research-company,
.ai-research-opportunity {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ai-research-company {
  padding: 18px;
}

.ai-research-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ai-research-title h3,
.ai-contact-section-head h3 {
  margin: 0;
  font-size: 15px;
}

.ai-research-title p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 10.5px;
  line-height: 1.55;
}

.ai-research-overview {
  margin-top: 14px;
  padding: 12px 13px;
  border-left: 3px solid var(--ai-blue);
  background: var(--ai-blue-soft);
}

.ai-research-overview p {
  margin: 0;
  color: #314f5b;
  font-size: 11.5px;
  line-height: 1.75;
}

.ai-research-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 18px;
  margin: 17px 0 0;
}

.ai-research-facts .span-2 {
  grid-column: span 2;
}

.ai-research-opportunity {
  padding: 18px;
  color: #edf5f0;
  background: #1c463b;
  border-color: #1c463b;
}

.ai-research-opportunity .ai-result-kicker {
  color: #d6b66d;
}

.ai-research-opportunity h3 {
  margin: 6px 0 8px;
  color: #fff;
  font-size: 14px;
}

.ai-research-opportunity p {
  margin: 0;
  color: #c7d9d1;
  font-size: 11px;
  line-height: 1.7;
}

.ai-opportunity-divider {
  height: 1px;
  margin: 19px 0;
  background: rgba(255, 255, 255, .14);
}

.ai-contact-section {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid #e4eae5;
}

.ai-contact-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}

.ai-contact-section-head > span {
  color: var(--ink-faint);
  font-size: 10px;
}

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

.ai-contact-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dfe7e2;
  border-radius: 7px;
  background: #fcfdfb;
}

.ai-contact-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.ai-contact-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ai-blue);
  font-size: 12px;
  font-weight: 700;
}

.ai-contact-head h4 {
  margin: 0;
  font-size: 12px;
}

.ai-contact-head p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.ai-contact-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 13px;
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid #e8ede9;
}

.ai-contact-facts .ai-contact-linkedin-fact {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border: 1px solid #d7e6f7;
  border-radius: 5px;
  background: #f4f9ff;
}

.ai-contact-facts .ai-contact-linkedin-fact dt {
  color: #386f9f;
}

.ai-contact-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid #e8ede9;
  color: #7c8b84;
  font-size: 9px;
}

.ai-contact-card-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ai-contact-card-footer svg {
  width: 12px;
  height: 12px;
}

.ai-research-notes {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #e4dfd1;
  border-radius: 7px;
  background: #fdfaf2;
}

.ai-research-notes > strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6e5a2c;
  font-size: 10.5px;
}

.ai-research-notes svg {
  width: 14px;
  height: 14px;
}

.ai-research-notes ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #71664f;
  font-size: 10px;
  line-height: 1.65;
}

.ai-raw-result {
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.ai-raw-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8faf7;
}

.ai-raw-result-head strong,
.ai-raw-result-head span {
  display: block;
}

.ai-raw-result-head strong {
  font-size: 11.5px;
}

.ai-raw-result-head span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.ai-raw-result pre {
  max-height: 620px;
  margin: 0;
  padding: 16px;
  color: #304139;
  background: #fff;
  font-family: "Consolas", "Microsoft YaHei UI", monospace;
  font-size: 10.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow: auto;
}

@media (max-width: 1120px) {
  .ai-workbench {
    grid-template-columns: 1fr;
  }

  .ai-prompt-body textarea {
    min-height: 300px;
  }

  .ai-company-grid {
    grid-template-columns: 1fr;
  }

  .ai-product-link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .ai-research-layout {
    grid-template-columns: 1fr;
  }

  .ai-company-contact-grid.is-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ai-product-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-product-context p {
    max-width: 100%;
  }

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

  .ai-run-detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .ai-page-heading {
    align-items: flex-start;
  }

  .ai-safety-chip {
    white-space: normal;
  }

  .ai-mode-tabs {
    grid-template-columns: 1fr;
  }

  .ai-option-grid,
  .ai-product-link-grid,
  .ai-product-details,
  .ai-contact-company-channels,
  .ai-run-detail-meta {
    grid-template-columns: 1fr;
  }

  .ai-product-details .span-2 {
    grid-column: span 1;
  }

  .ai-product-company-main {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .ai-product-fit {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid #e8ede9;
    text-align: left;
  }

  .ai-product-fit strong,
  .ai-product-fit span {
    display: inline;
  }

  .ai-deep-research-bar,
  .ai-run-row,
  .ai-contact-research-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-deep-research-bar .primary-button,
  .ai-run-actions {
    width: 100%;
  }

  .ai-run-row {
    display: flex;
  }

  .ai-run-actions button {
    flex: 1;
  }

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

  .ai-model-selector-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-form-grid {
    grid-template-columns: 1fr;
  }

  .ai-form-grid .span-2 {
    grid-column: span 1;
  }

  .ai-builder-footer,
  .ai-result-summary,
  .ai-raw-result-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-builder-footer button,
  .ai-result-actions button {
    width: 100%;
  }

  .ai-result-actions {
    width: 100%;
    flex-direction: column;
  }

  .ai-company-facts,
  .ai-research-facts,
  .ai-contact-grid,
  .ai-contact-facts,
  .ai-company-contact-grid,
  .ai-company-contact-grid.is-three {
    grid-template-columns: 1fr;
  }

  .ai-company-facts > div:first-child,
  .ai-research-facts .span-2 {
    grid-column: span 1;
  }

  .ai-contact-head {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .ai-contact-head .ai-verification-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .ai-company-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-company-footer-actions,
  .ai-contact-company-actions {
    width: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .ai-history-context {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .ai-history-context .text-button {
    grid-column: 2;
    justify-self: start;
  }
}

/* GEO optimization */
.geo-page {
  --geo-blue: #1f6178;
  --geo-blue-soft: #e9f3f7;
  --geo-gold: #b97927;
  --geo-green: #39765e;
}

.geo-page-heading {
  align-items: center;
}

.geo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--geo-blue);
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
}

.geo-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.geo-tabs button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 74px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #d7e1dc;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 2px 8px rgba(24, 48, 38, .035);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.geo-tabs button:hover {
  border-color: #8ca89b;
  box-shadow: 0 7px 20px rgba(24, 48, 38, .09);
  transform: translateY(-1px);
}

.geo-tabs button.active {
  color: #fff;
  border-color: #255d54;
  background: #255d54;
  box-shadow: 0 8px 22px rgba(24, 62, 53, .18);
}

.geo-tab-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  color: var(--geo-blue);
  background: var(--geo-blue-soft);
}

.geo-tabs button.active .geo-tab-icon {
  color: #255d54;
  background: #fff;
}

.geo-tabs button > span:nth-child(2) {
  min-width: 0;
}

.geo-tabs strong,
.geo-tabs small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-tabs strong {
  font-size: 11.5px;
}

.geo-tabs small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.geo-tabs button.active small {
  color: #c6dad3;
}

.geo-tabs em {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  border-radius: 4px;
  color: #fff;
  background: #d77a4f;
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.geo-kpi-grid,
.geo-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.geo-skeleton {
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(100deg, #f2f5f2 25%, #f8faf8 45%, #f2f5f2 65%);
  background-size: 220% 100%;
  animation: geo-shimmer 1.2s linear infinite;
}

@keyframes geo-shimmer {
  to { background-position: -220% 0; }
}

.geo-kpi-card {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.geo-kpi-card > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.geo-kpi-card > span svg {
  color: var(--geo-blue);
}

.geo-kpi-card > strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 25px;
  line-height: 1;
}

.geo-kpi-card > small {
  display: block;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.geo-kpi-card.is-warning {
  background: #fff9f6;
}

.geo-kpi-card.is-warning > strong {
  color: #a34b38;
}

.geo-kpi-card.is-success {
  background: #f7fbf8;
}

.geo-kpi-card.is-success > strong {
  color: #34725a;
}

.geo-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 14px;
  margin-bottom: 14px;
}

.geo-panel-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--geo-blue);
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
}

.geo-next-list,
.geo-ai-mini-list,
.geo-campaign-progress-list {
  display: grid;
}

.geo-next-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 14px;
  border: 0;
  border-top: 1px solid #e8ede9;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.geo-next-row:hover,
.geo-progress-row:hover {
  background: #f8fbf9;
}

.geo-next-date {
  color: #41665a;
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
}

.geo-next-date.is-overdue {
  color: #a34838;
}

.geo-next-copy {
  min-width: 0;
}

.geo-next-copy strong,
.geo-next-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-next-copy strong {
  font-size: 10.5px;
}

.geo-next-copy small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.geo-empty-inline {
  display: flex;
  min-height: 110px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--ink-faint);
  font-size: 10px;
}

.geo-ai-mini-list {
  padding: 5px 15px 10px;
}

.geo-ai-mini-list > div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid #e9eeea;
}

.geo-ai-mini-list > div:last-child {
  border-bottom: 0;
}

.geo-ai-mini-list i {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--geo-ai-color);
}

.geo-ai-mini-list strong,
.geo-ai-mini-list small {
  display: block;
}

.geo-ai-mini-list strong {
  font-size: 10.5px;
}

.geo-ai-mini-list small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.geo-progress-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.1fr) minmax(120px, .8fr) 42px 16px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 15px;
  border: 0;
  border-top: 1px solid #e8ede9;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.geo-progress-row > span:first-child strong,
.geo-progress-row > span:first-child small {
  display: block;
}

.geo-progress-row > span:first-child strong {
  font-size: 10.5px;
}

.geo-progress-row > span:first-child small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.geo-progress-track,
.geo-campaign-progress > span {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee9;
}

.geo-progress-track i,
.geo-campaign-progress i {
  display: block;
  width: var(--progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #317965, #76a990);
}

.geo-progress-row em {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-style: normal;
  text-align: right;
}

.geo-strategy-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid #d8e4de;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(236, 246, 242, .95), rgba(242, 247, 250, .95)),
    #f7faf8;
}

.geo-strategy-intro h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.geo-strategy-intro p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.65;
}

.geo-principles {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.geo-principles span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #cfe0d7;
  border-radius: 4px;
  color: #386653;
  background: rgba(255, 255, 255, .7);
  font-size: 8.5px;
  font-weight: 700;
}

.geo-ai-target-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 14px;
}

.geo-ai-target-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dbe4df;
  border-top: 3px solid var(--geo-ai-color);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(24, 48, 38, .04);
}

.geo-ai-target-head {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.geo-ai-target-head > span {
  color: var(--geo-ai-color);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.geo-ai-target-card h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.geo-ai-target-card > p {
  min-height: 48px;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.6;
}

.geo-ai-target-card ul {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 11px 0;
  border-top: 1px solid #edf1ee;
  border-bottom: 1px solid #edf1ee;
  list-style: none;
}

.geo-ai-target-card li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.geo-ai-target-card li svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--geo-ai-color);
}

.geo-ai-channel-list,
.geo-campaign-ai-list,
.geo-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.geo-ai-channel-list {
  margin-top: 10px;
}

.geo-ai-target-card > .text-button {
  margin-top: 10px;
  color: var(--geo-ai-color);
  font-size: 9px;
}

.geo-channel-chip,
.geo-ai-chip {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.geo-channel-chip {
  color: #52645b;
  background: #eff3f0;
}

.geo-channel-chip svg {
  width: 12px;
  height: 12px;
}

.geo-ai-chip {
  color: var(--geo-ai-color);
  background: var(--geo-ai-soft);
}

.geo-playbook-section {
  margin-top: 14px;
}

.geo-playbook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: #f8faf8;
}

.geo-playbook-grid > article {
  padding: 13px;
  border: 1px solid #dfe7e2;
  border-radius: 7px;
  background: #fff;
}

.geo-playbook-grid > article > span {
  color: var(--geo-blue);
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
}

.geo-playbook-grid h4 {
  margin: 6px 0 0;
  font-size: 12px;
}

.geo-playbook-grid p {
  min-height: 49px;
  margin: 6px 0 10px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.55;
}

.geo-policy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #e4dfd1;
  border-radius: 6px;
  color: #6d5d36;
  background: #fffaf0;
  font-size: 9px;
  line-height: 1.55;
}

.geo-policy-note svg {
  flex: 0 0 auto;
}

.geo-campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 14px;
  background: #f8faf8;
}

.geo-campaign-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
}

.geo-campaign-card.status-completed {
  border-color: #c7ddd2;
  background: #fbfdfb;
}

.geo-campaign-card.status-paused {
  opacity: .78;
}

.geo-campaign-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.geo-campaign-status {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  color: #416653;
  background: #e9f3ed;
  font-size: 8px;
  font-weight: 700;
}

.geo-campaign-card h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 15px;
}

.geo-campaign-card > p {
  min-height: 44px;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.55;
}

.geo-campaign-ai-list {
  margin-top: 10px;
}

.geo-campaign-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 11px 0 0;
}

.geo-campaign-card dl > div {
  padding: 8px 9px;
  border-radius: 5px;
  background: #f7f9f7;
}

.geo-campaign-card dt {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 600;
}

.geo-campaign-card dd {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.geo-campaign-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 11px;
}

.geo-campaign-progress em {
  color: var(--ink-soft);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
  font-style: normal;
}

.geo-campaign-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #edf1ee;
}

.geo-task-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.geo-task-kpis > div {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.geo-task-kpis > div:last-child {
  border-right: 0;
}

.geo-task-kpis > div.is-overdue {
  background: #fff7f4;
}

.geo-task-kpis span,
.geo-task-kpis strong {
  display: block;
}

.geo-task-kpis span {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
}

.geo-task-kpis strong {
  margin-top: 4px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 22px;
}

.geo-task-kpis .is-overdue strong {
  color: #a34434;
}

.geo-task-toolbar {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
}

.geo-task-toolbar > div {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.geo-task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.geo-task-filters button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe4de;
  border-radius: 4px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.geo-task-filters button.active {
  border-color: #255d54;
  color: #fff;
  background: #255d54;
}

.geo-active-filter {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #d7e3dc;
  border-radius: 4px;
  color: #386553;
  background: #f0f7f3;
  font-size: 8.5px;
  cursor: pointer;
}

.geo-scope-note {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.geo-task-list {
  display: grid;
  gap: 9px;
  padding: 13px;
  background: #f7f9f7;
}

.geo-task-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
}

.geo-task-card.is-overdue {
  border-color: #e4b8ad;
  background: #fffdfc;
}

.geo-task-card-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.geo-task-priority {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  color: #5d675f;
  background: #eef1ee;
  font-size: 8px;
  font-weight: 700;
}

.geo-task-priority.priority-high {
  color: #8c3f30;
  background: #f9e9e4;
}

.geo-task-priority.priority-low {
  color: #607467;
  background: #edf3ef;
}

.geo-task-copy {
  min-width: 0;
  flex: 1;
}

.geo-task-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.4;
}

.geo-task-copy p {
  margin: 4px 0 0;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.geo-task-status {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 23px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  color: #5e6961;
  background: #edf0ed;
  font-size: 8.5px;
  font-weight: 700;
}

.geo-task-status.status-in_progress,
.geo-task-status.status-review {
  color: #765a1d;
  background: #fbf1d8;
}

.geo-task-status.status-published {
  color: #2d694f;
  background: #e5f3eb;
}

.geo-task-status.status-blocked,
.geo-task-status.status-cancelled {
  color: #8d4337;
  background: #f8e9e6;
}

.geo-task-tags {
  margin-top: 9px;
}

.geo-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 14px;
  margin-top: 9px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.geo-task-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.geo-task-meta .is-overdue {
  color: #9d4334;
  font-weight: 700;
}

.geo-task-description {
  margin: 9px 0 0;
  padding: 8px 9px;
  border-radius: 5px;
  color: var(--ink-soft);
  background: #f7f9f7;
  font-size: 9px;
  line-height: 1.55;
}

.geo-task-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #edf1ee;
}

.geo-empty-state {
  min-height: 280px;
}

.geo-modal-section-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.geo-modal-section-title strong {
  font-size: 12px;
}

.geo-modal-section-title span {
  color: var(--ink-faint);
  font-size: 9px;
}

.geo-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.geo-selector-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.geo-selector-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.geo-selector-option > span {
  display: grid;
  min-height: 62px;
  grid-template-columns: 12px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid #dce5df;
  border-radius: 6px;
  background: #fff;
}

.geo-selector-option i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--geo-ai-color);
}

.geo-selector-option strong,
.geo-selector-option small {
  display: block;
  min-width: 0;
}

.geo-selector-option strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.geo-selector-option small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.geo-selector-option > span > svg {
  color: var(--geo-ai-color);
  opacity: 0;
}

.geo-selector-option input:checked + span {
  border-color: var(--geo-ai-color);
  background: var(--geo-ai-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--geo-ai-color) 18%, transparent);
}

.geo-selector-option input:checked + span > svg {
  opacity: 1;
}

.geo-selector-option input:disabled + span {
  opacity: .72;
  cursor: default;
}

.geo-selector-option input:focus-visible + span {
  outline: 2px solid #255d54;
  outline-offset: 2px;
}

.geo-modal-notes {
  margin-top: 13px;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.45;
}

@media (max-width: 1240px) {
  .geo-ai-target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .geo-overview-grid {
    grid-template-columns: 1fr;
  }

  .geo-strategy-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .geo-principles {
    justify-content: flex-start;
  }

  .geo-campaign-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 700px) {
  .geo-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .geo-page-heading > .primary-button {
    width: 100%;
  }

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

  .geo-tabs button {
    min-height: 66px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    padding: 8px;
  }

  .geo-tab-icon {
    width: 30px;
    height: 30px;
  }

  .geo-tabs strong {
    font-size: 10px;
  }

  .geo-tabs small {
    display: none;
  }

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

  .geo-kpi-card {
    min-height: 120px;
  }

  .geo-next-row {
    grid-template-columns: 72px minmax(0, 1fr) auto;
  }

  .geo-next-row > svg {
    display: none;
  }

  .geo-progress-row {
    grid-template-columns: minmax(0, 1fr) 42px 14px;
  }

  .geo-progress-row .geo-progress-track {
    grid-column: 1 / -1;
  }

  .geo-ai-target-grid,
  .geo-playbook-grid {
    grid-template-columns: 1fr;
  }

  .geo-campaign-grid {
    padding: 10px;
  }

  .geo-campaign-card dl {
    grid-template-columns: 1fr;
  }

  .geo-campaign-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .geo-campaign-actions button {
    width: 100%;
  }

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

  .geo-task-kpis > div:nth-child(2) {
    border-right: 0;
  }

  .geo-task-kpis > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .geo-task-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .geo-task-toolbar > div {
    align-items: stretch;
    flex-direction: column;
  }

  .geo-task-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-task-filters button {
    width: 100%;
  }

  .geo-task-card-main {
    flex-wrap: wrap;
  }

  .geo-task-copy {
    flex-basis: calc(100% - 100px);
  }

  .geo-task-actions .primary-button {
    width: 100%;
  }

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

/* Social operations */
.social-page {
  --social-blue: #245b74;
  --social-blue-soft: #eaf3f6;
  --social-plum: #8d3f69;
  --social-plum-soft: #f9edf4;
}

.social-page-heading {
  align-items: center;
}

.social-page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  color: var(--social-blue);
  font-family: "Consolas", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
}

.social-week-control {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.social-week-control label {
  position: relative;
  min-width: 205px;
  padding: 4px 9px;
  text-align: center;
  cursor: pointer;
}

.social-week-control label span {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.social-week-control label input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.social-loading-grid,
.social-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.social-skeleton-card {
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.social-skeleton-card span,
.social-skeleton-card strong,
.social-skeleton-card small {
  display: block;
  border-radius: 4px;
  background: #edf1ee;
  animation: social-pulse 1.1s ease-in-out infinite alternate;
}

.social-skeleton-card span {
  width: 32px;
  height: 32px;
}

.social-skeleton-card strong {
  width: 52%;
  height: 24px;
  margin-top: 16px;
}

.social-skeleton-card small {
  width: 74%;
  height: 10px;
  margin-top: 12px;
}

@keyframes social-pulse {
  from { opacity: .48; }
  to { opacity: 1; }
}

.social-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.social-tabs button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 72px;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid #d8e1dc;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  box-shadow: 0 2px 8px rgba(24, 48, 38, .035);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.social-tabs button:hover {
  border-color: #8fa89d;
  background: #f8fbf9;
  box-shadow: 0 7px 20px rgba(24, 48, 38, .09);
  transform: translateY(-1px);
}

.social-tabs button.active {
  color: #fff;
  border-color: var(--pine);
  background: var(--pine);
  box-shadow: 0 8px 22px rgba(24, 62, 53, .18);
}

.social-tab-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  color: var(--social-blue);
  background: var(--social-blue-soft);
  transition: color .15s ease, background .15s ease;
}

.social-tabs button.active .social-tab-icon {
  color: var(--pine);
  background: #e7f2ec;
}

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

.social-tab-copy {
  min-width: 0;
}

.social-tab-copy strong,
.social-tab-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-tab-copy strong {
  font-size: 11.5px;
  font-weight: 750;
}

.social-tab-copy small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8.5px;
  font-weight: 500;
}

.social-tabs button.active .social-tab-copy small {
  color: #c3d6cd;
}

.social-tab-arrow {
  color: #91a098;
  opacity: .75;
}

.social-tabs button.active .social-tab-arrow {
  color: #e4bd64;
  opacity: 1;
}

.social-tab-arrow svg {
  width: 14px;
  height: 14px;
}

.social-trend-panel {
  margin-bottom: 14px;
  overflow: visible;
}

.social-trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e7ece8;
}

.social-trend-head h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.social-trend-demo-badge {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid #dfc98d;
  border-radius: 4px;
  color: #7b5c18;
  background: #fff5d8;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  vertical-align: 2px;
}

.social-trend-head p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.social-trend-latest {
  flex: 0 0 auto;
  text-align: right;
}

.social-trend-latest span,
.social-trend-latest strong,
.social-trend-latest small {
  display: block;
}

.social-trend-latest span {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-trend-latest strong {
  margin-top: 3px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 22px;
  line-height: 1.15;
}

.social-trend-latest small {
  margin-top: 3px;
  color: #287053;
  font-size: 8.5px;
  font-weight: 700;
}

.social-trend-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid #dce4df;
  border-radius: 5px;
  background: #f7f9f7;
}

.social-trend-view-switch button {
  min-height: 29px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 8.5px;
  font-weight: 650;
  cursor: pointer;
}

.social-trend-view-switch button.active {
  color: #fff;
  background: var(--pine);
}

.social-trend-view-switch button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.social-trend-series-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px 0;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-trend-series-bar .text-button {
  font-size: 8.5px;
}

.social-trend-axis-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 5px 14px 0;
  padding: 7px 9px;
  border: 1px solid #dbe7e1;
  border-radius: 5px;
  color: #4f655b;
  background: #f4f8f5;
  font-size: 8.5px;
  line-height: 1.5;
}

.social-trend-axis-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #2f725e;
}

.social-trend-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 14px 5px;
}

.social-trend-metrics button {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #dfe7e2;
  border-radius: 4px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 8.5px;
  cursor: pointer;
}

.social-trend-metrics button i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--trend-color);
}

.social-trend-metrics button:hover {
  border-color: var(--trend-color);
}

.social-trend-metrics button.active {
  border-color: var(--trend-color);
  color: var(--trend-color);
  background: color-mix(in srgb, var(--trend-color) 8%, white);
  font-weight: 700;
}

.social-trend-metrics button.is-muted {
  color: #9ba69f;
  background: #f7f8f7;
  opacity: .65;
}

.social-trend-metrics button.is-muted i {
  opacity: .35;
}

.social-trend-chart {
  position: relative;
  padding: 4px 12px 10px;
}

.social-trend-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 220px;
  overflow: visible;
}

.social-trend-grid {
  stroke: #e8ede9;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.social-trend-baseline {
  stroke: #cfd9d3;
  stroke-width: 1;
}

.social-trend-axis-label {
  fill: #7d8b83;
  font-family: var(--font);
  font-size: 9px;
}

.social-trend-line {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-trend-point circle:first-child {
  fill: #fff;
  stroke: var(--series-color);
  stroke-width: 2;
}

.social-trend-point {
  cursor: crosshair;
}

.social-trend-hit {
  fill: transparent;
}

.social-trend-point:hover circle:first-child {
  r: 6;
  fill: var(--series-color);
}

.social-trend-tooltip {
  position: absolute;
  z-index: 20;
  width: 340px;
  padding: 12px;
  border: 1px solid #cfdad3;
  border-radius: 7px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 14px 38px rgba(20, 42, 32, .18);
  pointer-events: none;
}

.social-trend-tooltip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #e5ebe7;
}

.social-trend-tooltip-head span,
.social-trend-tooltip-head strong {
  display: block;
}

.social-trend-tooltip-head span {
  color: var(--ink-faint);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
}

.social-trend-tooltip-head strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 12px;
}

.social-trend-tooltip-head > small {
  flex: 0 0 auto;
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
}

.social-trend-tooltip-axis {
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid #d9e5df;
  border-radius: 4px;
  color: #49675a;
  background: #f3f8f5;
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
}

.social-trend-tooltip-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.social-trend-tooltip-channel-title {
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 700;
}

.social-trend-tooltip-list > div {
  display: grid;
  grid-template-columns: minmax(95px, 1fr) auto 74px;
  align-items: center;
  gap: 8px;
}

.social-trend-tooltip-list .social-platform-badge {
  font-size: 8.5px;
}

.social-trend-tooltip-list > div > strong {
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 9px;
  text-align: right;
}

.social-trend-tooltip-list > div > small {
  font-family: "Consolas", monospace;
  font-size: 7.5px;
  text-align: right;
}

.social-trend-tooltip .up,
.social-trend-tooltip-head .up {
  color: #287053;
}

.social-trend-tooltip .down,
.social-trend-tooltip-head .down {
  color: #a9342b;
}

.social-trend-tooltip .flat,
.social-trend-tooltip-head .flat {
  color: #7b8780;
}

.social-trend-tooltip-demo {
  margin-top: 9px;
  padding-top: 7px;
  border-top: 1px solid #ebe1c5;
  color: #806422;
  font-size: 8px;
  text-align: right;
}

.social-trend-empty {
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--ink-faint);
}

.social-trend-empty svg {
  color: var(--social-blue);
}

.social-trend-empty strong,
.social-trend-empty span {
  display: block;
}

.social-trend-empty strong {
  color: var(--ink);
  font-size: 12px;
}

.social-trend-empty span {
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.5;
}

.social-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 14px;
}

.social-kpi-card {
  position: relative;
  min-width: 0;
  min-height: 145px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.social-kpi-card::after {
  position: absolute;
  right: -20px;
  bottom: -25px;
  width: 75px;
  height: 75px;
  border: 1px solid #edf2ee;
  border-radius: 50%;
  content: "";
}

.social-kpi-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 6px;
  color: var(--social-blue);
  background: var(--social-blue-soft);
}

.social-kpi-icon svg {
  width: 16px;
  height: 16px;
}

.social-kpi-label {
  display: block;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
}

.social-kpi-card > strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 21px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.social-kpi-card > small {
  display: block;
  margin-top: 4px;
  font-size: 8.5px;
  font-weight: 700;
}

.social-kpi-card > small.up {
  color: #287053;
}

.social-kpi-card > small.down {
  color: #a33d31;
}

.social-kpi-card > small.flat {
  color: #7f8c85;
}

.social-kpi-card > p {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.45;
}

.social-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr);
  gap: 14px;
  margin-bottom: 14px;
}

.social-overview-grid.lower {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
}

.social-platform-panel,
.social-report-preview,
.social-list-panel,
.social-report-editor,
.social-report-summary {
  min-width: 0;
}

.social-panel-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--social-blue);
  font-family: "Consolas", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
}

.social-muted {
  color: var(--ink-faint);
  font-size: 9px;
}

.social-platform-list {
  display: grid;
}

.social-platform-row {
  display: grid;
  grid-template-columns: 36px minmax(145px, 1.1fr) minmax(100px, .7fr) minmax(105px, .7fr) minmax(150px, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid #e9eeea;
}

.social-platform-row:last-child {
  border-bottom: 0;
}

.social-platform-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--platform-color);
}

.social-brand-svg {
  display: block;
  width: 19px;
  height: 19px;
  color: #fff;
}

.social-platform-name,
.social-platform-stat {
  min-width: 0;
}

.social-platform-name strong,
.social-platform-name small,
.social-platform-stat span,
.social-platform-stat strong,
.social-platform-stat small {
  display: block;
}

.social-platform-name strong {
  font-size: 11px;
}

.social-platform-name small,
.social-platform-stat span,
.social-platform-stat small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-platform-stat strong {
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 11px;
}

.social-platform-stat small.up {
  color: #287053;
}

.social-platform-stat small.down {
  color: #a33d31;
}

.social-report-preview {
  display: flex;
  flex-direction: column;
}

.social-report-preview-body {
  flex: 1;
  padding: 15px 17px;
}

.social-report-preview-body strong {
  display: block;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 9px;
}

.social-report-preview-body strong:first-child {
  margin-top: 0;
}

.social-report-preview-body p {
  display: -webkit-box;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 10.5px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.social-report-preview-body small {
  display: block;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-report-preview > .secondary-button {
  align-self: flex-end;
  margin: 0 16px 14px;
}

.social-empty-inline {
  display: flex;
  min-height: 100px;
  align-items: center;
  gap: 9px;
  padding: 14px;
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.55;
}

.social-empty-inline svg {
  flex: 0 0 auto;
  color: var(--social-blue);
}

.social-top-content-list {
  display: grid;
}

.social-top-content-row {
  display: grid;
  grid-template-columns: 29px 82px minmax(0, 1fr) 66px 55px 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 1px solid #e9eeea;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.social-top-content-row:last-child {
  border-bottom: 0;
}

.social-top-content-row:hover {
  background: #f8faf8;
}

.social-content-rank {
  color: #9aa59f;
  font-family: "Consolas", monospace;
  font-size: 9px;
}

.social-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
}

.social-platform-badge em {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--platform-color);
  font-style: normal;
}

.social-platform-badge.is-compact em {
  width: 23px;
  height: 23px;
}

.social-platform-badge em .social-brand-svg {
  width: 15px;
  height: 15px;
}

.social-platform-badge.is-compact em .social-brand-svg {
  width: 14px;
  height: 14px;
}

.platform-instagram {
  background:
    radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%) !important;
}

.social-top-content-copy {
  min-width: 0;
}

.social-top-content-copy strong,
.social-top-content-copy small,
.social-top-content-stat strong,
.social-top-content-stat small {
  display: block;
}

.social-top-content-copy strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-top-content-copy small,
.social-top-content-stat small {
  margin-top: 2px;
  color: var(--ink-faint);
  font-size: 8px;
}

.social-top-content-stat {
  text-align: right;
}

.social-top-content-stat strong {
  font-family: "Consolas", monospace;
  font-size: 10px;
}

.social-lead-status-list {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.social-lead-status-list > div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 4px 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1ee;
  overflow: hidden;
}

.social-lead-status-list span {
  color: var(--ink-soft);
  font-size: 9.5px;
}

.social-lead-status-list strong {
  text-align: right;
  font-family: "Consolas", monospace;
  font-size: 11px;
}

.social-lead-status-list i {
  grid-column: 1 / -1;
  width: var(--width);
  height: 3px;
  border-radius: 999px;
  background: var(--social-blue);
}

.social-status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  color: #5c665f;
  background: #eef1ee;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.social-status-pill.status-submitted,
.social-status-pill.status-published,
.social-status-pill.status-measured,
.social-status-pill.status-converted,
.social-status-pill.status-qualified {
  color: #245c49;
  background: #e7f4ed;
}

.social-status-pill.status-planned,
.social-status-pill.status-contacted,
.social-status-pill.status-transferred,
.social-status-pill.status-new {
  color: #775b1c;
  background: #fbf2da;
}

.social-status-pill.status-draft {
  color: #5d5770;
  background: #f0edf5;
}

.social-status-pill.status-archived,
.social-status-pill.status-closed {
  color: #7b8580;
  background: #eef0ee;
}

.social-status-pill.status-approved,
.social-status-pill.status-ready {
  color: #245c49;
  background: #e7f4ed;
}

.social-status-pill.status-in_production {
  color: #895f16;
  background: #fff1cf;
}

.social-status-pill.status-planning {
  color: #315f78;
  background: #eaf3f8;
}

.social-status-pill.status-cancelled {
  color: #8b3f38;
  background: #f8e9e6;
}

.social-list-panel {
  overflow: hidden;
}

.social-content-viewbar {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 9px 10px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.social-content-subtabs {
  display: inline-flex;
  min-width: 0;
  gap: 5px;
  padding: 4px;
  border: 1px solid #dce4df;
  border-radius: 7px;
  background: #f6f8f6;
}

.social-content-subtabs button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.social-content-subtabs button:hover {
  color: var(--ink);
  background: #fff;
}

.social-content-subtabs button.active {
  color: #fff;
  background: var(--pine);
  box-shadow: 0 3px 9px rgba(24, 62, 53, .16);
}

.social-content-subtabs button svg {
  width: 16px;
  height: 16px;
}

.social-content-subtabs button strong {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--social-blue);
  background: var(--social-blue-soft);
  font-family: "Consolas", monospace;
  font-size: 8.5px;
}

.social-content-subtabs button.active strong {
  color: var(--pine);
  background: #fff;
}

.social-plan-panel {
  overflow: hidden;
}

.social-plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.social-plan-summary > div {
  position: relative;
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid var(--line);
}

.social-plan-summary > div:last-child {
  border-right: 0;
}

.social-plan-summary span,
.social-plan-summary strong,
.social-plan-summary small {
  display: block;
}

.social-plan-summary span {
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 700;
}

.social-plan-summary strong {
  margin-top: 4px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 23px;
  line-height: 1.15;
}

.social-plan-summary small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-task-panel {
  overflow: hidden;
}

.social-task-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.social-task-summary > div {
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid var(--line);
}

.social-task-summary > div:last-child {
  border-right: 0;
}

.social-task-summary > div.has-overdue {
  background: #fff7f4;
}

.social-task-summary span,
.social-task-summary strong,
.social-task-summary small {
  display: block;
}

.social-task-summary span {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
}

.social-task-summary strong {
  margin-top: 4px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 23px;
  line-height: 1.15;
}

.social-task-summary .has-overdue strong {
  color: #a34434;
}

.social-task-summary small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.social-task-toolbar {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
}

.social-task-toolbar > span {
  color: var(--ink-faint);
  font-size: 9.5px;
  text-align: right;
}

.social-task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.social-task-filters button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe4de;
  border-radius: 4px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.social-task-filters button:hover {
  border-color: #9eb3a7;
}

.social-task-filters button.active {
  border-color: var(--pine);
  color: #fff;
  background: var(--pine);
}

.social-task-list {
  display: grid;
  gap: 9px;
  padding: 13px;
  background: #f7f9f7;
}

.social-task-card {
  position: relative;
  min-width: 0;
  padding: 13px 14px 12px 16px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(24, 48, 38, .035);
}

.social-task-card::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #c28a31;
  content: "";
}

.social-task-card.is-overdue {
  border-color: #e5bcb3;
  background: #fffdfc;
}

.social-task-card.is-overdue::before {
  background: #b94b3c;
}

.social-task-card.is-published::before {
  background: #3b8064;
}

.social-task-main,
.social-task-schedule,
.social-task-footer,
.social-task-meta {
  display: flex;
  align-items: center;
}

.social-task-main {
  gap: 11px;
}

.social-task-copy {
  min-width: 0;
  flex: 1;
}

.social-task-copy strong,
.social-task-copy span {
  display: block;
}

.social-task-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-task-copy span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.social-task-schedule {
  gap: 6px;
  width: fit-content;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 4px;
  color: #385e53;
  background: #f2f7f4;
  font-family: "Consolas", monospace;
  font-size: 10px;
  font-weight: 700;
}

.social-task-schedule.is-overdue {
  color: #963f32;
  background: #faece8;
}

.social-task-schedule em {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  font-family: var(--font);
  font-style: normal;
}

.social-task-footer {
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #edf1ee;
}

.social-task-meta {
  min-width: 0;
  flex-wrap: wrap;
  gap: 6px 13px;
  color: var(--ink-faint);
  font-size: 9.5px;
}

.social-task-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.social-task-meta .ai-text-link {
  font-size: 9.5px;
}

.social-task-card .social-status-pill {
  min-height: 24px;
  font-size: 9.5px;
}

.social-task-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.social-task-modal-head h3 {
  margin: 10px 0 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.social-task-modal-head p {
  margin: 5px 0 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

.social-task-overdue-badge {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border-radius: 4px;
  color: #963f32;
  background: #faece8;
  font-size: 9px;
  font-weight: 700;
}

.social-task-form {
  margin-top: 15px;
}

.social-task-plan-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.social-task-plan-summary > div {
  padding: 10px 11px;
  border: 1px solid #e0e7e2;
  border-radius: 6px;
  background: #f8faf8;
}

.social-task-plan-summary span,
.social-task-plan-summary strong {
  display: block;
}

.social-task-plan-summary span {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-task-plan-summary strong {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 10.5px;
}

.social-task-notes-field {
  margin-top: 13px;
}

.social-task-notes {
  min-height: 100px;
  max-height: 260px;
  overflow: auto;
  padding: 11px 12px;
  border: 1px solid #dfe7e2;
  border-radius: 6px;
  color: var(--ink-soft);
  background: #fafcfa;
  font-size: 9.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.social-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: #f7f9f7;
}

.social-plan-card {
  position: relative;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(24, 48, 38, .04);
}

.social-plan-card::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #8fa199;
  content: "";
}

.social-plan-card.status-ready::before,
.social-plan-card.status-approved::before {
  background: #3b8064;
}

.social-plan-card.status-in_production::before {
  background: #c08528;
}

.social-plan-card.status-cancelled::before {
  background: #a95a4f;
}

.social-plan-card.is-overdue {
  border-color: #dfb3a9;
}

.social-plan-card-top,
.social-plan-schedule,
.social-plan-card-footer,
.social-plan-card-footer > div,
.social-plan-actions {
  display: flex;
  align-items: center;
}

.social-plan-card-top {
  justify-content: space-between;
  gap: 10px;
}

.social-plan-schedule {
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px;
}

.social-plan-schedule > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #385e53;
  font-family: "Consolas", monospace;
  font-size: 9.5px;
  font-weight: 700;
}

.social-plan-priority {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border-radius: 4px;
  color: #6a756e;
  background: #eef1ee;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.social-plan-priority.priority-high {
  color: #8f3c2f;
  background: #f9e9e4;
}

.social-plan-priority.priority-low {
  color: #607467;
  background: #edf3ef;
}

.social-plan-card h3 {
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.social-plan-copy {
  display: -webkit-box;
  min-height: 45px;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.social-plan-channels {
  display: flex;
  min-height: 34px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin-top: 11px;
  padding: 8px 0;
  border-top: 1px solid #edf1ee;
  border-bottom: 1px solid #edf1ee;
}

.social-plan-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 11px 0 0;
}

.social-plan-details > div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 5px;
  background: #f7f9f7;
}

.social-plan-details dt {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 600;
}

.social-plan-details dd {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.social-plan-card-footer {
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #edf1ee;
}

.social-plan-card-footer > div {
  min-width: 0;
  flex-wrap: wrap;
  gap: 7px 10px;
}

.social-plan-card-footer .ai-text-link {
  font-size: 8.5px;
}

.social-plan-converted,
.social-plan-late {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5px;
  font-weight: 700;
}

.social-plan-converted {
  color: #287053;
}

.social-plan-late {
  color: #9b4a38;
}

.social-plan-actions {
  flex: 0 0 auto;
  gap: 7px;
}

.social-plan-channel-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.social-plan-channel-option {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.social-plan-channel-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.social-plan-channel-box {
  display: grid;
  min-height: 72px;
  grid-template-columns: 29px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid #dce5df;
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.social-plan-channel-box em {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 5px;
  color: #fff;
  background: var(--platform-color);
}

.social-plan-channel-box em .social-brand-svg {
  width: 17px;
  height: 17px;
}

.social-plan-channel-box strong {
  min-width: 0;
  overflow: hidden;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-plan-channel-box > svg {
  color: #3b8064;
  opacity: 0;
}

.social-plan-channel-option input:checked + .social-plan-channel-box {
  border-color: var(--platform-color);
  background: color-mix(in srgb, var(--platform-soft) 78%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--platform-color) 20%, transparent);
}

.social-plan-channel-option input:checked + .social-plan-channel-box > svg {
  opacity: 1;
}

.social-plan-channel-option input:focus-visible + .social-plan-channel-box {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.social-plan-form-grid {
  margin-top: 16px;
}

.social-plan-sync-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 15px;
  padding: 10px 12px;
  border: 1px solid #d9e5df;
  border-radius: 6px;
  color: #426459;
  background: #f3f8f5;
  font-size: 9.5px;
  line-height: 1.55;
}

.social-plan-sync-note svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.social-plan-readonly {
  display: grid;
  gap: 16px;
}

.social-plan-readonly-head,
.social-plan-readonly-head > div,
.social-plan-readonly-channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.social-plan-readonly-head {
  justify-content: space-between;
}

.social-plan-readonly-channels {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.social-plan-readonly section h3 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 11px;
}

.social-plan-readonly-copy {
  min-height: 70px;
  padding: 12px;
  border: 1px solid #e0e7e2;
  border-radius: 6px;
  color: var(--ink-soft);
  background: #fafcfa;
  font-size: 10.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.social-plan-readonly-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.social-plan-readonly-details > div {
  padding: 10px 11px;
  border: 1px solid #e0e7e2;
  border-radius: 6px;
  background: #fff;
}

.social-plan-readonly-details dt {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-plan-readonly-details dd {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.social-plan-readonly-link {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
}

.social-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.social-toolbar h3 {
  margin: 2px 0 0;
  font-size: 14px;
}

.social-platform-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.social-platform-filters button {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid #dbe4de;
  border-radius: 4px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 9px;
  cursor: pointer;
}

.social-platform-filters button.active {
  border-color: var(--pine);
  color: #fff;
  background: var(--pine);
}

.social-content-table-wrap,
.social-metric-table-wrap {
  overflow-x: auto;
}

.social-content-table,
.social-metric-table {
  width: 100%;
  border-collapse: collapse;
}

.social-content-table {
  min-width: 1120px;
}

.social-metric-table {
  min-width: 960px;
}

.social-content-table th,
.social-metric-table th {
  padding: 10px 12px;
  color: #607068;
  background: #f5f8f5;
  font-size: 8.5px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.social-content-table td,
.social-metric-table td {
  padding: 12px;
  border-top: 1px solid #ebefec;
  color: var(--ink-soft);
  font-size: 9.5px;
  vertical-align: middle;
}

.social-content-table td > strong,
.social-content-table td > small,
.social-metric-table td > strong,
.social-metric-table td > small {
  display: block;
}

.social-content-table td > small,
.social-metric-table td > small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.social-content-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.social-content-title > div {
  min-width: 0;
}

.social-content-title strong {
  display: block;
  max-width: 340px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-content-title small {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.social-production-chip {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 4px;
  color: #5f4b78;
  background: #f1ecf6;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.social-empty-state {
  min-height: 300px;
}

.social-metric-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 11px 16px;
  border-top: 1px solid #e9eeea;
  color: var(--ink-faint);
  background: #fafcfa;
  font-size: 9px;
  line-height: 1.5;
}

.social-metric-note svg {
  flex: 0 0 auto;
}

.social-lead-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.social-lead-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dfe7e2;
  border-radius: 7px;
  background: #fff;
}

.social-lead-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.social-lead-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
}

.social-lead-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.social-lead-title p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-lead-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.social-lead-details > div {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e8ede9;
  border-radius: 5px;
  background: #fafcfa;
}

.social-lead-details span,
.social-lead-details strong {
  display: block;
}

.social-lead-details span {
  color: var(--ink-faint);
  font-size: 8px;
}

.social-lead-details strong {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.social-lead-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e8ede9;
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-lead-footer > span,
.social-lead-footer > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .65fr);
  gap: 14px;
}

.social-report-editor {
  min-width: 0;
}

.social-report-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.social-report-form textarea {
  min-height: 120px;
}

.social-report-form textarea[readonly] {
  color: var(--ink-soft);
  background: #f7f9f7;
}

.social-report-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid #e8ede9;
  background: #fafcfa;
}

.social-report-footer > span {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-report-footer > div {
  display: flex;
  gap: 8px;
}

.social-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.social-report-summary-grid > div {
  padding: 14px;
  border-right: 1px solid #e8ede9;
  border-bottom: 1px solid #e8ede9;
}

.social-report-summary-grid > div:nth-child(even) {
  border-right: 0;
}

.social-report-summary-grid span,
.social-report-summary-grid strong {
  display: block;
}

.social-report-summary-grid span {
  color: var(--ink-faint);
  font-size: 8.5px;
}

.social-report-summary-grid strong {
  margin-top: 6px;
  color: var(--ink);
  font-family: "Consolas", monospace;
  font-size: 18px;
}

.social-report-guidance {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 13px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

.social-report-guidance p {
  margin: 0;
}

.social-modal-section-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 20px 0 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.social-modal-section-title strong {
  color: var(--ink);
  font-size: 12px;
}

.social-modal-section-title span {
  color: var(--ink-faint);
  font-size: 9px;
}

.social-content-metrics-grid {
  margin-bottom: 14px;
}

.social-modal-full-field {
  margin-top: 14px;
}

@media (max-width: 1240px) {
  .social-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-plan-grid {
    grid-template-columns: 1fr;
  }

  .social-overview-grid,
  .social-overview-grid.lower {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .social-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .social-tabs button {
    grid-column: span 2;
  }

  .social-tabs button:nth-last-child(-n + 2) {
    grid-column: span 3;
  }

  .social-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .social-plan-summary > div:nth-child(2) {
    border-right: 0;
  }

  .social-task-summary > div:nth-child(2) {
    border-right: 0;
  }

  .social-plan-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .social-task-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .social-plan-channel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-week-control {
    align-self: stretch;
    justify-content: center;
  }

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

  .social-platform-row {
    grid-template-columns: 36px minmax(130px, 1fr) repeat(2, minmax(80px, .7fr));
  }

  .social-platform-row > :last-child {
    grid-column: 2 / -1;
  }

  .social-lead-list {
    grid-template-columns: 1fr;
  }

  .social-report-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .social-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-tabs button,
  .social-tabs button:nth-last-child(-n + 2) {
    grid-column: auto;
  }

  .social-tabs button:last-child {
    grid-column: 1 / -1;
  }

  .social-trend-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-content-viewbar {
    align-items: stretch;
    flex-direction: column;
  }

  .social-content-subtabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .social-content-subtabs button {
    justify-content: center;
    gap: 4px;
    padding: 0 5px;
    font-size: 10px;
    white-space: nowrap;
  }

  .social-content-subtabs button svg {
    display: none;
  }

  .social-content-viewbar > .primary-button {
    width: 100%;
  }

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

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

  .social-plan-summary > div,
  .social-plan-summary > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .social-task-summary > div,
  .social-task-summary > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .social-plan-summary > div:last-child {
    border-bottom: 0;
  }

  .social-task-summary > div:last-child {
    border-bottom: 0;
  }

  .social-task-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .social-task-toolbar > span {
    text-align: left;
  }

  .social-task-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-task-filters button {
    width: 100%;
  }

  .social-task-main {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .social-task-copy {
    flex-basis: calc(100% - 120px);
  }

  .social-task-schedule {
    width: 100%;
  }

  .social-task-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .social-task-footer .primary-button {
    width: 100%;
  }

  .social-task-plan-summary {
    grid-template-columns: 1fr;
  }

  .social-plan-details {
    grid-template-columns: 1fr;
  }

  .social-plan-readonly-details {
    grid-template-columns: 1fr;
  }

  .social-plan-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-plan-actions {
    width: 100%;
  }

  .social-plan-actions .secondary-button,
  .social-plan-actions .primary-button {
    flex: 1;
  }

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

  .social-trend-latest {
    text-align: left;
  }

  .social-trend-view-switch {
    width: 100%;
  }

  .social-trend-view-switch button {
    flex: 1;
  }

  .social-trend-chart {
    padding-right: 4px;
    padding-left: 4px;
    overflow-x: auto;
  }

  .social-trend-chart svg {
    min-width: 620px;
    min-height: 190px;
  }

  .social-kpi-grid,
  .social-loading-grid {
    grid-template-columns: 1fr;
  }

  .social-platform-row {
    grid-template-columns: 36px minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .social-platform-stat {
    grid-column: 2 / -1;
    padding-top: 7px;
    border-top: 1px solid #edf1ee;
  }

  .social-toolbar,
  .social-report-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .social-toolbar .primary-button,
  .social-report-footer .secondary-button,
  .social-report-footer .primary-button {
    width: 100%;
  }

  .social-platform-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .social-platform-filters button {
    width: 100%;
  }

  .social-top-content-row {
    grid-template-columns: 25px 68px minmax(0, 1fr) 18px;
  }

  .social-top-content-stat {
    grid-column: 3;
    text-align: left;
  }

  .social-top-content-row > svg {
    grid-column: 4;
    grid-row: 1 / span 3;
  }

  .social-lead-details,
  .social-report-summary-grid {
    grid-template-columns: 1fr;
  }

  .social-report-summary-grid > div {
    border-right: 0;
  }

  .social-lead-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .social-lead-footer > div {
    width: 100%;
  }

  .social-lead-footer .secondary-button {
    margin-left: auto;
  }
}

@media print {
  @page {
    size: A4;
    margin: 0;
  }

  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body > *:not(#print-surface) {
    display: none !important;
  }

  #print-surface {
    display: block !important;
  }

  #print-surface .doc-sheet {
    width: 210mm;
    min-height: 297mm;
    padding: 10mm 11mm 8mm;
    box-shadow: none;
    transform: none !important;
    break-inside: avoid;
  }

  #print-surface .doc-sheet.contract-document {
    break-inside: auto;
    page-break-inside: auto;
  }

  .contract-clause,
  .contract-product-table tr,
  .doc-lower-grid {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .doc-table {
    break-inside: auto;
  }

  .doc-table tr {
    break-inside: avoid;
  }
}
