/* Fusanhe official site palette, observed 2026-09-18. */
:root {
  --brand-forest: #20251f;
  --brand-forest-strong: #171c17;
  --brand-red: #c83a28;
  --brand-red-hover: #aa3022;
  --brand-gold: #c7a36a;
  --surface-main: #fff;
  --surface-subtle: #f7f5ef;
  --border-default: #dcd8ce;
  --border-strong: #aaa99e;
  --text-primary: #20251f;
  --text-secondary: #51574f;
  --text-muted: #65695f;
  --status-success: #37694d;
  --status-warning: #805c25;
  --status-danger: #ad3325;
  --status-info: #365e6b;
  --fsh-radius: 6px;
  --fsh-space: 8px;
  --fsh-control: 34px;
  --fsh-row: 40px;
  --body-bg: var(--surface-subtle);
  --panel-bg: var(--surface-main);
  --border-color: var(--border-default);
  --text-color: var(--text-primary);
  --text-muted-color: var(--text-muted);
  --navbar-bg: var(--brand-forest);
  --navbar-color: #fff;
  --link-color: var(--status-success);
  --btn-primary-bg: var(--brand-red);
  --btn-primary-border: var(--brand-red);
}
body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--text-primary);
  font-size: 13px;
  background: var(--surface-subtle);
}
a {
  color: var(--status-success);
}
:focus-visible {
  outline: 2px solid var(--brand-red) !important;
  outline-offset: 3px;
}
.btn,
.form-control {
  border-radius: var(--fsh-radius);
  font-size: 13px;
  min-height: 32px;
}
.btn-primary {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
}
.panel,
.well {
  box-shadow: none;
  border-color: var(--border-default);
  border-radius: var(--fsh-radius);
}
.navbar {
  background: var(--brand-forest);
  color: #fff;
}
.navbar .nav > li > a {
  color: #e8e8df;
}
.navbar .nav > li.active > a,
.navbar .nav > li > a:hover {
  background: var(--brand-forest-strong);
  color: #fff;
}
.navbar .logo {
  object-fit: contain;
  max-height: 34px;
  background: white;
  border-radius: 4px;
  padding: 3px;
}
h1,
.page-header h3 {
  font-size: 20px;
}
h2 {
  font-size: 16px;
}
h3,
h4 {
  font-size: 14px;
}
.table > thead > tr > th {
  background: var(--surface-subtle);
  font-size: 12px;
  white-space: nowrap;
}
.table > tbody > tr > td {
  padding: 8px;
  vertical-align: middle;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.fsh-login {
  background: #f6f5f1;
  min-height: calc(100vh - 45px);
  color: #292c29;
}
.fsh-login .content {
  position: static !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100%;
  max-width: none !important;
  transform: none !important;
}
.fsh-login .container-centering {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto !important;
  min-height: calc(100vh - 70px);
  padding: 32px 24px;
  box-sizing: border-box;
}
.fsh-login .container-centering > .helper {
  display: none;
}
.fsh-login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  width: min(880px, 100%);
  background: #fff;
  border: 1px solid #dfdfd8;
  border-radius: 10px;
  overflow: hidden;
}
.fsh-login #login {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  min-height: 0;
  padding: 36px;
  background: #fff;
  text-align: left;
  box-sizing: border-box;
}
.fsh-login #login .panel-heading {
  background: #fff;
  border: 0;
  padding: 0 0 24px;
  text-align: left;
}
.fsh-login #login .panel-body {
  padding: 0;
}
.fsh-login #login .logo-container {
  text-align: left;
}
.fsh-login #login .logo {
  height: 58px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}
.fsh-login-heading h1 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  margin: 20px 0 4px;
  color: #292c29;
}
.fsh-login-heading p {
  font-size: 12px;
  line-height: 1.6;
  color: #65675f;
  margin: 0;
}
.fsh-login-heading h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 24px 0 0;
  border-top: 1px solid #e6e6e0;
  padding-top: 20px;
  color: #454840;
}
.fsh-login-photo {
  min-width: 0;
  align-self: stretch;
  background: url("login-factory.webp") center/cover;
}
.fsh-login #login input.form-control {
  min-height: 44px;
  font-size: 16px;
  border-color: #bfc1b8;
  border-radius: 6px;
  caret-color: #a82d34;
}
.fsh-login #login input::placeholder {
  color: #65675f;
  opacity: 1;
}
.fsh-login #login input[name="password"] {
  padding-right: 48px;
}
.fsh-login #login [data-action="toggleShowPassword"] {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  top: 0;
  right: 0;
}
.fsh-login #btn-login {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  background: #a82d34;
  border-color: #a82d34;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
}
.fsh-login #btn-login:hover {
  background: #8f242b;
  border-color: #8f242b;
}
.fsh-login #btn-login:disabled {
  opacity: .6;
  cursor: wait;
}
.fsh-login #login :is(input, button, a):focus-visible {
  outline: 2px solid #a82d34;
  outline-offset: 3px;
}
.fsh-login ::selection {
  background: #efd5d5;
  color: #292c29;
}
body:has(.fsh-login) {
  background: #f6f5f1;
  overflow-y: auto;
}
body:has(.fsh-login) footer,
body:has(.fsh-login) footer a {
  color: #65675f;
}
@media (max-width: 899px) {
  .fsh-login-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
  }
  .fsh-login-photo {
    display: none;
  }
  .fsh-login #login {
    padding: 32px;
  }
}
@media (max-width: 480px) {
  .fsh-login .container-centering {
    padding: 24px 16px;
  }
  .fsh-login #login {
    padding: 28px 24px;
  }
  .fsh-login-heading h1 {
    font-size: 18px;
  }
}
@media (max-height: 640px) {
  .fsh-login .container-centering {
    align-items: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}
.fsh-shell {
  background: var(--surface-main);
  padding: 16px;
  min-width: 0;
}
.fsh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.fsh-header h1 {
  margin: 0;
  font-size: 20px;
}
.fsh-subtitle {
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 6px;
}
.fsh-toolbar {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}
.fsh-toolbar label {
  font-size: 12px;
  font-weight: 400;
  margin: 0;
  display: grid;
  gap: 4px;
}
.fsh-toolbar .form-control {
  width: 130px;
  height: 34px;
}
.fsh-toolbar input[type="search"] {
  width: 220px;
}
.fsh-table-scroll {
  overflow: auto;
  max-height: calc(100vh - 280px);
}
.fsh-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fsh-table th {
  position: sticky;
  top: 0;
  background: var(--surface-subtle);
  z-index: 1;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
}
.fsh-table td,
.fsh-table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-default);
  height: 40px;
}
.fsh-table td {
  font-size: 13px;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fsh-table tbody tr:hover {
  background: var(--surface-subtle);
}
.fsh-table tr[data-id] {
  cursor: pointer;
}
.fsh-table .is-unread td:first-child {
  box-shadow: inset 3px 0 var(--brand-red);
  font-weight: 600;
}
.fsh-badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  color: var(--text-secondary);
}
.fsh-danger {
  color: var(--status-danger);
}
.fsh-warning {
  color: var(--status-warning);
}
.fsh-success {
  color: var(--status-success);
}
.fsh-notice {
  padding: 10px 12px;
  margin: 0 0 12px;
  border-left: 3px solid var(--brand-gold);
  background: var(--surface-subtle);
  font-size: 13px;
  line-height: 1.6;
}
.fsh-empty {
  padding: 28px 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.fsh-error {
  color: var(--status-danger);
  padding: 20px;
}
.fsh-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 0;
}
.fsh-workbench {
  display: grid;
  grid-template-columns: 270px minmax(300px, 1fr) 350px;
  border: 1px solid var(--border-default);
  background: white;
  min-height: 600px;
  margin-bottom: 16px;
}
.fsh-pane {
  min-width: 0;
  padding: 16px;
  overflow: auto;
  max-height: calc(100vh - 185px);
}
.fsh-pane + .fsh-pane {
  border-left: 1px solid var(--border-default);
}
.fsh-pane h2 {
  font-size: 14px;
  margin: 0 0 16px;
}
.fsh-pane h3 {
  font-size: 13px;
  margin: 20px 0 8px;
}
.fsh-conversation {
  display: block;
  padding: 12px 8px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
}
.fsh-conversation[aria-current="true"] {
  background: var(--surface-subtle);
  border-left: 3px solid var(--brand-red);
}
.fsh-conversation small {
  display: block;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-top: 5px;
}
.fsh-message {
  border-bottom: 1px solid var(--border-default);
  padding: 12px;
  margin-bottom: 8px;
}
.fsh-message.is-outbound {
  background: var(--surface-subtle);
  border-left: 2px solid var(--status-success);
}
.fsh-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}
.fsh-message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
  margin: 10px 0;
}
.fsh-kv {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 8px;
  line-height: 1.6;
}
.fsh-kv dt {
  color: var(--text-secondary);
  font-weight: 400;
}
.fsh-kv dd {
  overflow-wrap: anywhere;
  margin: 0;
}
.fsh-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.fsh-draft-text {
  width: 100%;
  line-height: 1.6;
  min-height: 210px;
}
.fsh-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 20px;
}
.fsh-metric {
  padding: 12px 16px;
  border-right: 1px solid var(--border-default);
}
.fsh-metric-label {
  font-size: 12px;
  color: var(--text-secondary);
}
.fsh-metric-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.fsh-dashboard-sections {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}
.fsh-section {
  min-width: 0;
}
.fsh-section h2 {
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 12px;
}
.fsh-section .fsh-table-scroll {
  max-height: 300px;
}
.fsh-tabs {
  display: none;
}
@media (min-width: 1600px) {
  .fsh-workbench {
    grid-template-columns: 290px minmax(400px, 1fr) 390px;
  }
}
@media (max-width: 1279px) {
  .fsh-workbench {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .fsh-pane-right {
    grid-column: 1/-1;
    border-top: 1px solid var(--border-default);
    max-height: none;
  }
  .fsh-table .fsh-secondary {
    display: none;
  }
}
@media (max-width: 899px) {
  .fsh-workbench {
    display: block;
    min-height: 0;
  }
  .fsh-pane {
    max-height: none;
    border: 0 !important;
  }
  .fsh-workbench[data-pane="messages"] .fsh-pane:not(.fsh-pane-messages),
  .fsh-workbench[data-pane="customers"] .fsh-pane:not(.fsh-pane-left),
  .fsh-workbench[data-pane="review"] .fsh-pane:not(.fsh-pane-right) {
    display: none;
  }
  .fsh-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
  }
  .fsh-dashboard-sections {
    grid-template-columns: 1fr;
  }
  .fsh-metric-strip {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }
  .fsh-toolbar input[type="search"] {
    width: 180px;
  }
  .fsh-shell {
    padding: 12px;
  }
}
.fsh-customer-context {
  background: var(--surface-main);
  border: 1px solid var(--border-default);
  padding: 16px;
  margin-bottom: 16px;
}
.fsh-customer-context .fsh-kv {
  grid-template-columns: 90px minmax(150px, 1fr) 90px minmax(150px, 1fr);
}
@media (max-width: 899px) {
  .fsh-customer-context .fsh-kv {
    grid-template-columns: 80px minmax(0, 1fr);
  }
}
.navbar .nav .fas,
.navbar .nav .far,
.navbar .nav .glyphicon,
.navbar .nav .color-icon {
  color: inherit !important;
}
.navbar a,
.navbar button,
.navbar .nav > li > a {
  color: #e8e8df;
}
.fsh-table td {
  max-width: 220px;
}
.fsh-table .fsh-secondary {
  max-width: 180px;
}
.fsh-table tbody tr:focus-visible {
  outline-offset: -2px;
}
.fsh-pane textarea[readonly] {
  color: var(--text-secondary);
  background: var(--surface-subtle);
}
#navbar .short-label,
#navbar .navbar-toggle,
#navbar .side-menu-button,
#navbar .minimizer,
#navbar .global-search-button,
#navbar .navbar-right > li > a {
  color: #e8e8df !important;
}

/* Phase 1: dual-module entry and collaboration cards */
.fsh-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.fsh-entry {
  display: block;
  padding: 22px 20px;
  border: 1px solid var(--border-color, #d4d4c8);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: inherit;
  text-decoration: none;
}
.fsh-entry:hover,
.fsh-entry:focus-visible {
  border-color: var(--brand, #3e5c46);
  text-decoration: none;
}
.fsh-entry h2 {
  margin: 0 0 6px;
  font-size: 18px;
}
.fsh-entry p {
  margin: 0;
  color: var(--text-secondary, #6b6b60);
  font-size: 13px;
}
.fsh-entry .fsh-entry-counts {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary, #6b6b60);
}
.fsh-kv-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 8px 0;
}
.fsh-idcand {
  border: 1px solid var(--border-color, #d4d4c8);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.fsh-idcand .btn {
  margin-left: 8px;
}
.fsh-form-row {
  margin-bottom: 8px;
}
.fsh-form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Boss history: compact native workbench, flat metrics and evidence. */
.fsh-insights-section { padding: 18px 22px; border-top: 1px solid #e2e5e9; }
.fsh-insights h2 { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.fsh-insights h2 small { margin-left: 10px; font-size: 12px; color: #555e6b; }
.fsh-insights-notice { padding: 10px 22px; background: #f5f6f8; color: #39424e; }
.fsh-insights-metrics { padding: 16px 22px; }
.fsh-insights-metrics p { margin: 10px 0 0; font-size: 12px; color: #555e6b; }
.fsh-insights-strip { display: flex; flex-wrap: wrap; gap: 18px 30px; }
.fsh-insights-strip span { display: block; font-size: 12px; color: #555e6b; }
.fsh-insights-strip strong { display: block; margin-top: 4px; font-size: 22px; font-variant-numeric: tabular-nums; }
.fsh-insights-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 12px; }
.fsh-insights-toolbar label { margin: 0; font-size: 12px; font-weight: normal; }
.fsh-insights-toolbar input { width: 260px; }
.fsh-insights-toolbar .form-control { margin-top: 4px; }
.fsh-insights .table { margin-bottom: 8px; font-size: 13px; }
.fsh-insights .table td { vertical-align: middle; padding: 8px; }
.fsh-insights-paging { display: flex; align-items: center; justify-content: flex-end; gap: 12px; font-size: 12px; }
.fsh-insights-detail dl > div { display: grid; grid-template-columns: 160px 1fr; border-bottom: 1px solid #eef0f2; padding: 9px 0; }
.fsh-insights-detail dd { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) { .fsh-insights-section, .fsh-insights-metrics { padding: 14px; } .fsh-insights-detail dl > div { grid-template-columns: 1fr; gap: 4px; } .fsh-insights-toolbar input { width: 210px; } }
.fsh-insights-suggestions .table-responsive { max-height: 280px; overflow: auto; }
.fsh-insights-suggestions th { position: sticky; top: 0; background: #f5f6f8; z-index: 1; }

/* Home: brand-led, flat operational sections. */
.fsh-home { padding: 20px; }
.fsh-home .fsh-header { min-height: 40px; margin-bottom: 20px; }
.fsh-home .btn { min-height: var(--fsh-control); }
.fsh-home-section + .fsh-home-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-default); }
.fsh-section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; }
.fsh-section-heading h2 { margin: 0; font-size: 16px; font-weight: 600; }
.fsh-section-heading > span, .fsh-section-heading > a, .fsh-section-caption { font-size: 12px; color: var(--text-secondary); }
.fsh-section-heading > a { color: var(--status-success); text-underline-offset: 3px; }
.fsh-section-caption { margin: 8px 0 12px; line-height: 1.6; }
.fsh-home-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; }
.fsh-home-metrics > div { padding: 0 20px; border-left: 1px solid var(--border-default); }
.fsh-home-metrics > div:first-child { padding-left: 0; border-left: 0; }
.fsh-home-metrics dt { color: var(--text-secondary); font-size: 12px; font-weight: 400; }
.fsh-home-metrics dd { margin-top: 8px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fsh-home-metrics .fsh-metric-unavailable { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.fsh-home-table { overflow: auto; max-height: 440px; scrollbar-color: var(--border-strong) var(--surface-subtle); }
.fsh-home-table .fsh-table { min-width: 740px; }
.fsh-home-table td:first-child { min-width: 200px; white-space: normal; overflow-wrap: anywhere; }
.fsh-home-table td small { display: block; margin-top: 4px; color: var(--text-muted); font-size: 12px; }
.fsh-home .fsh-empty { margin: 0; padding: 20px 0; }
.fsh-home ::selection { background: var(--border-default); color: var(--brand-forest); }
#navbar .nav-divider-text { color: #e8e8df; font-size: 12px; }
@media (max-width: 599px) {
  .fsh-home { padding: 12px; }
  .fsh-home-metrics { grid-template-columns: 1fr; gap: 12px; }
  .fsh-home-metrics > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; padding: 0; }
  .fsh-home-metrics dd { margin: 0; }
  .fsh-home .btn, .fsh-section-heading > a { min-height: 44px; display: inline-flex; align-items: center; }
  .fsh-home-section + .fsh-home-section { margin-top: 20px; padding-top: 16px; }
}
