:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #f5f7fc;
  color: #2b261f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

.app-header {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  background: #1f5d92;
  color: #fff;
  border-bottom: 1px solid #184d7d;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 248px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #0f3e68;
  font-weight: 800;
}

.brand span,
.side-heading span,
.field span,
.section-title {
  display: block;
  color: #6f7d8e;
  font-size: 12px;
  margin-top: 3px;
}

.brand span {
  color: #c8d9e8;
}

.ad-banner {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(15, 62, 104, 0.95), rgba(38, 119, 174, 0.78));
}

.ad-banner span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #dbeafe;
  font-size: 12px;
  white-space: nowrap;
}

.ad-banner strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-banner small {
  color: #c8d9e8;
  white-space: nowrap;
}

.language-toggle,
.logout-button {
  flex: 0 0 auto;
  min-width: 76px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.language-toggle:hover,
.logout-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

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

.app-shell.home-mode .sidebar {
  display: none;
}

body[data-app-domain="platform"] .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-app-domain="platform"] .sidebar,
body[data-app-domain="home"] .sidebar {
  display: none;
}

body[data-app-domain="home"] .app-shell {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  background: #f7f9fb;
  color: #263242;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid #d3dbe5;
  overflow: auto;
}

.side-heading {
  padding-bottom: 12px;
  border-bottom: 1px solid #d3dbe5;
}

.side-heading strong {
  font-size: 18px;
}

.side-subtitle {
  color: #44546a;
  font-size: 13px;
  font-weight: 800;
  margin: 6px 0 8px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-hint {
  color: #7b8794;
  font-size: 11px;
  line-height: 1.35;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid #cfdae6;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: #17212f;
}

.sidebar select {
  border-color: #cfdae6;
  background: #fff;
  color: #17212f;
}

.primary-button,
.secondary-button,
.tab-button,
.shipment-card {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.primary-button {
  background: #1f5d92;
  color: #fff;
  padding: 12px 14px;
  font-weight: 700;
}

.secondary-button {
  background: #e4ebf2;
  color: #25364a;
  padding: 10px 13px;
  font-weight: 700;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.secondary-link {
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #e4ebf2;
  color: #25364a;
  padding: 10px 13px;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.query-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d3dbe5;
  border-radius: 6px;
  background: #fff;
}

.section-title {
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.shipment-list {
  display: grid;
  gap: 10px;
  overflow: auto;
}

.shipment-card {
  text-align: left;
  padding: 13px;
  background: #fff;
  color: #263242;
  border: 1px solid #d7e0ea;
}

.shipment-card.is-active {
  border-color: #1f5d92;
  background: #eef6fc;
}

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

.shipment-card span {
  color: #6f7d8e;
  font-size: 12px;
  margin-top: 6px;
}

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

.topbar {
  min-height: 66px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border-bottom: 1px solid #dce4ec;
}

.topbar-title {
  min-width: 0;
}

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

.tenant-name,
.page-path,
.context-badge {
  color: #637083;
  font-size: 13px;
}

.page-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 0;
}

.page-path span:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: #a0adbb;
}

h1 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

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

.page-action-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--wf-line, #d9e2ea);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(48, 38, 28, 0.06);
}

.page-action-toolbar.is-muted {
  opacity: 0.72;
}

.toolbar-button {
  border: 0;
  border-radius: 9px;
  padding: 7px 10px;
  background: transparent;
  color: var(--wf-text, #25364a);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.toolbar-button:hover:not(:disabled) {
  background: var(--wf-surface-muted, #f1ece5);
}

.toolbar-button.primary-action {
  background: var(--wf-accent, #6f533c);
  color: #fff;
}

.toolbar-button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

@media (max-width: 980px) {
  .name-fields-row,
  .name-fields-row.two-columns {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }
}

.context-badge {
  border: 1px solid #d6e0ea;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f7f9fb;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 2px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #dce4ec;
  overflow-x: auto;
}

.tabs.is-hidden {
  display: none;
}

.tab-button {
  border-radius: 0;
  padding: 11px 12px;
  background: transparent;
  color: #526173;
  border-bottom: 3px solid transparent;
}

.tab-button.is-active {
  color: #122033;
  border-bottom-color: #1f5d92;
  font-weight: 700;
}

.workspace {
  padding: 14px 18px 20px;
  overflow: auto;
}

.panel {
  background: #fff;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 16px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.form-grid .field-short {
  grid-column: span 1;
}

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

.form-grid .field-long,
.form-grid .field-textarea {
  grid-column: 1 / -1;
}

.field-textarea textarea {
  min-height: 58px;
  resize: vertical;
}

.readonly-value {
  align-content: end;
}

.readonly-value strong {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.name-fields-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 132px));
  gap: 8px;
  align-items: end;
}

.name-fields-row.two-columns {
  grid-template-columns: repeat(2, minmax(120px, 168px));
}

.name-fields-row .field input {
  min-width: 0;
}

@media (max-width: 980px) {
  .name-fields-row,
  .name-fields-row.two-columns {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }
}

.container-rows {
  display: grid;
  gap: 10px;
}

.container-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
}

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

.subsection-title {
  grid-column: 1 / -1;
  padding: 8px 0 2px;
  color: #1f5d92;
  font-weight: 700;
  border-bottom: 1px solid #e1e7ef;
}

.chat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
}

.chat-list,
.message-list {
  display: grid;
  gap: 8px;
}

.chat-item {
  border: 1px solid #d7e0ea;
  border-radius: 6px;
  padding: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.message {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f9fb;
}

.message strong {
  display: block;
  margin-bottom: 5px;
  color: #1f5d92;
}

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

.workbench-card {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
  color: #263242;
  text-align: left;
}

button.workbench-card {
  cursor: pointer;
}

a.workbench-card {
  text-decoration: none;
}

.workbench-card:hover {
  border-color: #8fb7dd;
  box-shadow: 0 8px 20px rgba(31, 93, 146, 0.08);
}

.workbench-card span {
  color: #1f5d92;
  font-size: 14px;
  font-weight: 700;
}

.workbench-card strong {
  font-size: 19px;
}

.workbench-card small {
  color: #6f7d8e;
  line-height: 1.5;
}

.home-card {
  min-height: 0;
}

.public-home {
  display: grid;
  gap: 14px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(31, 93, 146, 0.16);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 16%, rgba(31, 93, 146, 0.12), transparent 30%),
    linear-gradient(135deg, #fffdf8 0%, #f5f9fc 58%, #eef6fb 100%);
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 4px 8px;
  border: 1px solid rgba(31, 93, 146, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #1f5d92;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.landing-hero h2,
.product-overview-card h3 {
  margin: 0 0 8px;
  color: #223044;
}

.landing-hero h2 {
  font-size: 26px;
}

.version-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(31, 93, 146, 0.1);
  color: #1f5d92;
  font-size: 12px;
  font-weight: 800;
}

.landing-hero p {
  max-width: 820px;
  margin: 0;
  color: #59697c;
  line-height: 1.7;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: stretch;
}

.hero-metrics div {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 84px;
  padding: 12px;
  border: 1px solid rgba(31, 93, 146, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-metrics strong {
  color: #1f5d92;
  font-size: 24px;
}

.hero-metrics span,
.feature-card span,
.onboarding-step span,
.landing-note span {
  color: #657386;
  line-height: 1.55;
}

.auth-portal-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
}

.auth-stack,
.account-onboarding,
.onboarding-steps {
  display: grid;
  gap: 12px;
}

.register-entry-card {
  border-color: rgba(55, 118, 255, 0.24);
  background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
}

.register-cta {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.register-request-form {
  margin-top: 10px;
}

.password-rule-hint {
  color: #6b7280;
  font-size: 12px;
}

.verification-result {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #bfe3ce;
  border-radius: 12px;
  background: #f0fdf4;
}

.verification-result a {
  color: #0f5f9f;
  font-weight: 700;
  word-break: break-all;
}

.verification-result small,
.verification-result span {
  color: #536579;
}

.product-overview-card,
.landing-note,
.feature-card {
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: #fff;
}

.product-overview-card {
  padding: 16px;
}

.onboarding-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(31, 93, 146, 0.12);
  border-radius: 12px;
  background: #f8fafc;
}

.onboarding-step > strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #1f5d92;
  color: #fff;
}

.onboarding-step div {
  display: grid;
  gap: 3px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.feature-card,
.landing-note {
  display: grid;
  gap: 6px;
  padding: 13px;
}

.landing-note {
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: center;
  background: #f8fafc;
}

.login-state-banner {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #f3c56b;
  border-radius: 14px;
  background: #fff8e8;
  color: #6d4f11;
}

.login-state-banner strong {
  color: #8a5a00;
}

.login-state-banner span {
  color: #6f5b2c;
  line-height: 1.5;
}

.login-state-banner.is-signed-in {
  border-color: #a7d7f7;
  background: #eef7ff;
  color: #17466b;
}

.login-state-banner.is-signed-in strong {
  color: #0f5f9f;
}

.login-state-banner.is-signed-in span {
  color: #3f5f78;
}

.wide-card {
  grid-column: 1 / -1;
}

.organization-switch-list {
  display: grid;
  gap: 10px;
}

.organization-switch-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #263242;
  text-align: left;
  cursor: pointer;
}

.organization-switch-item.is-selected {
  border-color: #1f5d92;
  background: #f4f9fd;
  box-shadow: 0 0 0 2px rgba(31, 93, 146, 0.1);
}

.organization-switch-item span {
  color: #637083;
  font-size: 12px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.module-card {
  display: grid;
  gap: 8px;
  min-height: 138px;
  padding: 16px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #fff;
  color: #263242;
  text-align: left;
  cursor: pointer;
}

.module-card:hover {
  border-color: #8fb7dd;
  box-shadow: 0 8px 20px rgba(31, 93, 146, 0.08);
}

.module-card span {
  color: #1f5d92;
  font-size: 12px;
  font-weight: 800;
}

.module-card strong {
  font-size: 17px;
}

.module-card small {
  color: #637083;
  line-height: 1.5;
}

.ai-service-form {
  align-content: start;
}

.inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--wf-text-soft, #4f5d6f);
  font-size: 12px;
  font-weight: 650;
}

.inline-toggle input {
  width: auto;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.summary-list dt {
  color: #637083;
  font-size: 12px;
}

.summary-list dd {
  margin: 0;
  color: #263442;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  word-break: normal;
  overflow-wrap: anywhere;
}

.profile-editor {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: start;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #e8f1f8;
  color: #1f5d92;
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  font-family: inherit;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar small {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 2px 0;
  background: rgba(13, 31, 45, 0.58);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.profile-avatar:hover {
  filter: brightness(0.98);
}

.qr-placeholder {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed var(--wf-border);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(31, 93, 146, 0.08) 25%, transparent 25%) 0 0 / 12px 12px,
    var(--wf-panel);
  color: var(--wf-muted);
  text-align: center;
}

.qr-placeholder strong {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--wf-accent);
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.invite-card {
  gap: 12px;
}

.invite-result {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.invite-qr-canvas {
  width: 220px;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--wf-border);
  border-radius: 14px;
  background: #fff;
}

.invite-copy-box {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--wf-border);
  border-radius: 12px;
  background: var(--wf-panel-muted);
}

.invite-copy-box span {
  color: var(--wf-muted);
  font-size: 12px;
  font-weight: 700;
}

.invite-copy-box input {
  min-width: 0;
}

.partner-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.partner-list,
.partner-detail,
.partner-section {
  display: grid;
  gap: 12px;
  align-content: start;
}

.crm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.crm-pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crm-stage-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--wf-border);
  border-radius: 12px;
  background: var(--wf-panel-muted);
}

.crm-stage-card span,
.crm-stage-card small {
  color: var(--wf-muted);
  font-size: 12px;
}

.crm-stage-card strong {
  color: var(--wf-text);
  font-size: 22px;
}

.partner-list-item {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
  color: #263242;
  text-align: left;
  cursor: pointer;
}

.partner-list-item.is-selected {
  border-color: #1f5d92;
  background: #f4f9fd;
  box-shadow: 0 0 0 2px rgba(31, 93, 146, 0.1);
}

.partner-list-item span,
.partner-profile-header p,
.registry-grid span {
  color: #637083;
  font-size: 12px;
}

.partner-list-item small {
  color: #637083;
  font-size: 11px;
  line-height: 1.35;
}

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

.stacked-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--wf-line, #d7e0ea);
  border-radius: 10px;
  background: var(--wf-surface-soft, #f8fafc);
}

.stacked-list-card strong,
.stacked-list-card span,
.stacked-list-card small {
  display: block;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

.stacked-list-card strong {
  color: var(--wf-text, #263242);
  font-size: 13px;
}

.stacked-list-card span,
.stacked-list-card small {
  color: var(--wf-text-muted, #637083);
  font-size: 12px;
  line-height: 1.35;
}

.stacked-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.stacked-card-meta span {
  width: auto;
  max-width: 100%;
}

.stacked-card-action {
  justify-self: start;
  margin-top: 0;
}

.stacked-card-button {
  justify-self: start;
  margin-top: 2px;
}

.shipment-card-list {
  display: grid;
  gap: 7px;
  max-height: 36vh;
  overflow-y: auto;
  padding-right: 2px;
}

.shipment-card-list .shipment-card {
  padding: 9px 10px;
}

.shipment-card small {
  display: block;
  margin-top: 2px;
  color: var(--wf-text-muted, #637083);
  font-size: 11px;
  line-height: 1.35;
}

.compact-empty {
  padding: 14px;
}

.partner-create-form,
.partner-profile-header,
.partner-profile-body,
.partner-section {
  padding: 14px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #fff;
}

.partner-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.partner-create-form .subsection-title {
  margin-top: 2px;
}

.partner-create-form .field-short {
  grid-column: span 1;
}

.partner-create-form .field-long,
.partner-create-form .field-textarea {
  grid-column: 1 / -1;
}

.partner-create-form .name-fields-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.partner-profile-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.partner-profile-header h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.registry-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  background: #f8fafc;
}

.registry-grid.compact div {
  background: #fff;
}

.partner-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
  align-items: start;
}

.checkbox-field input {
  width: auto;
  justify-self: start;
}

td input.table-checkbox {
  width: 16px;
  min-width: 0;
  min-height: 16px;
  padding: 0;
  cursor: pointer;
}

.compact-remark textarea {
  min-height: 52px;
  resize: vertical;
}

.department-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.department-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.department-card.is-selected {
  border-color: #1f5d92;
  box-shadow: 0 0 0 2px rgba(31, 93, 146, 0.12);
  background: #f4f9fd;
}

.department-card:focus-visible {
  outline: 2px solid #1f5d92;
  outline-offset: 2px;
}

.department-card.is-disabled {
  opacity: 0.62;
  background: #f7f9fb;
}

.department-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.department-card-header span,
.department-meta {
  color: #637083;
  font-size: 12px;
}

.department-card-header strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.department-meta {
  display: flex;
  gap: 12px;
}

.dept-member-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.add-department-card form {
  display: grid;
  gap: 10px;
}

.add-department-card strong {
  color: #1f5d92;
  font-size: 32px;
  line-height: 1;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 46px;
  height: 24px;
  flex: 0 0 auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5df;
  cursor: pointer;
  transition: 0.18s ease;
}

.switch span::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #fff;
  transition: 0.18s ease;
}

.switch input:checked + span {
  background: #1f5d92;
}

.switch input:checked + span::before {
  transform: translateX(22px);
}

.order-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.order-type-grid button {
  border: 1px solid #cfdae6;
  border-radius: 6px;
  background: #f7f9fb;
  padding: 11px 8px;
  cursor: pointer;
}

.collaboration-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.collab-section {
  display: grid;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #d7e0ea;
}

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

.collaborator-item {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
}

.collaborator-item strong {
  color: #1f5d92;
}

.collaborator-item span {
  color: #637083;
  font-size: 12px;
}

.collab-chat-window {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #fff;
}

.collab-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px 7px;
  border-bottom: 1px solid #d7e0ea;
  background: #f9fbfe;
}

.collab-chat-header .side-subtitle {
  margin: 0 0 2px;
}

.collab-chat-header span {
  color: #637083;
  font-size: 12px;
}

.collab-thread {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px;
  background: #f5f7fa;
}

.collab-message {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
}

.collab-dialog-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #637083;
  font-size: 12px;
}

.collab-message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collab-message-header span {
  color: #8491a3;
  font-size: 11px;
}

.collab-message strong {
  color: #1f5d92;
}

.collab-message p,
.reply-item p {
  margin: 0;
  line-height: 1.5;
}

.reply-list {
  display: grid;
  gap: 6px;
  padding-left: 10px;
  border-left: 2px solid #dbe7ef;
}

.reply-item {
  padding: 7px 8px;
  border-radius: 6px;
  background: #f7f9fb;
}

.reply-item span {
  display: block;
  margin-bottom: 3px;
  color: #637083;
  font-size: 12px;
}

.reply-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px auto;
  gap: 6px;
}

.collab-form {
  display: grid;
  gap: 8px;
}

.collab-chat-window > .collab-form {
  flex: 0 0 auto;
  padding: 9px 10px 10px;
  border-top: 1px solid #d7e0ea;
  background: #fff;
}

.mention-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #637083;
  font-size: 12px;
}

.mention-chip {
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: 3px 8px;
  color: #1f5d92;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.mention-chip.is-all {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.mention-token {
  border-radius: 999px;
  padding: 1px 5px;
  color: #0f5f9f;
  background: #eaf4ff;
  font-weight: 650;
}

.collab-notification-list {
  display: grid;
  gap: 6px;
}

.collab-notification,
.collab-notification-empty {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #fff;
  color: #637083;
  font-size: 12px;
}

.collab-notification strong {
  color: #1f5d92;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  background: #f7fafc;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 16px;
}

.metric span {
  color: #637083;
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.order-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--wf-line, #d6e0ea);
  border-radius: 10px;
  background: #fbfcfe;
}

.order-status-panel strong,
.order-status-panel small {
  display: block;
  margin-top: 5px;
}

.order-status-panel small {
  color: #637083;
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #1f5d92;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.is-warning {
  background: #fff4dc;
  color: #9a5b00;
}

.status-pill.is-muted {
  background: #eef1f5;
  color: #637083;
}

.danger-button {
  border-color: #d99a9a;
  color: #9f2f2f;
}

.danger-button:hover:not(:disabled) {
  border-color: #b42323;
  background: #fff5f5;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  table-layout: auto;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fbfcfe;
}

.list-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 280px;
  color: #637083;
  font-size: 12px;
}

.list-search input {
  width: 220px;
  min-height: 30px;
  border: 1px solid var(--wf-line, #d6e0ea);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 12px;
}

.list-count,
.list-pager {
  color: #637083;
  font-size: 12px;
}

.list-pager {
  display: flex;
  align-items: center;
  gap: 8px;
}

textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid var(--wf-line, #d6e0ea);
  border-radius: 8px;
  padding: 9px 10px;
  font: 12px/1.45 Consolas, "SFMono-Regular", monospace;
  background: var(--wf-surface, #fff);
  color: var(--wf-text, #1c2430);
  resize: vertical;
}

.compact-module-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metadata-category-card {
  min-height: 96px;
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  font-size: 14px;
  line-height: 1.45;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

th {
  color: #526173;
  background: #f7fafc;
}

td strong,
td span,
td small {
  display: block;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

td small {
  margin-top: 2px;
  color: var(--wf-text-muted, #637083);
  font-size: 11px;
  line-height: 1.35;
}

.compact-readable-table th,
.compact-readable-table td {
  padding: 8px 9px;
}

.compact-readable-table th {
  white-space: nowrap;
}

.compact-readable-table td:first-child {
  min-width: 120px;
}

td input,
td select {
  width: 100%;
  min-width: 86px;
  min-height: 28px;
  margin: 2px 0;
  padding: 4px 6px;
  border: 1px solid var(--wf-line, #d6e0ea);
  border-radius: 6px;
  font-size: 12px;
}

td span {
  display: block;
  margin-top: 2px;
  color: #637083;
  font-size: 12px;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sortable-header::after {
  content: " ↕";
  color: #9aa8b7;
  font-size: 11px;
}

.sortable-header[data-sort-direction="asc"]::after {
  content: " ↑";
  color: var(--wf-accent, #3b82f6);
}

.sortable-header[data-sort-direction="desc"]::after {
  content: " ↓";
  color: var(--wf-accent, #3b82f6);
}

.empty-state {
  padding: 34px;
  border: 1px dashed #b9c5d4;
  border-radius: 8px;
  color: #637083;
  text-align: center;
}

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

  .sidebar {
    min-height: auto;
  }

  .form-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .app-header {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px;
  }

  .ad-banner {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .ad-banner small {
    white-space: normal;
  }

  .topbar {
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  .partner-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .partner-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .partner-list .subsection-title,
  .partner-list .empty-state,
  .partner-list .partner-create-form {
    grid-column: 1 / -1;
  }
}

.mobile-body {
  background: #eef1f5;
}

.mobile-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f7f9fb;
  padding: 12px;
}

.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 4px;
}

.mobile-header strong {
  font-size: 18px;
}

.mobile-header select {
  width: 150px;
}

.mobile-header .language-toggle {
  min-width: 68px;
  border-color: #c8d9e8;
  background: #fff;
  color: #1f5d92;
}

.mobile-section {
  margin-top: 14px;
}

.mobile-section h1 {
  font-size: 18px;
  margin: 0 0 10px;
}

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

.mobile-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  background: #fff;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
}

.mobile-card span {
  color: #6f7d8e;
  font-size: 13px;
}

/* Feidan collaborative visual system, inspired by modern enterprise messenger UIs, 2026-07-17 */
:root {
  --wf-bg: #f5f7fc;
  --wf-surface: #ffffff;
  --wf-surface-soft: #f8faff;
  --wf-surface-muted: #eef3ff;
  --wf-line: #dfe5f2;
  --wf-line-strong: #c8d2e6;
  --wf-text: #1f2329;
  --wf-text-muted: #646a73;
  --wf-text-soft: #8f959e;
  --wf-accent: #3370ff;
  --wf-accent-strong: #245bdb;
  --wf-accent-soft: #e8f0ff;
  --wf-accent-cyan: #00c7be;
  --wf-accent-purple: #7a5cff;
  --wf-success: #00b578;
  --wf-danger: #f54a45;
  --wf-shadow: 0 12px 30px rgba(31, 35, 41, 0.08);
  font-size: 13px;
}

body {
  background:
    radial-gradient(circle at 14% 0, rgba(51, 112, 255, 0.11), transparent 26rem),
    radial-gradient(circle at 88% 12%, rgba(0, 199, 190, 0.09), transparent 24rem),
    var(--wf-bg);
  color: var(--wf-text);
  font-size: 13px;
  line-height: 1.42;
}

button,
input,
select,
textarea {
  font-size: 13px;
}

.app-header {
  height: 50px;
  gap: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--wf-text);
  border-bottom-color: rgba(223, 229, 242, 0.86);
  box-shadow: 0 1px 0 rgba(31, 35, 41, 0.04);
  backdrop-filter: blur(14px);
}

.brand {
  width: 250px;
  gap: 8px;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0 16%, transparent 17%),
    linear-gradient(135deg, rgba(51, 112, 255, 0.12), rgba(0, 199, 190, 0.1));
  box-shadow: inset 0 0 0 1px rgba(51, 112, 255, 0.18), 0 8px 18px rgba(51, 112, 255, 0.18);
  overflow: hidden;
}

.brand-wing {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 10px 10px 4px 10px;
  transform-origin: center;
}

.brand-wing-a {
  top: 5px;
  left: 5px;
  background: linear-gradient(135deg, #3370ff, #4e83ff);
}

.brand-wing-b {
  top: 5px;
  right: 5px;
  background: linear-gradient(135deg, #00c7be, #34d8d0);
  transform: rotate(90deg);
}

.brand-wing-c {
  right: 5px;
  bottom: 5px;
  background: linear-gradient(135deg, #7a5cff, #9b87ff);
  transform: rotate(180deg);
}

.brand-wing-d {
  left: 5px;
  bottom: 5px;
  background: linear-gradient(135deg, #21d4fd, #3370ff);
  transform: rotate(270deg);
}

.brand strong {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--wf-text);
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand strong small {
  color: var(--wf-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.brand span,
.side-heading span,
.field span,
.section-title {
  color: var(--wf-text-soft);
  font-size: 11px;
  margin-top: 1px;
}

.brand span {
  color: var(--wf-text-soft);
}

.ad-banner {
  gap: 10px;
  padding: 6px 10px;
  border-color: rgba(51, 112, 255, 0.14);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(51, 112, 255, 0.08), rgba(0, 199, 190, 0.08)),
    #f8faff;
}

.ad-banner span {
  padding: 3px 7px;
  background: rgba(51, 112, 255, 0.1);
  color: var(--wf-accent);
  font-size: 11px;
}

.ad-banner strong {
  color: var(--wf-text);
  font-size: 13px;
}

.ad-banner small {
  color: var(--wf-text-muted);
  font-size: 11px;
}

.language-toggle,
.logout-button {
  min-width: 68px;
  padding: 5px 9px;
  border-color: rgba(51, 112, 255, 0.22);
  color: var(--wf-accent);
  background: rgba(51, 112, 255, 0.06);
  font-size: 12px;
}

.logout-button {
  min-width: 58px;
  background: rgba(51, 112, 255, 0.06);
}

.app-shell {
  grid-template-columns: 320px minmax(0, 1fr);
  height: calc(100vh - 50px);
}

.sidebar {
  gap: 10px;
  padding: 12px;
  background: #f8faff;
  border-right-color: var(--wf-line);
}

.side-heading {
  padding-bottom: 9px;
  border-bottom-color: var(--wf-line);
}

.side-heading strong {
  font-size: 15px;
}

.side-subtitle {
  color: var(--wf-text-muted);
  font-size: 12px;
  margin: 4px 0 6px;
}

.field {
  gap: 5px;
}

select,
input,
textarea {
  min-height: 32px;
  border-color: var(--wf-line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--wf-surface);
  color: var(--wf-text);
}

textarea {
  min-height: 72px;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(51, 112, 255, 0.16);
  border-color: var(--wf-accent);
}

.sidebar select {
  border-color: var(--wf-line);
  background: var(--wf-surface);
  color: var(--wf-text);
}

.primary-button,
.secondary-button,
.secondary-link,
.tab-button,
.shipment-card {
  border-radius: 8px;
}

.primary-button {
  padding: 8px 11px;
  background: linear-gradient(135deg, var(--wf-accent), var(--wf-accent-purple));
  color: #fff;
  font-weight: 760;
  box-shadow: 0 8px 16px rgba(51, 112, 255, 0.18);
}

.primary-button:hover {
  background: var(--wf-accent-strong);
}

.secondary-button,
.secondary-link {
  padding: 7px 10px;
  background: var(--wf-surface-muted);
  color: var(--wf-text);
  font-size: 12px;
  font-weight: 720;
}

.secondary-button:hover,
.secondary-link:hover {
  background: #dfe8ff;
}

.quick-actions {
  gap: 6px;
}

.query-panel {
  gap: 8px;
  padding: 10px;
  border-color: var(--wf-line);
  border-radius: 10px;
  background: var(--wf-surface);
}

.section-title {
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.shipment-list {
  gap: 7px;
}

.shipment-card {
  padding: 9px;
  border-color: var(--wf-line);
  background: var(--wf-surface);
  color: var(--wf-text);
}

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

.shipment-card span,
.collaborator-item span,
.reply-item span,
.partner-list-item span,
.partner-profile-header p,
.registry-grid span,
.organization-switch-item span,
.department-card-header span,
.department-meta,
.metric span,
.mobile-card span {
  color: var(--wf-text-muted);
  font-size: 11px;
}

.main-panel {
  background: rgba(245, 247, 252, 0.88);
}

.topbar {
  min-height: 52px;
  padding: 8px 14px;
  gap: 10px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--wf-line);
  backdrop-filter: blur(10px);
}

.topline {
  gap: 8px;
}

.tenant-name,
.page-path,
.context-badge {
  color: var(--wf-text-muted);
  font-size: 12px;
}

.page-path {
  gap: 5px;
}

.page-path span:not(:last-child)::after {
  color: var(--wf-text-soft);
  margin-left: 5px;
}

h1 {
  margin-top: 2px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.topbar-actions {
  gap: 6px;
}

.context-badge {
  padding: 6px 8px;
  border-color: var(--wf-line);
  background: var(--wf-surface-soft);
}

.tabs {
  gap: 0;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--wf-line);
}

.tab-button {
  padding: 8px 10px;
  color: var(--wf-text-muted);
  border-bottom-width: 2px;
}

.tab-button.is-active {
  color: var(--wf-text);
  border-bottom-color: var(--wf-accent);
  font-weight: 760;
}

.workspace {
  padding: 10px 14px 14px;
}

.panel {
  padding: 12px;
  border-color: var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface);
  box-shadow: 0 1px 0 rgba(31, 35, 41, 0.03);
}

.form-grid {
  gap: 9px;
}

.container-rows,
.partner-list,
.partner-detail,
.partner-section,
.chat-list,
.message-list,
.collaboration-panel,
.collab-section,
.collaborator-list,
.collab-thread,
.collab-form,
.summary-list {
  gap: 7px;
}

.container-row {
  gap: 8px;
}

.actions {
  gap: 8px;
  margin-top: 12px;
}

.subsection-title {
  padding: 6px 0 2px;
  color: var(--wf-accent);
  border-bottom-color: var(--wf-line);
}

.chat-layout {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 10px;
}

.chat-item,
.message,
.organization-switch-item,
.partner-list-item,
.department-card,
.collaborator-item,
.collab-message,
.mobile-card {
  border-color: var(--wf-line);
  background: var(--wf-surface);
}

.chat-item,
.message,
.organization-switch-item,
.partner-list-item,
.collab-message {
  padding: 8px 9px;
  border-radius: 10px;
}

.message strong,
.collaborator-item strong,
.collab-message strong {
  color: var(--wf-accent);
}

.workbench-grid {
  gap: 9px;
}

.workbench-card {
  min-height: 118px;
  gap: 6px;
  padding: 12px;
  border-color: var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface);
  color: var(--wf-text);
}

.workbench-card:hover,
.module-card:hover {
  border-color: var(--wf-accent);
  box-shadow: var(--wf-shadow);
  transform: translateY(-1px);
}

.workbench-card span,
.module-card span {
  color: var(--wf-accent);
  font-size: 11px;
  font-weight: 820;
}

.workbench-card strong {
  font-size: 16px;
  letter-spacing: -0.015em;
}

.workbench-card small,
.module-card small {
  color: var(--wf-text-muted);
  font-size: 12px;
  line-height: 1.42;
}

.organization-switch-item.is-selected,
.partner-list-item.is-selected,
.department-card.is-selected {
  border-color: var(--wf-accent);
  background: var(--wf-accent-soft);
  box-shadow: 0 0 0 2px rgba(51, 112, 255, 0.12);
}

.module-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.module-card {
  min-height: 112px;
  gap: 6px;
  padding: 12px;
  border-color: var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface);
  color: var(--wf-text);
}

.module-card strong {
  font-size: 15px;
}

.summary-list div {
  gap: 10px;
  padding-top: 6px;
  border-top-color: #edf1f8;
}

.summary-list dt,
.summary-list dd {
  font-size: 11px;
}

.profile-editor {
  grid-template-columns: 72px 1fr;
  gap: 12px;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--wf-accent-soft);
  color: var(--wf-accent);
  font-size: 22px;
}

.partner-layout {
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 10px;
}

.partner-create-form,
.partner-profile-header,
.partner-profile-body,
.partner-section {
  padding: 11px;
  border-color: var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface);
}

.partner-profile-header {
  gap: 10px;
}

.partner-profile-header h2 {
  font-size: 17px;
}

.registry-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}

.registry-grid div {
  gap: 3px;
  padding: 8px;
  border-color: var(--wf-line);
  border-radius: 10px;
  background: #f8faff;
}

.partner-section-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  align-items: start;
}

.partner-create-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.partner-create-form .field-long,
.partner-create-form .field-textarea,
.partner-create-form .wide {
  grid-column: 1 / -1;
}

.partner-create-form .field-short {
  grid-column: span 1;
}

.partner-create-form .name-fields-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.readonly-value strong {
  border-color: var(--wf-line);
  background: #faf7f1;
}

.department-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.department-card {
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
}

.department-card-header {
  gap: 8px;
}

.department-card-header strong {
  font-size: 15px;
}

.add-department-card strong {
  color: var(--wf-accent);
  font-size: 26px;
}

.switch {
  width: 40px;
  height: 22px;
}

.switch span {
  background: #cfc5b8;
}

.switch span::before {
  width: 16px;
  height: 16px;
}

.switch input:checked + span {
  background: var(--wf-accent);
}

.switch input:checked + span::before {
  transform: translateX(18px);
}

.order-type-grid {
  gap: 6px;
}

.order-type-grid button {
  padding: 8px 6px;
  border-color: var(--wf-line);
  border-radius: 8px;
  background: var(--wf-surface-soft);
  color: var(--wf-text);
}

.reply-list {
  gap: 5px;
  border-left-color: var(--wf-accent-soft);
}

.reply-item {
  padding: 6px 7px;
  background: var(--wf-surface-soft);
}

.metric-row {
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  padding: 11px;
  border-color: var(--wf-line);
  border-radius: 12px;
  background: #f8faff;
}

.metric strong {
  margin-top: 5px;
  font-size: 18px;
}

th,
td {
  padding: 8px 9px;
  border-bottom-color: #ebe4d8;
  font-size: 12px;
}

th {
  color: var(--wf-text-muted);
  background: #f4eee5;
}

.empty-state {
  padding: 24px;
  border-color: var(--wf-line-strong);
  border-radius: 12px;
  color: var(--wf-text-muted);
  background: rgba(255, 253, 248, 0.6);
}

.mobile-body {
  background: var(--wf-bg);
}

.mobile-shell {
  max-width: 500px;
  background: #f4eee5;
  padding: 9px;
}

.mobile-header {
  gap: 8px;
  padding: 9px 2px;
}

.mobile-header strong,
.mobile-section h1 {
  font-size: 16px;
}

.mobile-header select {
  width: 130px;
}

.mobile-header .language-toggle,
.mobile-header .logout-button {
  border-color: var(--wf-line);
  color: var(--wf-accent);
  background: var(--wf-surface);
}

.mobile-header .logout-button {
  min-width: 52px;
}

.mobile-section {
  margin-top: 10px;
}

.mobile-section h1 {
  margin-bottom: 7px;
}

.mobile-list {
  gap: 7px;
}

.mobile-card {
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
}

/* Mobile workbench v2: query-first, action-light, app-market ready. */
.mobile-body {
  min-height: 100vh;
  background: linear-gradient(180deg, #edf4ff 0%, #f7f8fb 38%, #f6f1ea 100%);
  color: var(--wf-text);
}

.mobile-shell {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 10px calc(76px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mobile-brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.mobile-brand div:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mobile-brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.mobile-brand span {
  overflow: hidden;
  max-width: 190px;
  color: var(--wf-text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-header-actions .language-toggle,
.mobile-header-actions .logout-button {
  min-width: auto;
  min-height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.mobile-content {
  display: grid;
  gap: 10px;
}

.mobile-hero {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(56, 103, 214, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 0%, rgba(56, 103, 214, 0.16), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #f4f7ff 100%);
  box-shadow: 0 18px 40px rgba(31, 93, 146, 0.08);
}

.mobile-hero span {
  color: var(--wf-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.mobile-hero h1 {
  margin: 0;
  color: var(--wf-text);
  font-size: 22px;
  line-height: 1.25;
}

.mobile-hero p {
  margin: 0;
  color: var(--wf-text-muted);
  line-height: 1.55;
}

.mobile-card,
.mobile-user-card,
.mobile-metric-grid article,
.mobile-feature-grid article {
  border: 1px solid rgba(31, 93, 146, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(33, 47, 76, 0.06);
}

.mobile-card {
  display: grid;
  gap: 9px;
  padding: 13px;
}

.mobile-auth-card {
  border-color: rgba(55, 118, 255, 0.22);
}

.mobile-form {
  display: grid;
  gap: 9px;
}

.mobile-form label,
.mobile-search,
.mobile-card label {
  display: grid;
  gap: 5px;
  color: var(--wf-text-muted);
  font-size: 12px;
}

.mobile-form input,
.mobile-form select,
.mobile-form textarea,
.mobile-search input,
.mobile-card select,
.mobile-card textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--wf-line);
  border-radius: 12px;
  background: #fff;
  color: var(--wf-text);
  font: inherit;
}

.mobile-provider-grid,
.mobile-action-grid,
.mobile-feature-grid,
.mobile-metric-grid {
  display: grid;
  gap: 8px;
}

.mobile-provider-grid,
.mobile-action-grid,
.mobile-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-provider-grid button,
.mobile-action-grid button {
  justify-content: center;
  min-height: 40px;
}

.mobile-feature-grid article,
.mobile-metric-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.mobile-feature-grid strong {
  color: var(--wf-text);
}

.mobile-feature-grid span,
.mobile-metric-grid span {
  color: var(--wf-text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.mobile-user-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.mobile-user-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mobile-user-card span {
  color: var(--wf-text-muted);
  font-size: 11px;
}

.mobile-user-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.mobile-metric-grid strong {
  color: var(--wf-accent);
  font-size: 24px;
}

.mobile-section {
  display: grid;
  gap: 8px;
  margin-top: 0;
}

.mobile-section h1 {
  margin: 0;
  color: var(--wf-text);
  font-size: 16px;
}

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

.mobile-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mobile-card-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-card-title span {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--wf-accent);
  font-size: 11px;
  font-weight: 700;
}

.mobile-route {
  color: var(--wf-text);
  font-weight: 700;
}

.mobile-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.mobile-member-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-member-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5f7fb;
}

.mobile-chat-thread {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--wf-line);
  border-radius: 14px;
  background: #f8fafc;
}

.mobile-chat-message {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-radius: 12px;
  background: #fff;
}

.mobile-chat-message p {
  margin: 0;
  line-height: 1.5;
}

.mobile-chat-message span {
  color: var(--wf-text-muted);
  font-size: 11px;
}

.mobile-tabbar {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(480px, 100vw);
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(31, 93, 146, 0.12);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 -12px 30px rgba(33, 47, 76, 0.08);
  transform: translateX(50%);
}

.mobile-tabbar button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--wf-text-muted);
  font-size: 12px;
  font-weight: 700;
}

.mobile-tabbar button.is-active {
  background: #edf4ff;
  color: var(--wf-accent);
}

/* Order collaboration IM: chat-like sidebar with unread and @mention states. */
.workbench-unread-badge,
.workbench-read-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.workbench-unread-badge {
  background: #ef4444;
  color: #fff;
}

.workbench-unread-badge.has-mention {
  background: #dc2626;
}

.workbench-read-badge {
  background: #ecfdf5;
  color: #0f766e;
}

.workbench-message-preview {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.workbench-message-preview.empty {
  color: var(--wf-text-muted);
  font-size: 12px;
}

.workbench-message-preview button {
  display: grid;
  grid-template-columns: auto minmax(88px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--wf-line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.workbench-message-preview button strong,
.workbench-message-preview button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.message-dot.is-unread,
.message-dot.is-mention,
.mention-red-dot {
  background: #ef4444;
}

.mention-red-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.collab-chat-window {
  border-radius: 14px;
  background: #f4f6fa;
}

.collab-chat-header {
  background: #fff;
}

.collab-read-button {
  min-height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}

.collab-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 10px;
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.06), transparent 24%),
    #f4f6fa;
}

.collab-message {
  position: relative;
  width: fit-content;
  max-width: 88%;
  padding: 9px 11px 8px;
  border: 0;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.collab-message.is-peer {
  align-self: flex-start;
  border-top-left-radius: 4px;
  background: #fff;
}

.collab-message.is-mine {
  align-self: flex-end;
  border-top-right-radius: 4px;
  background: #dbeafe;
}

.collab-message.is-unread::before,
.collab-message.has-mention::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid #f4f6fa;
  border-radius: 999px;
  background: #ef4444;
}

.collab-message.is-mine::before {
  right: -5px;
  left: auto;
}

.collab-message-header {
  gap: 10px;
  margin-bottom: 2px;
}

.collab-message-header strong {
  color: #1f2937;
  font-size: 12px;
}

.collab-message-header span {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.collab-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.collab-message .reply-list {
  margin-top: 7px;
  padding-left: 8px;
  border-left: 2px solid rgba(37, 99, 235, 0.18);
}

.collab-message .reply-item {
  background: rgba(255, 255, 255, 0.72);
}

.collab-message .reply-box {
  grid-template-columns: minmax(0, 1fr) 54px 58px;
  margin-top: 6px;
}

.collab-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.collab-send-row small {
  color: var(--wf-text-muted);
  font-size: 11px;
}

.mobile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 9px;
  border-radius: 12px;
  background: #f8fafc;
}

.mobile-detail-grid div {
  min-width: 0;
}

.mobile-detail-grid dt {
  color: var(--wf-text-muted);
  font-size: 11px;
}

.mobile-detail-grid dd {
  margin: 2px 0 0;
  color: var(--wf-text);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.mobile-task-form {
  display: grid;
  gap: 8px;
}

.mobile-task-form .actions,
.shipment-mobile-card .actions,
.mobile-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mobile-task-form .actions button,
.shipment-mobile-card .actions button {
  flex: 1 1 86px;
}

.mobile-chat-message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mobile-chat-message-head button,
.mobile-reply-target button {
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--wf-line);
  border-radius: 999px;
  background: #fff;
  color: var(--wf-accent);
  font-size: 11px;
}

.mobile-chat-reply {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding: 7px 8px;
  border-left: 3px solid #b8cdfb;
  border-radius: 10px;
  background: #f5f7fb;
}

.mobile-chat-reply strong {
  font-size: 12px;
}

.mobile-reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 12px;
  background: #edf4ff;
  color: var(--wf-accent);
  font-size: 12px;
  font-weight: 700;
}

.mobile-two-col,
.mobile-three-col {
  display: grid;
  gap: 8px;
}

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

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

.mobile-quick-entry-form input,
.mobile-quick-entry-form textarea {
  text-transform: uppercase;
}

@media (max-width: 390px) {
  .mobile-two-col,
  .mobile-three-col {
    grid-template-columns: 1fr;
  }
}

/* Final layout guardrails: keep Chinese text horizontal and reduce wide-table dragging. */
th,
td {
  line-height: 1.45;
  vertical-align: top;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

td strong,
td span,
td small {
  display: block;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

td small {
  margin-top: 2px;
  color: var(--wf-text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.compact-readable-table {
  table-layout: auto;
}

.compact-readable-table th,
.compact-readable-table td {
  padding: 8px 9px;
}

.compact-readable-table th {
  white-space: nowrap;
}

.compact-readable-table td:first-child {
  min-width: 120px;
}

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

.stacked-list-card {
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  border: 1px solid var(--wf-line);
  border-radius: 10px;
  background: var(--wf-surface-soft);
}

.stacked-list-card strong,
.stacked-list-card span,
.stacked-list-card small,
.partner-list-item small {
  display: block;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
}

.stacked-list-card strong {
  color: var(--wf-text);
  font-size: 13px;
}

.stacked-list-card span,
.stacked-list-card small,
.partner-list-item small {
  color: var(--wf-text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.stacked-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
}

.stacked-card-meta span {
  width: auto;
  max-width: 100%;
}

.stacked-card-action {
  justify-self: start;
  margin-top: 0;
}

.stacked-card-button {
  justify-self: start;
  margin-top: 2px;
}

.shipment-card-list {
  display: grid;
  gap: 7px;
  max-height: 36vh;
  overflow-y: auto;
  padding-right: 2px;
}

.shipment-card-list .shipment-card {
  padding: 9px 10px;
}

.shipment-card small {
  display: block;
  margin-top: 2px;
  color: var(--wf-text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.compact-empty {
  padding: 14px;
}

@media (max-width: 1180px) {
  .partner-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .partner-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .partner-list .subsection-title,
  .partner-list .empty-state,
  .partner-list .partner-create-form {
    grid-column: 1 / -1;
  }
}

.sidebar {
  min-height: 0;
  overflow: hidden;
}

.collaboration-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.collab-section {
  flex: 0 0 auto;
}

.collab-chat-window {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface);
}

.collab-chat-header {
  flex: 0 0 auto;
  padding: 8px 10px;
  border-bottom: 1px solid var(--wf-line);
  background: #f8faff;
}

.collab-chat-header .side-subtitle {
  margin: 0 0 2px;
}

.collab-thread {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
}

.collab-chat-window > .collab-form {
  flex: 0 0 auto;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--wf-line);
  background: var(--wf-surface);
}

.container-quantity-panel {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface-soft);
}

.compact-container-rows {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.compact-container-rows .container-row {
  grid-template-columns: minmax(0, 1fr) 74px 52px;
  gap: 6px;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--wf-line);
  border-radius: 10px;
  background: var(--wf-surface);
}

.compact-container-rows .field span {
  font-size: 11px;
}

.compact-container-rows input,
.compact-container-rows select {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.compact-container-rows .secondary-button {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.container-quantity-panel > .secondary-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

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

.bl-address-field {
  min-width: 0;
}

.bl-address-field span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-link-button,
.tiny-action-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--wf-accent);
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.field-link-button:hover,
.tiny-action-button:hover {
  text-decoration: underline;
}

.tiny-action-button {
  flex: 0 0 auto;
  color: var(--wf-text-muted);
  font-size: 11px;
}

.bl-address-field textarea {
  min-height: 84px;
  resize: vertical;
}

.bl-address-book-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--wf-line);
  border-radius: 12px;
  background: var(--wf-surface-soft);
}

.bl-address-book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bl-address-book-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.bl-address-option {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--wf-line);
  border-radius: 10px;
  background: var(--wf-surface);
  color: var(--wf-text);
  text-align: left;
  cursor: pointer;
}

.bl-address-option:hover {
  border-color: var(--wf-accent);
  background: var(--wf-accent-soft);
}

.bl-address-option span {
  color: var(--wf-text-muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-line;
}

@media (max-width: 1180px) {
  .container-quantity-panel {
    flex-direction: column;
  }

  .bl-address-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
