:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e6e8ee;
  --orange: #ff7900;
  --orange-dark: #ea580c;
  --orange-soft: #fff0df;
  --info: #0ea5e9;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 10px 28px rgba(15, 23, 42, 0.12);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 48%, #ffffff 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--role-accent, var(--orange)) 68%, #ffffff);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

body.side-menu-open {
  overflow: hidden;
}

body.auth-locked {
  overflow: hidden;
  background: #f3f4f6;
}

body.auth-locked .app-shell {
  display: none;
}

svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(229, 231, 235, 0.65);
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 244, 246, 0.98)),
    url("./assets/factory-backdrop.svg") center / cover no-repeat;
}

.auth-card {
  width: min(100%, 430px);
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-float);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand strong {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 950;
}

.auth-brand span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.auth-tabs {
  margin-top: 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #f8fafc;
}

.auth-tabs button {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 14px;
  font-weight: 950;
}

.auth-tabs button.active {
  color: #fff;
  background: #111827;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
}

.auth-form {
  display: none;
  margin-top: 16px;
  gap: 11px;
}

.auth-form.active {
  display: grid;
}

.auth-form label,
.auth-role-field {
  display: grid;
  gap: 7px;
}

.auth-form label span,
.auth-role-field > span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 900;
}

.auth-form input {
  width: 100%;
  height: 44px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  outline: 0;
  color: var(--text);
  background: #fff;
}

.auth-form input:focus {
  border-color: rgba(255, 121, 0, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.12);
}

.auth-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.auth-role-grid button {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  box-shadow: none;
}

.auth-role-grid button.active {
  border-color: rgba(255, 121, 0, 0.66);
  background: #fff7ed;
}

.auth-role-grid strong,
.auth-role-grid span {
  display: block;
  min-width: 0;
}

.auth-role-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 950;
}

.auth-role-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.auth-submit {
  height: 46px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #ffae3c, #ff7900 58%, #f35c00);
  box-shadow: 0 14px 28px rgba(255, 121, 0, 0.24);
  font-weight: 950;
}

.auth-message {
  min-height: 18px;
  margin: 12px 0 0;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 850;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 78px;
  padding: 16px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(230, 232, 238, 0.86);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-lockup > div {
  min-width: 0;
}

.oy-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
  background: linear-gradient(145deg, #ffb13b 0%, #ff7900 54%, #ec5b00 100%);
  clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  box-shadow: 0 10px 22px rgba(255, 121, 0, 0.22);
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.brand-name span {
  font-size: 14px;
  font-weight: 800;
}

.brand-sub {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 3px;
  white-space: nowrap;
}

.header-tools {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.runtime-pill {
  min-width: 56px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
  box-shadow: none;
}

.icon-button,
.avatar-button {
  border: 0;
  background: transparent;
  padding: 0;
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.icon-button i {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--orange);
}

.avatar-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f8fafc;
  overflow: hidden;
  border: 1px solid var(--line);
}

.avatar-button img {
  width: 120%;
  height: 120%;
  object-fit: contain;
  transform: translate(-8%, -9%);
}

.workspace {
  padding: 0 16px 112px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.image2-home {
  display: none;
}

.image2-home img {
  display: block;
  width: 100%;
  height: 100dvh;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  border: 0;
  padding: 0;
  background: rgba(255, 121, 0, 0);
  border-radius: 16px;
}

.hotspot:focus-visible {
  outline: 2px solid rgba(255, 121, 0, 0.8);
  outline-offset: 2px;
  background: rgba(255, 121, 0, 0.08);
}

.hs-search { left: 5%; top: 11.6%; width: 90%; height: 5.3%; border-radius: 999px; }
.hs-send { left: 83%; top: 48.3%; width: 12%; height: 6.4%; border-radius: 999px; }
.hs-upload { left: 7%; top: 53.5%; width: 21%; height: 4.7%; border-radius: 999px; }
.hs-ref-ticket { left: 30%; top: 53.5%; width: 21%; height: 4.7%; border-radius: 999px; }
.hs-work-quick { left: 52%; top: 53.5%; width: 21%; height: 4.7%; border-radius: 999px; }
.hs-voice { left: 75%; top: 53.5%; width: 20%; height: 4.7%; border-radius: 999px; }
.hs-feature-parse { left: 5%; top: 64.4%; width: 21.5%; height: 10.4%; }
.hs-feature-ticket { left: 28.5%; top: 64.4%; width: 21.5%; height: 10.4%; }
.hs-feature-issue { left: 52%; top: 64.4%; width: 21.5%; height: 10.4%; }
.hs-feature-work { left: 75.5%; top: 64.4%; width: 20%; height: 10.4%; }
.hs-feature-progress { left: 5%; top: 76%; width: 21.5%; height: 10.4%; }
.hs-feature-schedule { left: 28.5%; top: 76%; width: 21.5%; height: 10.4%; }
.hs-nav-room { left: 23%; top: 91.5%; width: 16%; height: 7.5%; border-radius: 999px; }
.hs-nav-scan { left: 43%; top: 89.4%; width: 14%; height: 8.2%; border-radius: 999px; }
.hs-nav-ticket { left: 62%; top: 91.5%; width: 16%; height: 7.5%; border-radius: 999px; }
.hs-nav-profile { left: 82%; top: 91.5%; width: 16%; height: 7.5%; border-radius: 999px; }

.search-bar {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-field {
  min-width: 0;
  flex: 1;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68);
}

.search-field svg {
  color: #6b7280;
  flex: 0 0 auto;
}

.search-field .search-icon {
  width: 20px;
  height: 20px;
  color: #8b95a1;
}

.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}

.search-field input::placeholder,
.command-card input::placeholder,
.chat-composer input::placeholder {
  color: #9ca3af;
}

.search-bar button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #4b5563;
}

.search-bar .menu-trigger {
  border: 1px solid #e5e7eb;
  color: #4b5563;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.search-bar .history-back,
.view-back-button {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.search-bar .menu-trigger svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.search-bar .history-back svg {
  width: 20px;
  height: 20px;
}

.search-field .scan-trigger {
  width: 32px;
  height: 32px;
  border-radius: 13px;
  background: #fff;
  color: #6b7280;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.search-field .scan-trigger svg {
  width: 20px;
  height: 20px;
}

.role-context {
  margin-top: 8px;
  min-height: 38px;
  padding: 6px 8px 6px 10px;
  border: 1px solid rgba(255, 190, 124, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.role-context > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.role-context span,
.role-switcher span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.role-context strong {
  display: inline;
  margin-top: 0;
  font-size: 15px;
  font-weight: 950;
  white-space: nowrap;
}

.role-context p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
}

.role-context-button {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: #c2410c;
  background: #ffedd5;
  font-size: 11px;
  font-weight: 900;
}

.role-context-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.role-switcher {
  display: none;
  margin-top: 10px;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.role-switcher::-webkit-scrollbar {
  display: none;
}

.role-switcher button {
  flex: 0 0 auto;
  min-width: 96px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

.role-switcher button.active {
  border-color: rgba(255, 121, 0, 0.55);
  background: var(--orange-soft);
  box-shadow: 0 10px 22px rgba(255, 121, 0, 0.13);
}

.role-switcher strong {
  display: block;
  font-size: 13px;
  font-weight: 950;
}

.role-switcher button.active strong {
  color: var(--orange-dark);
}

.poster-hero {
  min-height: 446px;
  margin-top: 14px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff8ef 0%, #ffffff 68%, #fff 100%);
  border: 1px solid rgba(255, 190, 124, 0.45);
  box-shadow: var(--shadow-card);
}

.app-shell[data-role="sales_dispatcher"] {
  --role-accent: #2563eb;
  --role-soft: #eff6ff;
}

.app-shell[data-role="production_dispatcher"] {
  --role-accent: #ff7900;
  --role-soft: #fff4e8;
}

.app-shell[data-role="material_keeper"] {
  --role-accent: #f59e0b;
  --role-soft: #fffbeb;
}

.app-shell[data-role="machine_leader"] {
  --role-accent: #0f766e;
  --role-soft: #ecfdf5;
}

.app-shell[data-role="finished_goods_keeper"] {
  --role-accent: #16a34a;
  --role-soft: #f0fdf4;
}

.app-shell[data-role="manager"] {
  --role-accent: #7c3aed;
  --role-soft: #f5f3ff;
}

.app-shell[data-role] .poster-hero {
  background:
    radial-gradient(circle at 80% 22%, color-mix(in srgb, var(--role-accent) 16%, transparent), transparent 28%),
    linear-gradient(180deg, var(--role-soft) 0%, #ffffff 70%, #fff 100%);
  border-color: color-mix(in srgb, var(--role-accent) 28%, #ffffff);
}

.poster-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.86)),
    url("./assets/factory-backdrop.svg") center / cover no-repeat;
  opacity: 0.95;
}

.hero-copy {
  position: absolute;
  left: 22px;
  top: 24px;
  z-index: 1;
}

.hero-copy p,
.hero-copy h1 {
  margin: 0;
  color: var(--role-accent, var(--orange));
  font-weight: 950;
  letter-spacing: 0;
}

.hero-copy p {
  font-size: 18px;
}

.hero-copy h1 {
  margin-top: 4px;
  font-size: 28px;
}

.speech-bubble {
  position: absolute;
  left: 42px;
  right: 42px;
  top: 100px;
  z-index: 2;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 22px;
  background: #fff;
  color: color-mix(in srgb, var(--role-accent, var(--orange-dark)) 78%, #111827);
  border: 1px solid color-mix(in srgb, var(--role-accent, var(--orange)) 22%, #ffffff);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--role-accent, var(--orange)) 16%, transparent);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
  text-align: center;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  transform: translateX(-50%);
  border-width: 12px 10px 0;
  border-style: solid;
  border-color: #fff transparent transparent;
}

.hero-mascot {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -20px;
  width: 382px;
  height: 382px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 24px rgba(121, 53, 0, 0.12));
}

.role-prop {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: 32px;
  width: 118px;
  min-height: 84px;
  padding: 12px 12px 10px;
  border: 1px solid color-mix(in srgb, var(--role-accent, var(--orange)) 26%, #ffffff);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.12);
  backdrop-filter: blur(12px);
}

.role-prop::before {
  content: "";
  display: block;
  width: 38px;
  height: 38px;
  margin-bottom: 7px;
  border-radius: 13px;
  background: var(--role-accent, var(--orange));
  mask: var(--role-mask) center / 26px 26px no-repeat;
  -webkit-mask: var(--role-mask) center / 26px 26px no-repeat;
}

.role-prop strong,
.role-prop span {
  display: block;
  line-height: 1.15;
}

.role-prop strong {
  font-size: 14px;
  font-weight: 950;
}

.role-prop span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.role-prop.sales {
  --role-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 3h10a2 2 0 0 1 2 2v16H5V5a2 2 0 0 1 2-2Zm2 4v2h6V7H9Zm0 4v2h6v-2H9Zm0 4v2h4v-2H9Z'/%3E%3C/svg%3E");
}

.role-prop.schedule {
  --role-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 5h16v14H4V5Zm2 3v2h12V8H6Zm0 4v2h5v-2H6Zm7 0v2h5v-2h-5Zm-7 4v1h12v-1H6Z'/%3E%3C/svg%3E");
}

.role-prop.material {
  --role-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m12 2 9 5v10l-9 5-9-5V7l9-5Zm0 2.3L5.4 8 12 11.7 18.6 8 12 4.3ZM5 9.8v6l6 3.4v-6L5 9.8Zm14 0-6 3.4v6l6-3.4v-6Z'/%3E%3C/svg%3E");
}

.role-prop.work {
  --role-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5 4h14v5H5V4Zm2 7h10v3H7v-3Zm-2 5h14v4H5v-4Zm2-10v1h10V6H7Z'/%3E%3C/svg%3E");
}

.role-prop.inbound {
  --role-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16v12h-5l-2 3h-2l-2-3H4V4Zm3 4h10V6H7v2Zm0 4h6v-2H7v2Z'/%3E%3C/svg%3E");
}

.role-prop.manager {
  --role-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 19V5h16v14H4Zm3-3h2v-5H7v5Zm4 0h2V8h-2v8Zm4 0h2v-3h-2v3Z'/%3E%3C/svg%3E");
}

.command-card,
.metric-strip,
.role-workbench,
.section-block,
.ticket-row,
.room-msg,
.request-row,
.workflow-card,
.confirm-card,
.profile-card,
.profile-account-card,
.boundary-list {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.command-card {
  margin-top: 12px;
  padding: 13px;
  border-radius: 20px;
}

.command-card form {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  align-items: center;
}

.command-card input {
  height: 48px;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}

.command-card form button,
.scan-nav,
.chat-nav {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, #ffae3c, #ff7900 58%, #f35c00);
  box-shadow: 0 14px 28px rgba(255, 121, 0, 0.26);
}

.role-fab {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 34;
  min-width: 104px;
  max-width: 138px;
  height: 48px;
  transform: translateX(72px);
  border: 0;
  border-radius: 999px;
  padding: 6px 12px 6px 10px;
  display: grid;
  grid-template-columns: 26px 1fr;
  grid-template-rows: 15px 17px;
  column-gap: 7px;
  align-items: center;
  color: #fff;
  background: linear-gradient(145deg, #ffae3c, #ff7900 58%, #f35c00);
  box-shadow: 0 16px 34px rgba(255, 121, 0, 0.33);
}

.role-fab svg {
  grid-row: 1 / 3;
  width: 22px;
  height: 22px;
}

.role-fab span,
.role-fab strong {
  min-width: 0;
  line-height: 1;
  text-align: left;
}

.role-fab span {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.84;
}

.role-fab strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 950;
}

.app-shell[data-role="sales_dispatcher"] .role-fab {
  display: none;
}

.command-card form button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.quick-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.quick-row button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 850;
}

.quick-row svg {
  width: 18px;
  height: 18px;
  color: #6b7280;
}

.metric-strip {
  margin-top: 14px;
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
}

.metric-strip div {
  padding: 14px 10px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-right: 1px solid var(--line);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip strong {
  color: var(--orange);
  font-size: 22px;
  line-height: 1;
}

.metric-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.role-workbench {
  margin-top: 12px;
  border-radius: 18px;
  padding: 12px;
}

.role-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.role-workbench-head span,
.role-prompt-block > span {
  display: block;
  color: var(--role-accent, var(--orange));
  font-size: 11px;
  font-weight: 950;
}

.role-workbench-head strong {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 950;
}

.role-workbench-head button {
  flex: 0 0 auto;
  height: 30px;
  border: 1px solid color-mix(in srgb, var(--role-accent, var(--orange)) 26%, #ffffff);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--role-accent, var(--orange-dark));
  background: var(--role-soft, #fff7ed);
  font-size: 12px;
  font-weight: 950;
}

.role-auto-strip {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.role-auto-strip span {
  min-width: 0;
  border-radius: 10px;
  padding: 7px 8px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
}

.role-auto-strip b {
  display: block;
  margin-bottom: 2px;
  color: #111827;
  font-size: 13px;
  line-height: 1.1;
}

.role-auto-strip .is-ok {
  color: #047857;
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.role-auto-strip .is-warn {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.role-auto-strip .is-info {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.role-focus-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.role-focus-grid article {
  min-width: 0;
  min-height: 62px;
  border-radius: 12px;
  padding: 9px 8px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.role-focus-grid strong,
.role-focus-grid span {
  display: block;
  min-width: 0;
}

.role-focus-grid strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #111827;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
}

.role-focus-grid strong em {
  flex: 0 0 auto;
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--role-accent, var(--orange));
  background: var(--role-soft, #fff7ed);
  font-size: 11px;
  line-height: 1.2;
  font-style: normal;
  text-align: center;
}

.role-focus-grid span {
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 800;
}

.role-prompt-block {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #eef2f7;
}

.role-prompt-block > div {
  margin-top: 7px;
  display: grid;
  gap: 7px;
}

.role-prompt-block button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 7px 9px;
  color: #334155;
  background: #fff;
  text-align: left;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 850;
}

.role-data-strip {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-data-strip em {
  border-radius: 999px;
  padding: 4px 7px;
  color: #475569;
  background: #f1f5f9;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.role-workbench p {
  margin: 9px 0 0;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 800;
}

.section-block {
  margin-top: 18px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 950;
}

.section-head h2 span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 121, 0, 0.1);
}

.section-head button {
  border: 0;
  background: transparent;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 800;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.feature-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-card);
  display: grid;
  justify-items: start;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.feature-card::after {
  content: "";
  position: absolute;
  right: -15px;
  top: -15px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffb13b, #ff7900);
  opacity: 0.95;
}

.feature-card:nth-child(2)::after,
.feature-card:nth-child(5)::after {
  background: var(--info);
}

.feature-card:nth-child(3)::after {
  background: #3b170f;
}

.feature-card:nth-child(6)::after {
  background: var(--warning);
}

.feature-card i {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--orange);
  background: #fff4e8;
}

.feature-card strong {
  margin-top: 11px;
  font-size: 16px;
  font-weight: 950;
}

.feature-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket-row {
  width: 100%;
  min-height: 76px;
  padding: 13px 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.ticket-row strong,
.request-row strong {
  font-size: 14px;
  font-weight: 950;
}

.ticket-row p,
.request-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ticket-row em,
.sub-page-head span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: #9a3412;
  background: #ffedd5;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.officer-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.officer-rail::-webkit-scrollbar {
  display: none;
}

.officer-card {
  flex: 0 0 145px;
  min-height: 162px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 10px;
  text-align: left;
}

.officer-card img {
  width: 100%;
  height: 84px;
  object-fit: contain;
}

.officer-card strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  font-weight: 950;
}

.officer-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.sub-page-head {
  margin-top: 8px;
  padding: 15px 2px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sub-page-head > div {
  min-width: 0;
  flex: 1;
}

.view-back-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}

.view-back-button svg {
  width: 20px;
  height: 20px;
}

.sub-page-head h2 {
  margin: 0;
  font-size: 23px;
  font-weight: 950;
}

.sub-page-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.room-view {
  padding-bottom: 134px;
}

.room-square-head {
  margin-top: 5px;
  padding: 6px 0 11px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.room-square-head span {
  display: block;
  color: var(--orange);
  font-size: 12px;
  font-weight: 950;
}

.room-square-head h2 {
  margin: 3px 0 0;
  font-size: 21px;
  line-height: 1.16;
  font-weight: 950;
}

.room-square-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.room-square-stats {
  margin: 11px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

.room-square-stats div {
  min-width: 0;
  padding: 11px 8px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.room-square-stats div:last-child {
  border-right: 0;
}

.room-square-stats strong {
  display: block;
  color: var(--orange);
  font-size: 20px;
  line-height: 1;
  font-weight: 950;
}

.room-square-stats span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.room-filter-row {
  margin: -2px -2px 10px;
  padding: 0 2px 2px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.room-filter-row::-webkit-scrollbar {
  display: none;
}

.room-filter-row button {
  flex: 0 0 auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  font-size: 11px;
  font-weight: 950;
}

.room-filter-row button.active {
  border-color: rgba(255, 121, 0, 0.42);
  color: #9a3412;
  background: #fff7ed;
}

.room-filter-row b {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 10px;
  line-height: 1;
}

.room-filter-row button.active b {
  color: #fff;
  background: #ff7900;
}

.room-search-field {
  height: 44px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 13px;
  background: #fff;
}

.room-search-field svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
}

.room-search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.room-ticket-list {
  display: grid;
  gap: 9px;
}

.room-ticket-empty {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
}

.room-ticket-card {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-items: stretch;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.room-ticket-card-main {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.room-ticket-card-top {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.room-ticket-card-top strong {
  display: block;
  color: #111827;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.room-ticket-card p,
.room-ticket-card small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.room-ticket-card em {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.room-ticket-card em.is-warn {
  color: #9a3412;
  background: #ffedd5;
}

.room-ticket-card em.is-info {
  color: #075985;
  background: #e0f2fe;
}

.room-ticket-card em.is-done {
  color: #166534;
  background: #dcfce7;
}

.room-ticket-card em.is-danger {
  color: #991b1b;
  background: #fee2e2;
}

.room-ticket-card em.is-neutral {
  color: #475569;
  background: #f1f5f9;
}

.room-ticket-meta-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.room-ticket-meta-grid span {
  min-width: 0;
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  border-radius: 10px;
  padding: 6px 8px;
  color: #334155;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.room-ticket-meta-grid b {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 950;
}

.room-ticket-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-ticket-tag {
  max-width: 100%;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
}

.room-ticket-tag.is-warn {
  color: #9a3412;
  background: #ffedd5;
}

.room-ticket-tag.is-info {
  color: #075985;
  background: #e0f2fe;
}

.room-ticket-tag.is-done {
  color: #166534;
  background: #dcfce7;
}

.room-ticket-tag.is-danger {
  color: #991b1b;
  background: #fee2e2;
}

.room-ticket-tag.is-neutral {
  color: #475569;
  background: #f1f5f9;
}

.room-ticket-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 7px;
  padding-top: 3px;
}

.room-ticket-actions button {
  min-width: 0;
  height: 34px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 950;
}

.room-ticket-actions button:first-child {
  color: #fff;
  border-color: transparent;
  background: #ff7900;
}

.room-ticket-actions button.danger {
  color: #991b1b;
  border-color: #fecaca;
  background: #fff1f2;
}

.room-head {
  margin-top: 5px;
  padding: 6px 0 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.room-title {
  min-width: 0;
}

.room-title span {
  display: block;
  color: var(--orange);
  font-size: 12px;
  font-weight: 950;
}

.room-title h2 {
  margin: 3px 0 0;
  font-size: 19px;
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: 0;
}

.room-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-status {
  border: 0;
  border-radius: 999px;
  padding: 5px 8px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 950;
}

.room-summary-strip {
  margin: 0 -16px;
  padding: 6px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.room-summary-strip button {
  min-width: 0;
  border: 0;
  border-right: 1px solid #eef0f3;
  background: transparent;
  padding: 1px 7px;
  text-align: left;
}

.room-summary-strip button:first-child {
  padding-left: 0;
}

.room-summary-strip button:last-child {
  border-right: 0;
  padding-right: 0;
}

.room-summary-strip span,
.room-summary-strip em {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  white-space: nowrap;
}

.room-summary-strip strong {
  display: block;
  margin: 2px 0 1px;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-member-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.room-member-row strong {
  color: var(--text);
  font-weight: 950;
}

.room-avatar-stack {
  display: flex;
  padding-left: 1px;
  flex: 0 0 auto;
}

.room-avatar-stack i {
  width: 22px;
  height: 22px;
  margin-left: -5px;
  display: grid;
  place-items: center;
  border: 1px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #111827;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.room-avatar-stack i:first-child {
  margin-left: 0;
}

.room-avatar-stack i:nth-child(1) { background: #2563eb; }
.room-avatar-stack i:nth-child(2) { background: #059669; }
.room-avatar-stack i:nth-child(3) { background: #b45309; }
.room-avatar-stack i:nth-child(4) { background: #7c3aed; }
.room-avatar-stack i:nth-child(5) { background: #475569; }
.room-avatar-stack i:nth-child(6) { background: #ff7900; }

.room-feed {
  display: grid;
  max-height: clamp(200px, calc(100dvh - 455px), 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.room-feed::-webkit-scrollbar {
  display: none;
}

.room-day-divider {
  padding: 8px 0 5px 38px;
  color: #9ca3af;
  font-size: 11px;
}

.room-line {
  position: relative;
  padding: 7px 0 8px 38px;
  border-bottom: 1px solid #eef0f3;
}

.room-line-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.room-line-meta span {
  position: absolute;
  left: 0;
  top: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
}

.room-line-sales .room-line-meta span { background: #2563eb; }
.room-line-dispatch .room-line-meta span { background: #059669; }
.room-line-warehouse .room-line-meta span { background: #b45309; }
.room-line-user .room-line-meta span { background: #334155; }
.room-line-ai .room-line-meta span { background: #ff7900; }

.room-line-meta strong {
  min-width: 0;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-line-meta time {
  margin-left: auto;
  color: #9ca3af;
  font-size: 11px;
  white-space: nowrap;
}

.room-line-meta em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 6px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.room-line p {
  margin: 4px 0 0;
  color: #111827;
  font-size: 13px;
  line-height: 1.42;
}

.room-line mark {
  padding: 0;
  color: #9a3412;
  background: transparent;
  font-weight: 950;
}

.room-inline-data {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px 6px;
}

.room-inline-data span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 7px;
  color: #4b5563;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.room-line-ai {
  margin: 2px -6px 0 36px;
  padding: 8px 8px 9px 11px;
  border-bottom: 1px solid #fed7aa;
  border-left: 3px solid var(--orange);
  background: #fffaf4;
}

.room-line-ai .room-line-meta span {
  left: -38px;
}

.room-action-line {
  margin-top: 7px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
}

.room-action-line button {
  min-height: 30px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-size: 12px;
  font-weight: 950;
}

.room-pending-bar {
  position: fixed;
  left: 50%;
  bottom: 150px;
  z-index: 17;
  width: min(398px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.room-pending-item {
  min-width: 0;
  min-height: 40px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 1px 7px;
  padding: 6px 9px;
  text-align: left;
}

.room-pending-item:last-child {
  border-right: 0;
}

.room-pending-item .status-dot {
  grid-row: 1 / 3;
}

.room-pending-item strong {
  min-width: 0;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 950;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-pending-item em,
.room-pending-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  font-style: normal;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.warn {
  background: var(--orange);
}

.status-dot.info {
  background: var(--info);
}

.chat-composer {
  position: fixed;
  left: 50%;
  bottom: 88px;
  z-index: 18;
  width: min(398px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(18px);
}

.chat-composer input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding-left: 9px;
}

.chat-composer button,
.confirm-card button,
.danger-action {
  border: 0;
  color: #fff;
  background: linear-gradient(145deg, #ffae3c, #ff7900 58%, #f35c00);
  font-weight: 900;
}

.chat-composer button {
  height: 38px;
  border-radius: 999px;
}

.room-composer {
  position: fixed;
  left: 50%;
  bottom: 88px;
  width: min(398px, calc(100% - 32px));
  transform: translateX(-50%);
  grid-template-columns: 34px minmax(0, 1fr) 34px 54px;
  gap: 6px;
  padding: 7px;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.09);
}

.room-composer input {
  padding: 0 2px;
  font-size: 13px;
}

.room-composer .composer-icon,
.room-composer .composer-send {
  border: 0;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 13px;
}

.room-composer .composer-icon {
  color: #6b7280;
  background: #f3f4f6;
}

.room-composer .composer-icon svg {
  width: 18px;
  height: 18px;
}

.room-composer .composer-send {
  color: #fff;
  background: var(--orange);
  font-weight: 950;
}

.ticket-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.ticket-summary div {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px 8px;
  text-align: center;
}

.ticket-summary span {
  color: var(--muted);
  font-size: 12px;
}

.ticket-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
}

.workflow-card {
  margin-top: 12px;
  border-radius: 18px;
  padding: 16px;
}

.workflow-step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 0 0 17px;
  position: relative;
}

.workflow-step:last-child {
  padding-bottom: 0;
}

.workflow-step::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.workflow-step:last-child::before {
  display: none;
}

.workflow-step i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #d1d5db;
  margin-top: 2px;
  z-index: 1;
}

.workflow-step.done i {
  background: var(--success);
}

.workflow-step.active i {
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(255, 121, 0, 0.13);
}

.workflow-step strong {
  font-size: 14px;
}

.workflow-step span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.confirm-card {
  margin-top: 12px;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #fffaf4, #fff);
  border-color: #fed7aa;
}

.confirm-card p {
  margin: 7px 0 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.confirm-card button {
  width: 100%;
  height: 44px;
  border-radius: 12px;
}

.profile-card {
  margin-top: 18px;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-card img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.profile-card h2 {
  margin: 0;
  font-size: 22px;
}

.profile-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-account-card {
  margin-top: 12px;
  min-height: 74px;
  padding: 14px 15px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-account-card div {
  min-width: 0;
}

.profile-account-card span,
.profile-account-card p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.profile-account-card strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 950;
}

.profile-account-card p {
  margin: 4px 0 0;
}

.profile-account-card button {
  flex: 0 0 auto;
  height: 36px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 950;
}

.boundary-list {
  margin-top: 12px;
  border-radius: 18px;
  overflow: hidden;
}

.boundary-list div {
  min-height: 50px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}

.boundary-list div:last-child {
  border-bottom: 0;
}

.boundary-list strong {
  font-size: 14px;
}

.boundary-list span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.admin-entry-button,
.admin-save-button {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 950;
  box-shadow: 0 14px 30px rgba(255, 121, 0, 0.22);
}

.admin-entry-button svg {
  width: 20px;
  height: 20px;
}

.admin-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-card);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-head strong {
  font-size: 18px;
  font-weight: 950;
}

.admin-panel-head span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
}

.admin-switch-row,
.admin-field-row {
  min-height: 66px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-switch-row div {
  min-width: 0;
}

.admin-switch-row strong,
.admin-field-row span {
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.admin-switch-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-switch-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  accent-color: var(--orange);
}

.admin-field-row {
  align-items: flex-start;
  flex-direction: column;
}

.admin-field-row input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  padding: 0 12px;
  background: #fff;
}

.admin-field-row input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
}

.admin-stat-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.admin-stat-grid div {
  min-height: 58px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.admin-stat-grid div:last-child {
  border-right: 0;
}

.admin-stat-grid strong {
  color: var(--orange);
  font-size: 19px;
  font-weight: 950;
}

.admin-stat-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.admin-library-tools {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.admin-library-tools input {
  grid-column: 1 / -1;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  outline: 0;
}

.admin-library-tools button {
  height: 36px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 950;
}

.admin-library-source-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-library-source-list button {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 3px;
  text-align: left;
}

.admin-library-source-list button.active {
  border-color: #fdba74;
  background: #fff7ed;
}

.admin-library-source-list strong,
.admin-library-source-list span,
.admin-record-card strong,
.admin-record-card span,
.admin-record-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-library-source-list strong {
  color: #111827;
  font-size: 12.5px;
  font-weight: 950;
}

.admin-library-source-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.admin-library-record-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.admin-record-card {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: grid;
  gap: 3px;
  text-align: left;
}

.admin-record-card i {
  color: #ea580c;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.admin-record-card strong {
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.admin-record-card span {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 850;
}

.admin-record-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.admin-empty-state {
  padding: 12px;
  border: 1px dashed #fed7aa;
  border-radius: 12px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.admin-pair-group {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.admin-pair-group > strong {
  color: #334155;
  font-size: 12px;
  font-weight: 950;
}

.admin-pair-group button {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 6px;
  align-items: center;
  text-align: left;
}

.admin-pair-group span {
  color: #ea580c;
  font-size: 11px;
  font-weight: 950;
}

.admin-pair-group b {
  color: #111827;
  font-size: 12px;
}

.admin-pair-group em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: min(430px, 100%);
  height: 82px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 70px repeat(3, minmax(0, 1fr));
  align-items: center;
  padding: 6px 8px 10px;
  border-top: 1px solid rgba(230, 232, 238, 0.9);
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -4px 18px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.ai-help-float {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 36;
  transform: translateX(-198px);
  touch-action: none;
  user-select: none;
}

.ai-help-float.dragging {
  transition: none;
}

.ai-help-main {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #111827, #ff7900);
  box-shadow: 0 14px 30px rgba(255, 121, 0, 0.24);
}

.app-shell[data-view="home"] .ai-help-float {
  display: block;
}

.ai-help-main strong,
.ai-help-main span {
  display: block;
  line-height: 1;
}

.ai-help-main strong {
  font-size: 14px;
  font-weight: 950;
}

.ai-help-main span {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 900;
}

.ai-help-close {
  position: absolute;
  right: -7px;
  top: -8px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  color: #64748b;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  font-size: 15px;
  font-weight: 900;
  line-height: 18px;
}

.ai-help-float.closed {
  display: none !important;
}

.nav-item {
  border: 0;
  background: transparent;
}

.nav-item {
  height: 64px;
  display: grid;
  place-items: center;
  gap: 2px;
  color: #6b7280;
}

.nav-item.active {
  color: var(--orange);
}

.nav-item svg,
.chat-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  font-size: 11px;
  font-weight: 850;
}

.chat-nav {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  justify-self: center;
  gap: 1px;
  border: 4px solid #fff;
  transform: translateY(-16px);
  color: #fff;
  background: #ff7900;
  box-shadow: 0 10px 22px rgba(255, 121, 0, 0.22);
}

.chat-nav span {
  font-size: 11px;
  font-weight: 950;
}

.side-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 36;
  background: rgba(17, 24, 39, 0.35);
}

.side-menu {
  --shell-left: max(0px, calc(50vw - 215px));
  position: fixed;
  z-index: 37;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(320px, 80vw);
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 18px 0 50px rgba(17, 24, 39, 0.16);
  transform: translateX(calc(-100% - 24px));
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.side-menu.open {
  transform: translateX(var(--shell-left));
}

.side-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--line);
}

.side-menu-head span {
  color: #ff7900;
  font-size: 12px;
  font-weight: 950;
}

.side-menu-head strong {
  display: block;
  margin-top: 4px;
  font-size: 21px;
  font-weight: 950;
}

.side-menu-list {
  margin-top: 14px;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 14px;
  overscroll-behavior: contain;
}

.side-menu-list button {
  width: 100%;
  min-height: 48px;
  padding: 9px 11px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.side-menu-list button.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.18);
}

.side-menu-list i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ff7900;
  background: #fff7ed;
}

.side-menu-list button.active i {
  color: #111827;
  background: #fff;
}

.side-menu-list svg {
  width: 19px;
  height: 19px;
}

.side-menu-list span {
  font-size: 14px;
  font-weight: 950;
}

.side-menu-list em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.side-menu-list button.active em {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.side-menu-admin {
  margin-top: auto;
  flex: 0 0 auto;
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: #111827;
  font-weight: 950;
}

.side-menu-admin svg {
  width: 20px;
  height: 20px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(17, 24, 39, 0.42);
}

.bottom-sheet {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  width: min(430px, 100%);
  max-height: 82vh;
  overflow: auto;
  transform: translate(-50%, 105%);
  transition: transform 180ms ease;
  border-radius: 24px 24px 0 0;
  background: #fff;
  box-shadow: 0 -24px 60px rgba(17, 24, 39, 0.2);
  padding: 10px 16px 16px;
}

.bottom-sheet.open {
  transform: translate(-50%, 0);
}

.grabber {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  margin: 0 auto 14px;
}

.sheet-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
}

.close-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #f9fafb;
  display: grid;
  place-items: center;
  color: #6b7280;
}

.detail-list {
  margin-top: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.detail-row {
  min-height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row span {
  color: var(--muted);
  font-size: 13px;
}

.detail-row strong {
  font-size: 14px;
  text-align: right;
}

.detail-row.missing {
  background: #fff7ed;
}

.detail-row.missing span,
.detail-row.missing strong {
  color: #c2410c;
}

.risk-box {
  margin-top: 13px;
  padding: 13px;
  border-radius: 14px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  font-size: 13px;
  line-height: 1.55;
}

.handoff-detail-list {
  border-radius: 14px;
}

.sales-handoff-note {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #dbeafe;
  border-radius: 13px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
}

.sheet-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-actions.single {
  grid-template-columns: 1fr;
}

.sheet-actions.template-actions {
  grid-template-columns: 1fr 1fr;
}

.sheet-actions.template-actions .primary-wide {
  grid-column: 1 / -1;
}

.sheet-actions button {
  height: 48px;
  border-radius: 13px;
  font-weight: 950;
}

.secondary-action {
  border: 1px solid var(--line);
  background: #f9fafb;
}

.secondary-action.destructive {
  border-color: #fecaca;
  color: #991b1b;
  background: #fff1f2;
}

.role-sheet-list {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}

.role-sheet-list button {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
}

.role-sheet-list button.active {
  border-color: rgba(255, 121, 0, 0.58);
  background: #fff7ed;
}

.role-sheet-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.role-sheet-list strong {
  font-size: 15px;
  font-weight: 950;
}

.role-sheet-list span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 900;
}

.role-sheet-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.sales-history-loading {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 13px;
}

.sales-history-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.sales-history-actions .danger-action {
  width: auto;
  min-width: 112px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
}

.sales-history-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.sales-history-list button {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 11px 84px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.sales-history-list button.active {
  border-color: rgba(255, 121, 0, 0.58);
  background: #fff7ed;
}

.sales-history-list strong,
.sales-history-list span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-history-list strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
}

.sales-history-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.sales-history-list em {
  position: absolute;
  right: 12px;
  top: 14px;
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.sales-help-sheet {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.sales-help-sheet section {
  padding: 13px;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  background: #fff7ed;
}

.sales-help-sheet strong {
  display: block;
  color: #9a3412;
  font-size: 14px;
  font-weight: 950;
}

.sales-help-sheet p {
  margin: 6px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.menu-admin-tabs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.menu-admin-tabs button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  font-weight: 950;
}

.menu-admin-tabs button.active {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.menu-admin-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.menu-admin-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.menu-admin-row.dragging {
  opacity: 0.55;
}

.menu-row-grip {
  width: 26px;
  min-height: 100%;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 950;
  cursor: grab;
}

.menu-row-fields {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.menu-row-fields label {
  display: grid;
  gap: 5px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 850;
}

.menu-row-fields input,
.menu-row-fields select {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0 9px;
  color: #111827;
  font-size: 12px;
}

.menu-row-fields label:nth-child(1),
.menu-row-fields label:nth-child(4) {
  grid-column: 1 / -1;
}

.menu-enabled {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.menu-enabled input {
  width: 16px;
  height: 16px;
}

.menu-delete {
  grid-column: 2;
  height: 34px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 12px;
  font-weight: 950;
}

.menu-admin-actions {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.menu-admin-actions button {
  height: 46px;
  border-radius: 13px;
  font-weight: 950;
}

.sales-style-lab {
  display: none;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .home-generic {
  display: none;
}

.app-shell[data-role="sales_dispatcher"] .role-context {
  display: none;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab {
  display: block;
  margin-top: 6px;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .workspace {
  padding-bottom: 88px;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] #view-home.active {
  min-height: auto;
  display: block;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] #view-home.active > .search-bar {
  flex: 0 0 auto;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] {
  display: block;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-chat-shell {
  min-height: calc(100vh - 204px);
  min-height: calc(100dvh - 204px);
  display: flex;
  flex-direction: column;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-chat-head,
.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-quick-actions.compact,
.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-input-zone.chat-mode,
.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-flow-cue {
  flex: 0 0 auto;
}

.sales-style-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #ff9a1f, #ff7900 52%, #1f2937);
  box-shadow: 0 14px 30px rgba(255, 121, 0, 0.18);
}

.sales-style-top span {
  display: block;
  font-size: 12px;
  font-weight: 850;
  opacity: 0.78;
}

.sales-style-top strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 950;
}

.sales-style-top button,
.sales-primary-action {
  border: 0;
  color: #fff;
  background: #111827;
  font-weight: 950;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

.sales-style-top button {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
}

.sales-style-tabs {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sales-style-tabs button {
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  text-align: left;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.04);
}

.sales-style-tabs button.active {
  border-color: rgba(255, 121, 0, 0.55);
  background: #fff7ed;
  box-shadow: 0 10px 24px rgba(255, 121, 0, 0.12);
}

.sales-style-tabs strong {
  display: block;
  font-size: 13px;
  font-weight: 950;
}

.sales-style-tabs span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.25;
}

.sales-chat-shell,
.sales-audit-shell,
.sales-template-shell,
.sales-handoff-shell {
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.sales-chat-shell {
  padding: 10px;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f7fa 100%);
  border: 1px solid #dfe5ed;
  border-radius: 18px;
  box-shadow: none;
}

.sales-chat-head {
  min-height: 94px;
  padding: 10px 42px 10px 10px;
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #edf0f4;
  overflow: hidden;
}

.sales-chat-head img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  object-position: bottom center;
  filter: none;
}

.sales-chat-head span {
  color: #ea580c;
  font-size: 11px;
  font-weight: 950;
}

.sales-chat-head h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 950;
  letter-spacing: 0;
}

.sales-chat-head p {
  margin: 6px 0 0;
  color: #6b7280;
  font-size: 11.5px;
  line-height: 1.35;
}

.sales-chat-head .sales-help-button {
  position: absolute;
  top: 10px;
  right: 10px;
}

.sales-work-summary {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #dfe5ed;
  border-radius: 12px;
  background: #fff;
}

.sales-work-summary div {
  min-height: 54px;
  padding: 9px 8px;
  border: 0;
  border-right: 1px solid #edf0f4;
  border-radius: 0;
  background: #fff;
}

.sales-work-summary div:last-child {
  border-right: 0;
}

.sales-work-summary strong,
.sales-work-summary span {
  display: block;
  text-align: center;
}

.sales-work-summary strong {
  color: #ea580c;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.sales-work-summary span {
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}

.sales-auto-dashboard {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.sales-auto-dashboard div {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.sales-auto-dashboard span,
.sales-auto-dashboard strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-auto-dashboard span {
  color: #64748b;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 900;
}

.sales-auto-dashboard strong {
  margin-top: 3px;
  color: #111827;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 950;
}

.sales-auto-dashboard .is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.sales-auto-dashboard .is-ok {
  border-color: #bbf7d0;
  background: #ecfdf5;
}

.sales-auto-dashboard .is-warn {
  border-color: #fed7aa;
  background: #fff7ed;
}

.sales-auto-dashboard .is-info strong {
  color: #2563eb;
}

.sales-auto-dashboard .is-ok strong {
  color: #047857;
}

.sales-auto-dashboard .is-warn strong {
  color: #ea580c;
}

.sales-ip-stage {
  min-height: 226px;
  position: relative;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 54%, rgba(255, 121, 0, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 250, 244, 0.18), rgba(255, 255, 255, 0.74));
}

.sales-ip-stage::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(120, 53, 15, 0.12);
  filter: blur(10px);
}

.sales-ip-stage img {
  position: relative;
  z-index: 1;
  width: min(74%, 242px);
  height: 168px;
  object-fit: contain;
  object-position: bottom center;
  margin-top: 50px;
}

.sales-ip-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 14px;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.sales-ip-copy span {
  color: #ff7900;
  font-size: 13px;
  font-weight: 950;
}

.sales-ip-copy h2 {
  margin: 5px 0 0;
  color: #7c2d12;
  font-size: 21px;
  line-height: 1.14;
  font-weight: 950;
  letter-spacing: 0;
}

.sales-ip-copy p {
  display: none;
}

.sales-input-zone {
  position: relative;
  z-index: 2;
  margin: -10px 4px 0;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.sales-input-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: start;
  gap: 10px;
}

.sales-input-zone.chat-mode {
  margin: 8px 0 0;
  padding: 10px;
  border-color: #dfe5ed;
  border-radius: 16px;
  background: #fff;
}

.sales-input-zone.chat-mode:focus-within {
  border-color: rgba(255, 121, 0, 0.42);
  box-shadow: 0 0 0 3px rgba(255, 121, 0, 0.08);
}

.sales-input-zone.chat-mode.supplement-mode {
  border-color: #fdba74;
  background: #fff7ed;
}

.sales-input-zone.chat-mode .sales-input-head {
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 0 2px;
}

.sales-input-zone.chat-mode.supplement-mode .sales-input-head span {
  color: #c2410c;
}

.sales-input-zone.chat-mode .sales-input-head span {
  color: #9ca3af;
  font-size: 11px;
  font-weight: 800;
}

.sales-input-zone.chat-mode .sales-input-head span:empty {
  display: none;
}

.sales-input-zone strong {
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 950;
}

.sales-input-zone p {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}

.sales-help-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #64748b;
  background: #fff;
  box-shadow: none;
}

.sales-help-button svg {
  width: 18px;
  height: 18px;
}

.sales-chat-thread {
  margin-top: 8px;
  flex: 1 1 auto;
  max-height: 382px;
  min-height: 64px;
  padding: 2px 0 4px;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-chat-thread {
  max-height: none;
  overflow: auto;
}

.sales-chat-thread::-webkit-scrollbar {
  display: none;
}

.sales-empty-state {
  min-height: 182px;
  padding: 18px 14px;
  border: 1px dashed #fed7aa;
  border-radius: 14px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background: #fffaf4;
}

.sales-empty-state strong {
  color: #9a3412;
  font-size: 17px;
  font-weight: 950;
}

.sales-empty-state p {
  max-width: 280px;
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 800;
}

.sales-empty-state div {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.sales-empty-state span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff;
  border: 1px solid #fed7aa;
  font-size: 11px;
  font-weight: 900;
}

.sales-message {
  display: grid;
  gap: 7px;
  align-items: end;
}

.sales-message.ai {
  grid-template-columns: 28px minmax(0, 1fr);
  justify-items: start;
}

.sales-message.user {
  justify-items: end;
}

.sales-message.compact {
  margin-top: -2px;
}

.sales-message > img {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.sales-bubble {
  max-width: 90%;
  padding: 8px 10px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: none;
}

.sales-message.ai .sales-bubble {
  border-top-left-radius: 4px;
  color: #334155;
  background: #fff;
  border: 1px solid #e5eaf0;
}

.sales-message.user .sales-bubble {
  border-top-right-radius: 4px;
  color: #fff;
  background: #ff7900;
}

.sales-handoff-bubble {
  display: grid;
  gap: 2px;
}

.sales-inline-ticket-link {
  border: 0;
  background: transparent;
  color: #2563eb;
  padding: 0;
  font: inherit;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sales-inline-ticket-link:active {
  color: #1d4ed8;
}

.sales-knowledge-cards {
  width: min(100%, 314px);
  display: grid;
  gap: 7px;
}

.sales-knowledge-title {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
}

.sales-knowledge-card {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #e5eaf0;
  border-radius: 11px;
  display: grid;
  gap: 3px;
  background: #fff;
  text-align: left;
}

.sales-knowledge-card strong,
.sales-knowledge-card span,
.sales-knowledge-card em,
.sales-knowledge-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-knowledge-card strong {
  color: #ea580c;
  font-size: 12px;
  font-weight: 950;
}

.sales-knowledge-card span {
  color: #111827;
  font-size: 12.5px;
  font-weight: 900;
}

.sales-knowledge-card em,
.sales-knowledge-card small {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.sales-draft-card {
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dfe5ed;
  box-shadow: none;
}

.sales-draft-head {
  padding: 11px 12px 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #edf0f4;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.sales-draft-head span {
  display: block;
  color: #ea580c;
  font-size: 11px;
  font-weight: 950;
}

.sales-draft-head strong {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 14px;
  font-weight: 950;
}

.sales-draft-head em {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.sales-draft-compact {
  background: #fff;
}

.sales-draft-compact .sales-draft-quantity {
  display: none;
}

.sales-draft-quantity {
  min-height: 45px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf0f4;
}

.sales-draft-quantity.missing {
  background: #fffaf4;
}

.sales-draft-quantity span,
.sales-draft-meta-item b {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 850;
}

.sales-draft-quantity strong,
.sales-draft-meta-item strong {
  min-width: 0;
  color: #111827;
  font-weight: 950;
}

.sales-draft-quantity strong {
  font-size: 15px;
}

.sales-draft-quantity.missing strong,
.sales-draft-meta-item.missing strong {
  color: #b45309;
}

.sales-draft-meta-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #edf0f4;
  background: #fff;
}

.sales-draft-meta-item {
  min-width: 0;
  min-height: 46px;
  padding: 8px 6px;
  display: grid;
  align-content: center;
  gap: 4px;
  border-right: 1px solid #edf0f4;
}

.sales-draft-meta-item:last-child {
  border-right: 0;
}

.sales-draft-meta-item.missing {
  background: #fffaf4;
}

.sales-draft-meta-item b,
.sales-draft-meta-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-draft-meta-item strong {
  font-size: 11.5px;
}

.sales-missing-strip {
  margin: 10px 12px 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 850;
}

.sales-draft-actions {
  margin: 4px 12px 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 2px;
}

.sales-draft-actions button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9a3412;
  font-size: 12px;
  font-weight: 950;
}

.sales-draft-actions button:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: #edf0f4;
}

.sales-draft-actions button:last-child {
  color: #ea580c;
  background: transparent;
}

.sales-draft-actions .draft-delete-action {
  color: #b91c1c;
}

.sales-draft-actions button:active {
  background: #fff7ed;
}

.sales-draft-edit-note {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.5;
  font-weight: 850;
}

.sales-draft-edit-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.sales-draft-edit-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 850;
}

.sales-draft-edit-form label.missing span::after {
  content: " 待补";
  color: #ea580c;
  font-size: 11px;
}

.sales-draft-edit-form input,
.sales-draft-edit-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  outline: 0;
}

.sales-draft-edit-form input {
  height: 40px;
  padding: 0 10px;
}

.sales-draft-edit-form textarea {
  min-height: 70px;
  resize: vertical;
  padding: 10px;
  line-height: 1.45;
}

.sales-draft-edit-form label:nth-child(n + 8) {
  grid-column: 1 / -1;
}

.sales-chat-hero {
  min-height: 230px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 155px;
  align-items: end;
  gap: 8px;
}

.sales-chat-hero span,
.sales-board-head span,
.sales-template-main span,
.sales-handoff-title span {
  color: #ff7900;
  font-size: 13px;
  font-weight: 950;
}

.sales-chat-hero h2,
.sales-board-head h2,
.sales-template-main h2,
.sales-handoff-title h2 {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: 0;
}

.sales-chat-hero p,
.sales-template-main p,
.sales-boundary-card p {
  margin: 9px 0 0;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.55;
}

.sales-chat-hero img {
  align-self: end;
  width: 176px;
  height: 220px;
  object-fit: contain;
  object-position: bottom center;
  margin-right: -22px;
}

.sales-prompt-card {
  margin-top: -8px;
  position: relative;
  z-index: 1;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #fed7aa;
}

.sales-ai-line {
  padding: 11px 12px;
  border-radius: 14px;
  background: #fff7ed;
}

.sales-ai-line strong {
  color: #ea580c;
  font-size: 13px;
  font-weight: 950;
}

.sales-ai-line p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.sales-chat-composer-inline {
  margin-top: 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px 42px;
  gap: 6px;
  padding: 6px;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: none;
  align-items: end;
}

.sales-chat-composer-inline textarea {
  min-width: 0;
  min-height: 50px;
  max-height: 96px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 7px 5px 7px 6px;
  font-size: 13px;
  line-height: 1.45;
  color: #111827;
  resize: none;
  overflow-y: hidden;
}

.sales-chat-composer-inline textarea::-webkit-scrollbar {
  display: none;
}

.sales-image-input {
  display: none;
}

.sales-chat-composer-inline button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 0;
}

.sales-chat-composer-inline .image,
.sales-chat-composer-inline .voice {
  color: #64748b;
  background: #fff;
  border: 1px solid #dfe5ed;
}

.sales-chat-composer-inline .voice.recording {
  color: #fff;
  background: #ef4444;
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.sales-chat-composer-inline .send {
  width: 42px;
  color: #fff;
  background: #ff7900;
  box-shadow: 0 8px 16px rgba(255, 121, 0, 0.22);
}

.sales-chat-composer-inline svg {
  width: 18px;
  height: 18px;
}

.sales-image-upload {
  display: grid;
  gap: 7px;
  max-width: 230px;
}

.sales-image-upload img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.sales-image-upload span {
  font-size: 12px;
  font-weight: 700;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .app-header {
  flex: 0 0 auto;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .workspace {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] #view-home.active {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-chat-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-chat-thread {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 8px;
}

.sales-command-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sales-command-row button {
  height: 42px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff;
  color: #9a3412;
  font-weight: 950;
}

.sales-quick-actions {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sales-quick-actions.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 4px;
  border: 1px solid #dfe5ed;
  border-radius: 14px;
  background: #fff;
}

.sales-quick-actions button {
  min-height: 46px;
  padding: 6px 4px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #374151;
  box-shadow: none;
}

.sales-quick-actions.compact button {
  position: relative;
  min-height: 42px;
  padding: 5px 3px;
  border-radius: 10px;
  border: 0;
  background: transparent;
}

.sales-quick-actions.compact button:not(:first-child)::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: #edf0f4;
}

.sales-quick-actions.compact button:last-child {
  color: #c2410c;
  background: #fff7ed;
}

.sales-quick-actions svg {
  width: 18px;
  height: 18px;
  color: #ea580c;
}

.sales-quick-actions.compact svg {
  width: 16px;
  height: 16px;
}

.sales-quick-actions span {
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
}

.sales-quick-actions.compact span {
  font-size: 10.5px;
  white-space: nowrap;
}

.sales-flow-cue {
  margin-top: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr 14px 1fr 14px 1fr;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
}

.sales-flow-cue span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.sales-flow-cue b {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ea580c;
  background: #fff;
  border: 1px solid #ffedd5;
  font-size: 9px;
}

.sales-flow-cue i {
  height: 1px;
  background: #e5e7eb;
}

.sales-flow-cards {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sales-flow-cards article {
  min-height: 104px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ffedd5;
}

.sales-flow-cards b {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #ff7900;
  font-size: 12px;
}

.sales-flow-cards strong,
.sales-match-list b {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 950;
}

.sales-flow-cards span,
.sales-match-list span {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 11px;
  line-height: 1.35;
}

.sales-audit-shell {
  padding: 15px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
}

.sales-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sales-board-head h2 {
  color: #1e3a8a;
}

.sales-board-head em {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.sales-field-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.sales-field-grid div {
  min-height: 64px;
  padding: 10px 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.sales-field-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.sales-field-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 950;
}

.sales-field-grid .warn {
  color: #ea580c;
}

.sales-review-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.sales-review-list button {
  min-height: 62px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  text-align: left;
}

.sales-review-list i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #2563eb;
}

.sales-review-list strong {
  font-size: 13px;
  font-weight: 950;
}

.sales-review-list span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.sales-primary-action {
  width: 100%;
  height: 48px;
  margin-top: 13px;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffae3c, #ff7900 56%, #f35c00);
}

.sales-template-shell {
  padding: 15px;
  background: #fffaf4;
  border: 1px solid #fed7aa;
}

.sales-template-main {
  position: relative;
  min-height: 178px;
  padding: 18px;
  border-radius: 20px;
  color: #1f2937;
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 121, 0, 0.16), transparent 32%),
    #fff;
  border: 1px solid #ffedd5;
}

.sales-template-main h2 {
  max-width: 230px;
  color: #9a3412;
}

.sales-score {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: conic-gradient(#ff7900 0 92%, #ffe7cc 92% 100%);
  box-shadow: 0 12px 24px rgba(255, 121, 0, 0.18);
}

.sales-score strong {
  display: block;
  font-size: 21px;
  font-weight: 950;
  text-align: center;
}

.sales-score span {
  display: block;
  margin-top: -18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.sales-diff-strip {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sales-diff-strip div {
  min-height: 70px;
  padding: 10px 8px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ffedd5;
  text-align: center;
}

.sales-diff-strip span {
  color: #78716c;
  font-size: 11px;
  font-weight: 850;
}

.sales-diff-strip strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  font-weight: 950;
}

.sales-match-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.sales-match-list article {
  padding: 11px 13px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #ffedd5;
}

.sales-match-list b {
  margin-top: 0;
}

.sales-handoff-shell {
  padding: 15px;
  background: #111827;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sales-handoff-title span {
  color: #fbbf24;
}

.sales-handoff-title h2 {
  color: #fff;
}

.sales-timeline {
  margin-top: 16px;
  display: grid;
  gap: 0;
}

.sales-timeline article {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 11px;
  padding-bottom: 18px;
}

.sales-timeline article::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.16);
}

.sales-timeline article:last-child {
  padding-bottom: 0;
}

.sales-timeline article:last-child::before {
  display: none;
}

.sales-timeline i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #4b5563;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.05);
}

.sales-timeline .done i {
  background: #22c55e;
}

.sales-timeline .active i {
  background: #f59e0b;
}

.sales-timeline strong {
  display: block;
  font-size: 14px;
  font-weight: 950;
}

.sales-timeline span {
  display: block;
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.45;
}

.sales-boundary-card {
  margin-top: 14px;
  padding: 13px;
  border-radius: 16px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.26);
}

.sales-boundary-card strong {
  font-size: 14px;
  font-weight: 950;
}

.sales-boundary-card p {
  color: #fef3c7;
}

/* 2026-05-28: flatter sales home and chat stream */
.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .workspace {
  padding-inline: 12px;
  background: #f8fafc;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-style-lab[data-sales-style="chat"] .sales-chat-shell {
  margin-top: 6px;
  padding: 8px;
  border: 1px solid #e5eaf0;
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.sales-chat-head {
  min-height: 58px;
  padding: 7px 38px 7px 8px;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
}

.sales-chat-head img {
  width: 38px;
  height: 38px;
}

.sales-chat-head span {
  font-size: 10px;
  line-height: 1;
}

.sales-chat-head h2 {
  margin-top: 2px;
  font-size: 16px;
}

.sales-chat-head p {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.25;
}

.sales-chat-head .sales-help-button {
  top: 10px;
  right: 8px;
  width: 28px;
  height: 28px;
  color: #64748b;
  background: #fff;
}

.app-shell[data-role="sales_dispatcher"][data-home-mode="workspace"] .sales-work-summary {
  display: none;
}

.sales-auto-dashboard {
  flex: 0 0 auto;
  margin-top: 6px;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  background: #fff;
}

.sales-auto-dashboard div {
  min-height: 40px;
  padding: 7px 8px;
  border: 0;
  border-right: 1px solid #eef2f7;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.sales-auto-dashboard div:last-child {
  border-right: 0;
}

.sales-auto-dashboard span {
  font-size: 10px;
}

.sales-auto-dashboard strong {
  margin-top: 2px;
  font-size: 14px;
}

.sales-auto-dashboard .is-info,
.sales-auto-dashboard .is-ok,
.sales-auto-dashboard .is-warn {
  background: #fff;
}

.sales-chat-thread {
  margin-top: 7px;
  padding: 2px 0 6px;
  gap: 6px;
}

.sales-empty-state {
  min-height: 104px;
  padding: 13px 12px;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  align-content: center;
  background: #fbfcfe;
}

.sales-empty-state strong {
  color: #111827;
  font-size: 15px;
}

.sales-empty-state p {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 750;
}

.sales-empty-state div {
  margin-top: 8px;
}

.sales-empty-state span {
  padding: 3px 7px;
  color: #64748b;
  border-color: #e5eaf0;
  background: #fff;
  font-size: 10px;
}

.sales-message {
  gap: 5px;
}

.sales-message.ai {
  grid-template-columns: 22px minmax(0, 1fr);
}

.sales-message > img {
  width: 22px;
  height: 22px;
  align-self: start;
}

.sales-bubble {
  max-width: 94%;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.sales-message.ai .sales-bubble {
  color: #1f2937;
  background: #fff;
  border: 1px solid #e5eaf0;
}

.sales-message.user .sales-bubble {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.sales-knowledge-cards {
  width: 100%;
  gap: 5px;
}

.sales-knowledge-title {
  font-size: 10px;
}

.sales-knowledge-card {
  padding: 7px 8px;
  border-radius: 10px;
  gap: 2px;
}

.sales-draft-card {
  border-radius: 12px;
  border-color: #dfe5ed;
}

.sales-draft-head {
  padding: 9px 10px 8px;
  border-bottom-color: #e5eaf0;
  background: #fff;
}

.sales-draft-head span {
  font-size: 10px;
}

.sales-draft-head strong {
  margin-top: 2px;
  font-size: 14px;
}

.sales-draft-head em {
  padding: 4px 7px;
  font-size: 10px;
}

.sales-draft-quantity {
  min-height: 38px;
  padding: 7px 10px;
}

.sales-draft-quantity.missing,
.sales-draft-meta-item.missing {
  background: #fffaf4;
}

.sales-draft-meta-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 0;
}

.sales-draft-meta-item {
  min-height: 38px;
  padding: 7px 9px;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
}

.sales-draft-meta-item:nth-child(3n) {
  border-right: 0;
}

.sales-draft-meta-item:last-child {
  border-right: 0;
}

.sales-draft-meta-item b {
  font-size: 10px;
}

.sales-draft-meta-item strong {
  font-size: 12px;
}

.sales-missing-strip {
  margin: 8px 10px 0;
  padding: 7px 9px;
  border-radius: 9px;
  font-size: 11px;
}

.sales-draft-actions {
  margin: 3px 10px 7px;
  padding-top: 4px;
}

.sales-draft-actions button {
  height: 30px;
  font-size: 11px;
}

.sales-quick-actions.compact {
  flex: 0 0 auto;
  margin-top: 7px;
  padding: 3px;
  border-radius: 12px;
  border-color: #e5eaf0;
}

.sales-quick-actions.compact button {
  min-height: 34px;
  gap: 2px;
}

.sales-quick-actions.compact svg {
  width: 15px;
  height: 15px;
}

.sales-quick-actions.compact span {
  font-size: 10px;
}

.sales-input-zone.chat-mode {
  margin-top: 7px;
  padding: 6px;
  border-radius: 13px;
  border-color: #e5eaf0;
  background: #fff;
  box-shadow: none;
}

.sales-input-zone.chat-mode .sales-input-head {
  display: none;
  margin-bottom: 5px;
}

.sales-input-zone.chat-mode.supplement-mode .sales-input-head {
  display: flex;
}

.sales-input-zone.chat-mode .sales-input-head strong {
  font-size: 12px;
}

.sales-chat-composer-inline {
  margin-top: 0;
  border-radius: 12px;
  background: #f8fafc;
}

.sales-chat-composer-inline textarea {
  min-height: 40px;
  font-size: 12px;
}

.sales-chat-composer-inline button {
  width: 36px;
  height: 36px;
}

.sales-chat-composer-inline .send {
  width: 40px;
}

.sales-flow-cue {
  display: none;
}

.side-menu {
  width: min(360px, calc(100% - 52px));
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.08);
}

.side-menu-head {
  padding-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}

.side-menu-list {
  margin-top: 12px;
  gap: 4px;
}

.side-menu-list button {
  min-height: 46px;
  padding: 7px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.side-menu-list button.active {
  color: #111827;
  border: 0;
  background: #fff7ed;
  box-shadow: none;
}

.side-menu-list i {
  width: 30px;
  height: 30px;
  background: #f8fafc;
}

.side-menu-list button.active i {
  color: #ea580c;
  background: #fff;
}

.side-menu-list button.active em {
  color: #9a3412;
  background: #ffedd5;
}

.side-menu-admin {
  height: 44px;
  border-radius: 12px;
}

/* 2026-05-28: typography pass */
:root {
  --font-ui: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --type-label: 10.5px;
  --type-caption: 11px;
  --type-body: 12.5px;
  --type-body-lg: 13px;
  --type-title-sm: 14.5px;
  --type-title: 16px;
  --type-title-lg: 19px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  font-family: var(--font-ui);
}

body,
button,
input,
textarea {
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  font-weight: var(--weight-regular);
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.brand-name {
  font-size: 24px;
  font-weight: var(--weight-heavy);
  line-height: 1.12;
}

.brand-name span {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  line-height: 1.15;
}

.brand-sub {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 2px;
}

.runtime-pill,
.search-field input,
.search-bar input {
  font-size: var(--type-body);
  font-weight: var(--weight-medium);
}

.sales-chat-head span,
.sales-draft-head span,
.sales-auto-dashboard span,
.sales-empty-state span,
.sales-draft-meta-item b,
.sales-draft-quantity span,
.room-summary-strip span,
.room-summary-strip em,
.room-line-meta time,
.room-line-meta em {
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}

.sales-chat-head h2,
.sales-empty-state strong,
.section-head h2,
.sheet-title h2,
.admin-panel-head strong {
  font-size: var(--type-title);
  font-weight: var(--weight-bold);
  line-height: 1.22;
}

.sales-chat-head p,
.sales-empty-state p,
.sales-bubble,
.sales-missing-strip,
.sales-chat-composer-inline textarea,
.ticket-row p,
.request-row p,
.room-line p,
.room-member-row,
.boundary-list span,
.detail-row span,
.risk-box {
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

.sales-auto-dashboard strong,
.sales-draft-head strong,
.sales-draft-meta-item strong,
.sales-draft-quantity strong,
.sales-knowledge-card span,
.ticket-row strong,
.request-row strong,
.room-line-meta strong,
.detail-row strong,
.boundary-list strong {
  font-weight: var(--weight-bold);
  line-height: 1.28;
}

.sales-auto-dashboard strong {
  font-size: var(--type-title-sm);
}

.sales-draft-head strong {
  font-size: var(--type-title-sm);
}

.sales-draft-head em,
.room-status,
.ticket-row em,
.sub-page-head span {
  font-size: var(--type-caption);
  font-weight: var(--weight-semibold);
}

.sales-draft-meta-item strong {
  font-size: var(--type-body);
}

.sales-missing-strip {
  font-weight: var(--weight-medium);
}

.sales-draft-actions button,
.sales-quick-actions span,
.sales-quick-actions.compact span,
.sales-chat-composer-inline button,
.room-action-line button,
.room-filter-row button,
.room-pending-item strong,
.bottom-nav span,
.chat-nav span,
.side-menu-list span,
.side-menu-admin,
.admin-save-button,
.danger-action,
.secondary-action {
  font-size: var(--type-caption);
  font-weight: var(--weight-semibold);
  line-height: 1.25;
}

.room-filter-row b {
  font-size: var(--type-label);
  font-weight: var(--weight-semibold);
}

.sales-quick-actions svg,
.bottom-nav svg,
.chat-nav svg,
.side-menu-list svg {
  stroke-width: 1.9;
}

.sales-knowledge-title,
.sales-knowledge-card em,
.sales-knowledge-card small,
.sales-flow-cue,
.nav-item span {
  font-size: var(--type-caption);
  font-weight: var(--weight-medium);
}

.sales-knowledge-card strong {
  font-size: var(--type-body);
  font-weight: var(--weight-bold);
}

.room-title h2,
.sub-page-head h2,
.profile-card h2 {
  font-size: var(--type-title-lg);
  font-weight: var(--weight-bold);
  line-height: 1.2;
}

.room-title span,
.role-context span,
.admin-panel-head span,
.profile-account-card span {
  font-size: var(--type-caption);
  font-weight: var(--weight-semibold);
}

.side-menu-head span {
  font-size: var(--type-caption);
  font-weight: var(--weight-semibold);
}

.side-menu-head strong {
  font-size: 20px;
  font-weight: var(--weight-bold);
}

.side-menu-list span {
  font-size: 13px;
}

.side-menu-list em {
  font-size: 10.5px;
  font-weight: var(--weight-medium);
}

.auth-brand strong,
.auth-submit,
.auth-tabs button {
  font-weight: var(--weight-bold);
}

@media (max-width: 370px) {
  .brand-name {
    font-size: 24px;
  }

  .brand-name span,
  .brand-sub {
    display: none;
  }

  .poster-hero {
    min-height: 410px;
  }

  .hero-mascot {
    width: 338px;
    height: 338px;
  }

  .role-fab {
    transform: translateX(58px);
    min-width: 96px;
  }

  .sales-chat-composer-inline {
    grid-template-columns: minmax(0, 1fr) 34px 34px 38px;
    gap: 5px;
    padding: 5px;
  }

  .sales-chat-composer-inline button {
    width: 34px;
    height: 34px;
  }

  .sales-chat-composer-inline .send {
    width: 38px;
  }
}

@media (max-width: 430px) {
  .ai-help-float {
    left: 14px;
    right: auto;
    transform: none;
  }

  .app-header {
    padding: 14px 16px 9px;
  }

  .brand-lockup {
    gap: 8px;
  }

  .oy-mark {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }

  .brand-name {
    gap: 5px;
    font-size: 24px;
  }

  .brand-name span {
    font-size: 12px;
  }

  .brand-sub {
    margin-top: 5px;
    font-size: 11px;
    letter-spacing: 2.4px;
  }

  .header-tools {
    gap: 6px;
  }
}
