:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-strong: #f8fafc;
  --text: #1d2733;
  --muted: #667386;
  --line: #d9e2ec;
  --brand: #002b5c;
  --brand-strong: #0b2545;
  --brand-secondary: #2d2a4a;
  --ocean: #0077b6;
  --accent: #bf0a30;
  --danger: #bf0a30;
  --warn: #b45309;
  --ink-on-light: #10233d;
  --shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  --sidebar-collapsed: 72px;
  --sidebar-expanded: 260px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Microsoft YaHei", "Noto Sans Thai", sans-serif;
  overflow: hidden;
}

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

button {
  border: 1px solid var(--line);
  background: rgba(21, 72, 119, 0.92);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  border-color: var(--accent);
  color: #ffffff;
  background: rgba(41, 98, 157, 0.98);
}

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

.sidebar {
  background: linear-gradient(180deg, #061f3b 0%, #0a3561 58%, #062645 100%);
  color: white;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: var(--sidebar-collapsed);
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 180ms ease, box-shadow 180ms ease;
  z-index: 10;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 210, 226, 0.55) transparent;
}

.sidebar:hover,
.sidebar:focus-within {
  width: var(--sidebar-expanded);
  box-shadow: 18px 0 34px rgba(15, 23, 42, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  min-width: 232px;
}

.brand-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: white;
  padding: 5px;
}

.brand strong {
  display: block;
  white-space: nowrap;
  color: #ffffff;
}

.brand span {
  color: #ffd2e2;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 4px;
  min-width: 232px;
}

.nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.76);
  min-height: 40px;
  white-space: nowrap;
}

.nav button.active,
.nav button:hover {
  background: rgba(38, 99, 158, 0.58);
  color: white;
  border-left-color: #ffd2e2;
}

.main {
  padding: 22px;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 26px;
  color: #ffffff;
  font-weight: 800;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.controls label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 38px;
  background: rgba(248, 251, 255, 0.96);
  color: var(--ink-on-light);
}

select option {
  color: var(--ink-on-light);
  background: #ffffff;
}

input::placeholder,
textarea::placeholder {
  color: #6b7d92;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid rgba(255, 210, 226, 0.72);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 210, 226, 0.12);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

a {
  color: var(--text);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(120deg, rgba(0, 43, 92, 0.92), rgba(9, 72, 120, 0.84)),
    #0b2545;
}

.login-panel {
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
  padding: 28px;
}

.login-logo {
  width: 54px;
  height: 58px;
  object-fit: contain;
  margin-bottom: 14px;
}

.login-panel h1 {
  margin: 6px 0 8px;
  color: var(--brand-strong);
  font-size: 28px;
}

.login-copy {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

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

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--brand-strong);
  font-weight: 800;
}

.login-form button {
  min-height: 44px;
  background: var(--brand);
  color: #ffffff;
}

.context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 59, 102, 0.78);
  color: var(--muted);
  font-size: 13px;
}

.context-strip strong {
  color: #ffffff;
}

.notice {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: rgba(28, 83, 136, 0.86);
  color: #ffffff;
}

.notice-inline {
  margin: -4px 0 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
  color: var(--text);
}

.scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border-left: 4px solid var(--accent);
  background: rgba(16, 59, 102, 0.92);
}

.scope-banner div {
  display: grid;
  gap: 6px;
}

.scope-banner strong {
  color: #ffffff;
}

.scope-banner span {
  color: var(--muted);
  line-height: 1.6;
}

.scope-banner em {
  font-style: normal;
  white-space: nowrap;
  color: var(--accent);
  font-weight: 700;
}

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

.panel-title h2 {
  margin: 0;
  font-size: 17px;
  color: #ffffff;
  font-weight: 800;
}

.compact-title {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compact-title h3 {
  margin: 0;
  font-size: 15px;
}

.compact-title small {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actions.left {
  justify-content: flex-start;
  margin-top: 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 67, 114, 0.88);
}

.filter-bar button {
  min-height: 38px;
}

.table-scroll {
  overflow: auto;
}

.five-row-table {
  max-height: 324px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(255, 210, 226, 0.08);
}

.filter-bar label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

.ssc-branch-card {
  width: 100%;
  min-height: 124px;
  text-align: left;
}

.ssc-branch-card.selected {
  border-color: var(--brand);
  background: #e8f3fb;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.kpi span,
.kpi small {
  color: var(--muted);
}

.kpi strong {
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
}

.role-workbench {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  border-top: 4px solid var(--accent);
  background: linear-gradient(180deg, rgba(15, 59, 101, 0.96) 0%, rgba(10, 52, 92, 0.98) 100%);
}

.role-workbench-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.role-workbench-head span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.role-workbench-head h2 {
  margin: 4px 0;
  font-size: 24px;
  color: #ffffff;
}

.role-workbench-head p {
  margin: 0;
  color: var(--muted);
}

.role-workbench-summary {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 44, 80, 0.88);
  text-align: center;
}

.role-workbench-summary strong {
  color: #ffffff;
  font-size: 22px;
}

.role-workbench-summary small {
  color: var(--muted);
}

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

.role-task {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 74, 123, 0.98), rgba(18, 67, 114, 0.98));
}

.role-task.high {
  border-left-color: var(--danger);
}

.role-task.low {
  border-left-color: var(--muted);
}

.role-task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.role-task-top span {
  color: var(--muted);
  font-size: 12px;
}

.role-task-top b {
  color: var(--accent);
}

.role-task h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
}

.role-task p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.role-task button {
  align-self: end;
  justify-self: start;
}

.schedule-calendar-panel {
  display: grid;
  gap: 12px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 67, 114, 0.88);
}

.calendar-head strong {
  font-size: 20px;
  color: #ffffff;
}

.calendar-head span {
  color: var(--muted);
}

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

.calendar-weekdays span {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 118px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 59, 102, 0.92);
}

.calendar-day.outside {
  opacity: 0.45;
  background: rgba(18, 67, 114, 0.72);
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-day.has-items {
  border-left: 4px solid var(--accent);
}

.calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-date b {
  color: #ffffff;
}

.calendar-date span {
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--ink-on-light);
  background: var(--accent);
  font-size: 12px;
}

.calendar-items {
  display: grid;
  gap: 5px;
}

.calendar-items button,
.calendar-popover button {
  width: 100%;
  min-height: 28px;
  justify-content: start;
  padding: 5px 7px;
  border-color: var(--line);
  background: rgba(248, 251, 255, 0.96);
  color: var(--ink-on-light);
  font-size: 12px;
  text-align: left;
}

.calendar-items button.high {
  border-color: var(--accent);
  background: #fff1f7;
}

.calendar-items button.low {
  color: var(--muted);
}

.calendar-popover {
  display: none;
  position: absolute;
  left: 8px;
  right: 8px;
  top: 46px;
  z-index: 20;
  gap: 8px;
  min-width: 280px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.calendar-day:hover .calendar-popover,
.calendar-day:focus-within .calendar-popover {
  display: grid;
}

.calendar-popover strong {
  color: var(--ink-on-light);
}

.calendar-popover button {
  display: grid;
  gap: 3px;
}

.calendar-popover small {
  color: var(--muted);
  line-height: 1.4;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

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

.task {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 59, 102, 0.68);
}

.task span {
  color: var(--muted);
}

.task em {
  font-style: normal;
  color: var(--muted);
}

.task.high {
  border-left: 4px solid var(--danger);
}

.task.medium {
  border-left: 4px solid var(--warn);
}

.task.low {
  border-left: 4px solid var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

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

th {
  color: #dbeaff;
  font-weight: 600;
  background: rgba(8, 40, 72, 0.72);
}

tr.selected-row td {
  background: rgba(255, 210, 226, 0.08);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--ink-on-light);
  background: var(--accent);
  font-size: 12px;
}

.badge.warn {
  color: #3d2c00;
  background: #ffe8a3;
}

.badge.danger {
  color: #4a0012;
  background: #ffc4d2;
}

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

.job,
.mini-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(28, 83, 136, 0.96), rgba(35, 96, 158, 0.9));
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
}

.mini-card strong,
.job strong {
  color: #ffffff;
}

.crm-client-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.crm-card {
  align-content: start;
}

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

.crm-card-head div {
  display: grid;
  gap: 4px;
}

.crm-card-head span,
.crm-section p,
.crm-meta span,
.crm-links small {
  color: var(--muted);
}

.crm-meta {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 44, 80, 0.62);
}

.crm-meta strong {
  min-width: 0;
  word-break: break-word;
}

.crm-section {
  display: grid;
  gap: 6px;
  padding-top: 4px;
}

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

.crm-section h3 {
  margin: 0;
  font-size: 14px;
  color: #ffffff;
}

.crm-section p {
  margin: 0;
  line-height: 1.5;
}

.link-button {
  min-height: 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

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

.visit-date-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.visit-date {
  min-height: 0;
  padding: 5px 8px;
  border-color: var(--line);
  background: rgba(18, 67, 114, 0.88);
  color: #ffffff;
}

.visit-detail {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 44, 80, 0.58);
}

.visit-detail p {
  margin: 0;
}

.crm-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.crm-links span {
  display: grid;
  gap: 2px;
  padding: 8px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 44, 80, 0.62);
  font-weight: 700;
}

.text-danger {
  color: var(--danger);
}

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

.checkpoint {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(28, 83, 136, 0.96), rgba(18, 67, 114, 0.94));
}

.checkpoint strong {
  color: #ffffff;
}

.checkpoint span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
  color: var(--ink-on-light);
  font-size: 12px;
  font-weight: 700;
}

.checkpoint em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

.checkpoint.pass {
  border-left-color: #15803d;
}

.checkpoint.pass span {
  background: #dcfce7;
  color: #166534;
}

.checkpoint.pending,
.checkpoint.warning {
  border-left-color: var(--warn);
}

.checkpoint.pending span,
.checkpoint.warning span {
  background: #fef3c7;
  color: #92400e;
}

.checkpoint.blocked {
  border-left-color: var(--danger);
}

.checkpoint.blocked span {
  background: #fee2e2;
  color: #991b1b;
}

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

.form-template {
  align-content: start;
}

.form-template span {
  color: var(--muted);
  line-height: 1.45;
}

.form-template button {
  width: fit-content;
  margin-top: 2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 16, 38, 0.58);
}

.action-modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 18px;
  background: #f8fbff;
  border: 1px solid rgba(9, 47, 86, 0.2);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(11, 37, 69, 0.28);
  color: var(--ink-on-light);
}

.action-modal.crm-modal {
  width: min(1040px, 100%);
}

.action-modal .panel-title {
  margin-bottom: 0;
}

.action-modal .panel-title h2,
.action-modal h2,
.action-modal h3,
.action-modal strong {
  color: var(--ink-on-light);
}

.action-modal small,
.action-modal label,
.action-modal .form-grid label,
.action-modal .upload-list label {
  color: #50657d;
}

.action-modal .notice-inline {
  background: #e9f1f9;
  color: #50657d;
}

.boi-action-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #ffffff;
}

.boi-action-guide strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.boi-action-guide ul {
  margin: 0;
  padding-left: 18px;
  color: #50657d;
}

.boi-action-guide li + li {
  margin-top: 4px;
}

.boi-action-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 190px;
}

.boi-action-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  color: var(--ink-on-light);
  background: #f8fbff;
  font-weight: 700;
  text-decoration: none;
}

.boi-modal-checklist {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.boi-modal-checklist > strong {
  color: var(--ink-on-light);
}

.boi-modal-checklist > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.boi-modal-checklist section {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 8px;
  padding: 10px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #ffffff;
}

.boi-modal-checklist b {
  grid-row: span 3;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
}

.boi-modal-checklist span {
  color: var(--ink-on-light);
  font-weight: 800;
}

.boi-modal-checklist p,
.boi-modal-checklist em {
  grid-column: 2;
  margin: 0;
  color: #50657d;
  font-size: 12px;
  line-height: 1.45;
}

.boi-modal-checklist em {
  color: #0f766e;
  font-style: normal;
  font-weight: 700;
}

.boi-status-guide {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #f8fbff;
}

.boi-status-guide h3 {
  margin: 0;
  color: var(--ink-on-light);
}

.boi-status-guide ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #50657d;
}

.boi-status-guide strong {
  color: var(--ink-on-light);
}

.boi-wizard-modal {
  max-width: 1040px;
}

.boi-wizard-question-list {
  display: grid;
  gap: 10px;
}

.boi-wizard-progress {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  padding: 12px;
}

.boi-wizard-progress div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.boi-wizard-progress strong {
  color: var(--brand-strong);
}

.boi-wizard-progress span {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 900;
}

.boi-wizard-progress p {
  margin: 0;
  color: #334155;
  line-height: 1.45;
}

.boi-wizard-question-list section {
  display: grid;
  grid-template-columns: 34px repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d7e3ef;
  border-radius: 8px;
  background: #ffffff;
}

.boi-wizard-question-list section.hidden-step {
  display: none;
}

.boi-wizard-question-list section.active-step {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.boi-wizard-step-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

.boi-wizard-question-list b {
  align-self: start;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  color: #ffffff;
}

.boi-wizard-question-list p {
  grid-column: 2 / -1;
  margin: 0;
  color: #50657d;
  font-size: 12px;
  line-height: 1.45;
}

.boi-wizard-question-list section.active-step p {
  color: #1e3a8a;
}

[data-boi-thailand-only].disabled-field {
  opacity: 0.52;
}

[data-boi-thailand-only].disabled-field span::after {
  content: "（不在泰国时不用填写）";
  margin-left: 4px;
  color: #64748b;
  font-weight: 500;
}

[data-boi-thailand-only].disabled-field input,
[data-boi-thailand-only].disabled-field select,
[data-boi-thailand-only].disabled-field textarea {
  cursor: not-allowed;
  background: #eef2f7;
  color: #64748b;
  border-color: #cbd5e1;
}

.boi-intake-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.boi-intake-alert strong {
  color: #7c2d12;
}

.boi-intake-alert p {
  margin: 0;
  line-height: 1.5;
}

.action-modal button {
  background: #ffffff;
  color: var(--ink-on-light);
  border-color: #cbd8e6;
}

.action-modal button:hover {
  color: #062645;
  border-color: #0f5e9c;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--ocean));
}

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

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

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

.interview-slot-picker {
  align-content: start;
}

.slot-options {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
}

.slot-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink-on-light) !important;
}

.slot-option input {
  width: auto;
}

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 67, 114, 0.88);
}

.action-modal .checklist {
  background: #eef5fb;
  color: var(--ink-on-light);
}

.upload-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 67, 114, 0.88);
}

.action-modal .upload-list {
  background: #eef5fb;
}

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

.upload-list input[type="file"] {
  padding: 7px 10px;
  background: white;
}

.rules {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-list span {
  padding: 8px 10px;
  background: rgba(18, 67, 114, 0.88);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.placeholder {
  display: grid;
  gap: 8px;
  padding: 28px;
  background: rgba(18, 67, 114, 0.88);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.placeholder strong {
  color: #ffffff;
}

/* Main workspace uses the calmer light SaaS palette; the sidebar keeps the dark command-center brand style. */
.main {
  background: var(--bg);
  color: var(--text);
}

.main button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 400;
}

.main button:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
  background: var(--panel);
}

.topbar h1 {
  color: var(--brand-strong);
  font-weight: 700;
}

.eyebrow {
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
}

.context-strip {
  background: #e8f3fb;
  color: var(--muted);
}

.context-strip strong {
  color: var(--brand-strong);
}

.notice {
  border-color: #d9e2ec;
  border-left-color: var(--ocean);
  background: #e8f3fb;
  color: var(--brand-strong);
}

.notice-inline {
  background: #f8fbff;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  color: var(--text);
}

.panel-title h2,
.compact-title h3,
.calendar-head strong,
.calendar-date b,
.crm-section h3,
.checkpoint strong,
.placeholder strong {
  color: var(--brand-strong);
}

.scope-banner,
.calendar-day,
.task,
.crm-meta,
.crm-links span,
.visit-date,
.visit-detail,
.role-list span,
.placeholder {
  background: var(--panel);
}

.filter-bar,
.calendar-head,
.calendar-day.outside,
.checklist,
.upload-list,
.checkpoint,
.job,
.mini-card {
  background: var(--panel-strong);
}

.clickable-row:hover td,
tr.selected-row td {
  background: #e8f3fb;
}

.kpi strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
}

.role-workbench {
  border-top-color: var(--brand);
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
}

.role-workbench-head span {
  color: var(--brand);
}

.role-workbench-head h2,
.role-workbench-summary strong,
.role-task h3 {
  color: var(--brand-strong);
}

.role-workbench-summary,
.role-task {
  background: var(--panel);
}

.role-task-top b,
.link-button {
  color: var(--brand);
}

.calendar-day.today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.calendar-date span,
.badge {
  color: var(--brand);
  background: #e8f3fb;
}

.calendar-items button,
.calendar-popover button {
  background: #ffffff;
  color: var(--text);
}

.calendar-items button.high {
  border-color: #fecaca;
  background: #fff1f2;
}

.calendar-popover {
  background: #ffffff;
}

th {
  color: var(--muted);
  background: var(--panel-strong);
}

.badge.warn {
  color: var(--warn);
  background: #fff4df;
}

.badge.danger {
  color: var(--danger);
  background: #fee4e2;
}

.boi-page {
  display: grid;
  gap: 14px;
}

.boi-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.boi-hero h2 {
  margin: 4px 0 8px;
  color: var(--brand-strong);
  font-size: 24px;
}

.boi-hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.6;
}

.boi-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.button-link.secondary {
  background: #ffffff;
  color: var(--brand);
}

.button-link.manual {
  border-color: #fdba74;
  background: #fff7ed;
  color: #9a3412;
}

.button-link.manual:hover {
  background: #ffedd5;
}

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

.boi-profile-grid div,
.boi-review div,
.boi-rule-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 12px;
}

.boi-profile-grid span,
.boi-profile-grid small,
.boi-check-item small,
.boi-rule-list small {
  color: var(--muted);
  font-size: 12px;
}

.boi-profile-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  line-height: 1.35;
}

.boi-condition-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.boi-condition-list span {
  border: 1px solid #cfe4f5;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f0f8ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.boi-progress {
  width: 120px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.boi-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ocean);
}

.boi-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
}

.boi-checklist,
.boi-review,
.boi-rule-list {
  display: grid;
  gap: 10px;
}

.boi-check-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.boi-check-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.boi-check-item strong,
.boi-review strong,
.boi-rule-list strong {
  display: block;
  color: var(--text);
}

.boi-check-item p,
.boi-review p,
.boi-rule-list p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-guide-grid .mini-card {
  min-height: 150px;
}

.boi-wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.boi-wizard-steps div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  padding: 12px;
  min-height: 132px;
}

.boi-wizard-steps b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  margin-bottom: 8px;
}

.boi-wizard-steps strong {
  display: block;
  color: var(--text);
}

.boi-wizard-steps p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.boi-wizard-steps button {
  width: 100%;
  margin-top: 12px;
  justify-content: center;
}

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

.boi-result-grid > section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
}

.boi-timeline-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-top: 14px;
  padding: 14px;
}

.boi-simple-case-brief {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 12px;
}

.boi-persistent-simple-brief {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.boi-persistent-simple-brief > summary {
  cursor: pointer;
  list-style: none;
}

.boi-persistent-simple-brief > summary::-webkit-details-marker {
  display: none;
}

.boi-persistent-simple-brief > summary::before {
  content: "-";
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  border-radius: 999px;
  color: #0b376d;
  background: #dbeafe;
  font-weight: 800;
}

.boi-persistent-simple-brief:not([open]) > summary::before {
  content: "+";
}

.boi-persistent-simple-brief .boi-simple-case-brief article,
.boi-persistent-simple-brief .boi-simple-next-actions,
.boi-persistent-simple-brief .boi-simple-two-col > article,
.boi-persistent-simple-brief .boi-advanced-pack {
  background: #ffffff;
}

.boi-simple-case-brief article,
.boi-simple-next-actions,
.boi-simple-two-col > article,
.boi-simple-risk-strip,
.boi-simple-email,
.boi-advanced-pack {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.boi-simple-case-brief article.primary {
  border-color: #2563eb;
  background: #f8fbff;
}

.boi-simple-case-brief span,
.boi-simple-next-actions span,
.boi-simple-two-col span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.boi-simple-case-brief strong {
  display: block;
  margin: 6px 0;
  color: var(--brand-strong);
  font-size: 18px;
}

.boi-simple-case-brief p {
  margin: 0;
  color: #334155;
}

.boi-simple-next-actions,
.boi-simple-two-col,
.boi-simple-risk-strip,
.boi-simple-email,
.boi-advanced-pack {
  margin-top: 14px;
}

.boi-simple-next-actions h3,
.boi-simple-two-col h3,
.boi-simple-risk-strip h3 {
  margin: 0 0 10px;
}

.boi-simple-next-actions ol,
.boi-simple-two-col ul,
.boi-simple-risk-strip ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.boi-simple-next-actions li strong,
.boi-simple-two-col li strong {
  display: block;
  color: var(--text);
}

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

.boi-simple-risk-strip {
  border-color: #f7c46c;
  background: #fffaf0;
}

.boi-advanced-pack > summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--brand-strong);
}

.boi-advanced-pack > summary::-webkit-details-marker {
  display: none;
}

.boi-advanced-pack > summary::before {
  content: "+";
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  background: #e8f2ff;
}

.boi-advanced-pack[open] > summary::before {
  content: "-";
}

.boi-advanced-pack > section,
.boi-advanced-pack > div {
  margin-top: 14px;
}

.boi-result-grid h3,
.boi-timeline-panel h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 17px;
}

.boi-wizard-runbook {
  border-left: 4px solid #2563eb;
  background: #f8fbff;
}

.boi-wizard-runbook > p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

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

.boi-runbook-list article {
  border: 1px solid #cbd8e6;
  border-left: 5px solid #93c5fd;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.boi-runbook-list summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.boi-runbook-list summary::-webkit-details-marker {
  display: none;
}

.boi-runbook-list summary strong,
.boi-runbook-list summary span {
  overflow-wrap: anywhere;
}

.boi-runbook-list summary strong {
  color: var(--brand-strong);
}

.boi-runbook-list summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.boi-runbook-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.boi-runbook-body p {
  margin: 0;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.boi-runbook-body b {
  display: block;
  margin-bottom: 4px;
  color: #1d4ed8;
  font-size: 12px;
}

.compact-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0 0 16px;
  list-style: none;
}

.compact-list li {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
}

.compact-list details,
.boi-result-grid .mini-card details,
.boi-step,
.boi-selected-case-detail details {
  width: 100%;
}

.compact-list summary,
.boi-result-grid .mini-card summary,
.boi-step summary,
.boi-selected-case-detail summary {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.compact-list summary::-webkit-details-marker,
.boi-result-grid .mini-card summary::-webkit-details-marker,
.boi-step summary::-webkit-details-marker,
.boi-selected-case-detail summary::-webkit-details-marker {
  display: none;
}

.compact-list summary::before,
.boi-result-grid .mini-card summary::before,
.boi-step summary::before,
.boi-selected-case-detail summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-strong);
  font-weight: 900;
}

.compact-list details[open] summary::before,
.boi-result-grid .mini-card details[open] summary::before,
.boi-step[open] summary::before,
.boi-selected-case-detail details[open] summary::before {
  content: "-";
}

.compact-list details > div,
.boi-selected-case-detail details > .task-list,
.boi-selected-case-detail details > .boi-detail-note {
  margin-top: 8px;
  padding-left: 30px;
}

.compact-list strong {
  color: var(--brand-strong);
  font-size: 12px;
}

.compact-list span {
  color: var(--text);
  line-height: 1.45;
}

.compact-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.compact-list small {
  color: #53657d;
  font-size: 12px;
  line-height: 1.35;
}

.boi-result-grid .mini-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.boi-result-grid .mini-card {
  background: #ffffff;
  border-color: #dbe7f4;
  color: var(--text);
}

.boi-result-grid .mini-card strong {
  color: var(--text);
}

.boi-result-grid .mini-card p {
  margin: 0;
  padding-left: 30px;
  color: var(--muted);
  line-height: 1.5;
}

.boi-email-draft {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #cbd8e6;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--text);
  padding: 12px;
  white-space: pre-wrap;
  line-height: 1.55;
}

.boi-assistant-operation {
  margin: 14px 0;
  border: 1px solid #b7e4d6;
  border-radius: 8px;
  background: #f6fffb;
  padding: 14px;
}

.boi-assistant-now,
.boi-assistant-stage-strip {
  display: grid;
  gap: 10px;
}

.boi-assistant-now {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 10px 0;
}

.boi-assistant-now article,
.boi-assistant-stage-strip div {
  border: 1px solid #c8eadf;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  min-width: 0;
}

.boi-assistant-now span,
.boi-assistant-stage-strip em {
  display: block;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  font-style: normal;
}

.boi-assistant-now strong,
.boi-assistant-stage-strip strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.boi-assistant-now p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-assistant-stage-strip {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 10px 0 14px;
}

.boi-assistant-stage-strip span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-strong);
  font-weight: 900;
  margin-bottom: 6px;
}

.boi-assistant-stage-strip .done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.boi-assistant-stage-strip .active {
  border-color: #facc15;
  background: #fffbea;
}

.boi-assistant-stage-strip .locked {
  color: #6b7280;
  background: #f8fafc;
}

.warning-panel {
  border-color: #f7c46c !important;
  background: #fffaf0 !important;
}

.source-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.boi-specialist-simple {
  gap: 12px;
}

.boi-process-header,
.boi-process-card {
  background: #ffffff;
}

.boi-case-strip-horizontal {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.boi-focus-panel {
  border-top: 4px solid var(--brand);
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
}

.boi-focus-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.boi-focus-head h2 {
  font-size: 32px;
}

.boi-focus-head p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.boi-now-grid,
.boi-guard-grid,
.boi-stepper {
  display: grid;
  gap: 10px;
}

.boi-now-grid {
  grid-template-columns: 1.3fr 0.8fr 1.1fr;
  margin: 18px 0;
}

.boi-now-grid div,
.boi-guard-grid div,
.boi-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-now-grid span,
.boi-guard-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.boi-now-grid strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  margin-top: 4px;
}

.boi-primary-action {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.boi-primary-action .primary {
  min-height: 52px;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 800;
}

.boi-action-preflight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boi-action-preflight div {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.boi-action-preflight span {
  display: block;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.boi-action-preflight strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.boi-action-blockers {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.boi-action-blockers ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.boi-action-blockers li + li {
  margin-top: 4px;
}

.boi-operation-card {
  border-left: 4px solid var(--brand);
}

.boi-defect-advisor {
  border-left: 4px solid #dc2626;
  background: #fffafa;
}

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

.boi-defect-grid article {
  border: 1px solid var(--line);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  min-width: 0;
}

.boi-defect-grid article.high {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.boi-defect-grid article.medium {
  border-left-color: #f97316;
  background: #fff7ed;
}

.boi-defect-grid article.low {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-defect-grid span {
  color: #991b1b;
  font-size: 12px;
  font-weight: 900;
}

.boi-defect-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-defect-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.boi-defect-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.boi-defect-grid dl div {
  border: 1px solid #fecdd3;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.boi-defect-grid dt {
  color: #991b1b;
  font-size: 12px;
  font-weight: 900;
}

.boi-defect-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.4;
}

.boi-pre-submit-gate {
  border-left: 4px solid #0369a1;
  background: #f8fbff;
}

.boi-pre-submit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.boi-pre-submit-grid article {
  border: 1px solid var(--line);
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  background: #fff1f2;
  padding: 12px;
}

.boi-pre-submit-grid article.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-pre-submit-grid span {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.boi-pre-submit-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-pre-submit-grid p,
.boi-pre-submit-grid em {
  color: var(--muted);
  line-height: 1.5;
}

.boi-pre-submit-grid em {
  display: block;
  font-style: normal;
}

.boi-pre-submit-decision {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  margin-top: 12px;
}

.boi-pre-submit-decision strong {
  color: var(--text);
}

.boi-pre-submit-decision p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-status-response-advisor {
  border-left: 4px solid #0891b2;
  background: #f0fdff;
}

.boi-status-snapshot,
.boi-status-response-grid {
  display: grid;
  gap: 10px;
}

.boi-status-snapshot {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 10px;
}

.boi-status-snapshot div {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-status-snapshot span,
.boi-status-response-grid span {
  color: #0e7490;
  font-size: 12px;
  font-weight: 900;
}

.boi-status-snapshot strong,
.boi-status-response-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-status-snapshot p,
.boi-status-response-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.boi-status-response-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.boi-status-response-grid article {
  border: 1px solid var(--line);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-status-response-grid article.active {
  border-left-color: #0891b2;
  background: #ecfeff;
}

.boi-status-response-grid article.ready {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-status-response-grid article.locked {
  border-left-color: #94a3b8;
  background: #f8fafc;
}

.boi-status-response-grid dl {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.boi-status-response-grid dl div {
  border: 1px solid #cffafe;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.boi-status-response-grid dt {
  color: #0e7490;
  font-size: 12px;
  font-weight: 900;
}

.boi-status-response-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.4;
}

.boi-post-approval-service {
  border-left: 4px solid #7c3aed;
  background: #fbfaff;
}

.boi-post-approval-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  margin-bottom: 12px;
}

.boi-post-approval-summary strong {
  display: block;
  color: var(--text);
}

.boi-post-approval-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-post-approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.boi-post-approval-grid article {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-left: 5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  min-width: 0;
}

.boi-post-approval-grid article.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-post-approval-grid article.open {
  border-left-color: #dc2626;
  background: #fff7ed;
}

.boi-post-approval-grid span {
  color: #6d28d9;
  font-size: 12px;
  font-weight: 900;
}

.boi-post-approval-grid strong,
.boi-post-approval-grid em,
.boi-post-approval-grid p,
.boi-post-approval-grid small {
  overflow-wrap: anywhere;
}

.boi-post-approval-grid strong {
  color: var(--text);
}

.boi-post-approval-grid em {
  color: #334155;
  font-style: normal;
  font-weight: 800;
}

.boi-post-approval-grid p,
.boi-post-approval-grid small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-post-approval-grid small {
  color: #9a3412;
}

@media (max-width: 760px) {
  .boi-post-approval-summary {
    display: block;
  }

  .boi-post-approval-summary .actions {
    margin-top: 10px;
  }
}

.boi-consultant-panel {
  border-left: 4px solid #0f766e;
  background: #f8fffd;
}

.boi-consultant-ruling {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 12px;
  border: 1px solid #99f6e4;
  border-left: 5px solid #0f766e;
  border-radius: 8px;
  background: #ecfdf5;
  padding: 14px;
  margin-bottom: 14px;
}

.boi-consultant-ruling > div:first-child {
  min-width: 0;
}

.boi-consultant-ruling span,
.boi-consultant-ruling dt {
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
}

.boi-consultant-ruling strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.boi-consultant-ruling p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.boi-consultant-ruling dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.boi-consultant-ruling dl div {
  border: 1px solid #b7e4d6;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  min-width: 0;
}

.boi-consultant-ruling dd {
  margin: 5px 0 0;
  color: var(--text);
  line-height: 1.45;
}

.boi-consultant-ruling ul {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 10px 10px 28px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  line-height: 1.45;
}

.boi-consultant-command {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  padding: 14px;
}

.boi-consultant-command-head,
.boi-consultant-command-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 12px;
  align-items: stretch;
}

.boi-consultant-command-head > div,
.boi-consultant-command-bottom section,
.boi-consultant-command-grid section {
  min-width: 0;
}

.boi-consultant-command span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 900;
}

.boi-consultant-command strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.boi-consultant-command p,
.boi-consultant-command li,
.boi-consultant-command em {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.boi-consultant-score {
  display: grid;
  place-items: center;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  text-align: center;
}

.boi-consultant-score b {
  color: #1d4ed8;
  font-size: 32px;
  line-height: 1;
}

.boi-consultant-score small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.boi-consultant-command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.boi-consultant-command-grid section,
.boi-consultant-command-bottom section {
  border: 1px solid #dbe4ef;
  border-left: 5px solid #f97316;
  border-radius: 8px;
  background: #ffffff;
  padding: 11px;
}

.boi-consultant-command-grid section.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-consultant-command-grid section.done span {
  background: #bbf7d0;
  color: #166534;
}

.boi-consultant-command-grid section.open span {
  background: #ffedd5;
  color: #9a3412;
}

.boi-consultant-command-bottom ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.boi-china-expert-advisor {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid #fecaca;
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  background: #fff7f7;
  padding: 14px;
}

.boi-china-expert-first {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-china-expert-first strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.boi-china-expert-first p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-china-expert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.boi-china-expert-grid section {
  min-width: 0;
  border: 1px solid #dbe4ef;
  border-left: 5px solid #f97316;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-china-expert-grid section.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-china-expert-grid span {
  display: inline-flex;
  border-radius: 999px;
  background: #ffedd5;
  color: #9a3412;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 900;
}

.boi-china-expert-grid section.done span {
  background: #bbf7d0;
  color: #166534;
}

.boi-china-expert-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.boi-china-expert-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-china-expert-grid em {
  color: var(--text);
  font-style: normal;
  font-weight: 800;
}

.boi-china-expert-advisor details {
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.boi-consultant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.boi-consultant-grid article,
.boi-consultant-detail details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  min-width: 0;
}

.boi-consultant-grid span {
  display: block;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 6px;
}

.boi-consultant-grid strong {
  display: block;
  color: var(--text);
  line-height: 1.45;
}

.boi-consultant-grid p,
.boi-consultant-grid li,
.boi-consultant-detail li {
  color: var(--muted);
  line-height: 1.55;
}

.boi-consultant-grid ul,
.boi-consultant-detail ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.boi-embassy-route-plan {
  display: grid;
  gap: 10px;
  border: 1px solid #fde68a;
  border-left: 5px solid #ca8a04;
  border-radius: 8px;
  background: #fffbeb;
  padding: 14px;
  margin-top: 14px;
}

.boi-route-missing {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  padding: 12px;
  color: #7c2d12;
}

.boi-route-missing strong {
  display: block;
  color: #7c2d12;
}

.boi-route-missing ul,
.boi-embassy-route-plan details ul {
  margin: 8px 0 0;
  padding-left: 18px;
  line-height: 1.5;
}

.boi-route-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.boi-route-steps article {
  border: 1px solid var(--line);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-route-steps article.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-route-steps article.active {
  border-left-color: #0369a1;
  background: #f0f9ff;
}

.boi-route-steps article.blocked {
  border-left-color: #f97316;
  background: #fff7ed;
}

.boi-route-steps span {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.boi-route-steps strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-route-steps p,
.boi-route-steps em,
.boi-embassy-route-plan details li {
  color: var(--muted);
  line-height: 1.5;
}

.boi-route-steps em {
  display: block;
  font-style: normal;
}

.boi-embassy-route-plan details {
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-embassy-route-plan summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.boi-intake-tracker {
  border-left: 4px solid #7c3aed;
  background: #fbfaff;
}

.boi-intake-status-grid,
.boi-intake-next-actions {
  display: grid;
  gap: 10px;
}

.boi-intake-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.boi-intake-status-grid article,
.boi-intake-next-actions div {
  border: 1px solid var(--line);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  min-width: 0;
}

.boi-intake-status-grid article.overdue {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.boi-intake-status-grid article.sent {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-intake-status-grid article.approved {
  border-left-color: #0369a1;
  background: #f0f9ff;
}

.boi-intake-status-grid article.draft {
  border-left-color: #f97316;
  background: #fff7ed;
}

.boi-intake-status-grid article.missing {
  border-left-color: #7c3aed;
  background: #faf5ff;
}

.boi-intake-status-grid span,
.boi-intake-next-actions span {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
}

.boi-intake-status-grid strong,
.boi-intake-next-actions strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-intake-status-grid p,
.boi-intake-next-actions p {
  color: var(--muted);
  line-height: 1.5;
}

.boi-intake-status-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.boi-intake-status-grid dl div {
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.boi-intake-status-grid dt {
  color: #5b21b6;
  font-size: 12px;
  font-weight: 900;
}

.boi-intake-status-grid dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.4;
}

.boi-intake-next-actions {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 10px;
}

.boi-consultant-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boi-consultant-questions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.boi-consultant-actions {
  margin-top: 14px;
}

.boi-consultant-actions > div:last-child {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.boi-consultant-actions article {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  padding: 12px;
}

.boi-consultant-actions span {
  color: #3730a3;
  font-size: 12px;
  font-weight: 900;
}

.boi-consultant-actions strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-consultant-actions ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.boi-advisor-requirement-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.boi-advisor-requirement-list section {
  border: 1px solid #dbeafe;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.boi-advisor-requirement-list section.ready {
  border-left-color: #16a34a;
}

.boi-advisor-requirement-list small,
.boi-advisor-requirement-list em {
  display: block;
  color: var(--muted);
  line-height: 1.4;
}

.boi-advisor-requirement-list b {
  display: block;
  margin: 4px 0;
  color: var(--text);
}

.boi-case-audit {
  margin-top: 14px;
}

.boi-case-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.boi-case-audit article {
  border: 1px solid var(--line);
  border-left: 5px solid #dc2626;
  border-radius: 8px;
  background: #fff1f2;
  padding: 12px;
}

.boi-case-audit article.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-case-audit span {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.boi-case-audit strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-case-audit p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-case-close-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  margin-top: 12px;
}

.boi-case-close-gate strong {
  color: var(--text);
}

.boi-case-close-gate p {
  margin: 4px 0 0;
  color: var(--muted);
}

.boi-submission-runway {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.boi-submission-runway .panel-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.boi-submission-runway article {
  border: 1px solid var(--line);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.boi-submission-runway article.done {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-submission-runway article.active {
  border-left-color: #0369a1;
  background: #f0f9ff;
}

.boi-submission-runway article.blocked {
  border-left-color: #f97316;
  background: #fff7ed;
}

.boi-submission-runway span {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.boi-submission-runway strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-submission-runway p,
.boi-submission-runway em {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.boi-post-submission-advisor {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.boi-post-submission-advisor article {
  border: 1px solid var(--line);
  border-left: 5px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-post-submission-advisor article.high {
  border-left-color: #dc2626;
  background: #fff1f2;
}

.boi-post-submission-advisor article.medium {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.boi-post-submission-advisor article.low {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-post-submission-advisor span {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.boi-post-submission-advisor strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.boi-post-submission-advisor p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-post-submission-advisor dl {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.boi-post-submission-advisor dt {
  color: var(--text);
  font-weight: 900;
}

.boi-post-submission-advisor dd {
  margin: 2px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.boi-consultant-questions .panel-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.boi-question-gate {
  display: grid;
  gap: 12px;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 8px;
  background: #fff7ed;
  padding: 14px;
}

.boi-question-gate article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #fdba74;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-question-gate article.answered {
  border-color: #86efac;
  background: #f0fdf4;
}

.boi-question-gate article.blocked {
  border-color: #fb923c;
  background: #ffedd5;
}

.boi-question-gate span {
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.boi-question-gate strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  line-height: 1.45;
}

.boi-question-gate p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-question-gate em {
  color: #9a3412;
  font-style: normal;
  font-weight: 800;
}

.boi-question-rubric {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.boi-question-rubric section {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf3;
  padding: 10px;
  min-width: 0;
}

.boi-question-rubric span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.boi-question-rubric strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}

.boi-question-rubric p,
.boi-question-rubric li,
.boi-question-rubric em {
  color: var(--muted);
  line-height: 1.45;
}

.boi-question-rubric ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.boi-question-rubric em {
  display: block;
  margin-top: 7px;
  color: #7c2d12;
  font-style: normal;
}

.boi-question-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.boi-question-gate-grid section {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
}

.boi-question-gate-grid section.answered {
  border-color: #bbf7d0;
}

.boi-question-gate-grid b {
  display: inline-block;
  margin-bottom: 4px;
  color: #9a3412;
  font-size: 12px;
}

.boi-question-gate-grid p {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
}

.boi-question-gate-grid em {
  display: block;
  margin-top: 5px;
  color: #9a3412;
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.boi-consultant-questions article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  padding: 12px;
}

.boi-consultant-questions article.answered {
  border-color: #86efac;
  background: #f0fdf4;
}

.boi-consultant-questions article.blocked {
  border-color: #fdba74;
  background: #fff7ed;
}

.boi-consultant-questions b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0369a1;
  color: #ffffff;
}

.boi-consultant-questions span {
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.boi-consultant-questions strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  line-height: 1.45;
}

.boi-consultant-questions p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-consultant-questions em {
  color: #075985;
  font-style: normal;
  font-weight: 800;
}

.boi-consultant-questions button {
  margin-top: 10px;
}

.consultant-question-preview {
  border: 1px solid #bae6fd;
  border-radius: 8px;
  background: #f0f9ff;
  padding: 12px;
  margin-bottom: 12px;
}

.consultant-question-preview span {
  display: block;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.consultant-question-preview strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.consultant-question-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.consultant-answer-quality {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.consultant-answer-quality section {
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #f8faff;
  padding: 10px;
}

.consultant-answer-quality strong {
  display: block;
  color: #3730a3;
  margin-bottom: 6px;
}

.consultant-answer-quality ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.consultant-answer-quality li + li {
  margin-top: 4px;
}

.consultant-answer-rubric {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.consultant-answer-rubric section {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fffaf3;
  padding: 10px;
}

.consultant-answer-rubric span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.consultant-answer-rubric strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}

.consultant-answer-rubric p,
.consultant-answer-rubric li,
.consultant-answer-rubric em {
  color: var(--muted);
  line-height: 1.45;
}

.consultant-answer-rubric ul {
  margin: 7px 0 0;
  padding-left: 18px;
}

.consultant-answer-rubric em {
  display: block;
  margin-top: 7px;
  color: #7c2d12;
  font-style: normal;
}

.boi-consultant-journey {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.boi-consultant-journey .panel-title {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.boi-consultant-stage {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.boi-consultant-stage summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.boi-consultant-stage b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--muted);
}

.boi-consultant-stage summary > span {
  border-radius: 999px;
  padding: 3px 8px;
  background: #e2e8f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.boi-consultant-stage div {
  margin-top: 10px;
}

.boi-consultant-stage p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-stage-advisor-current {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1.4fr);
  gap: 12px;
  border: 1px solid #93c5fd;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  padding: 14px;
}

.boi-stage-advisor-current span {
  display: block;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.boi-stage-advisor-current strong {
  display: block;
  margin-top: 4px;
  color: #0b3b75;
  font-size: 20px;
  line-height: 1.3;
}

.boi-stage-advisor-current p,
.boi-stage-advisor-current dd {
  margin: 6px 0 0;
  color: #42526b;
  line-height: 1.5;
}

.boi-stage-advisor-current dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.boi-stage-advisor-current dl div {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.boi-stage-advisor-current dt {
  color: #1e40af;
  font-size: 12px;
  font-weight: 900;
}

.boi-stage-completion-definition {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.1fr);
  gap: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-stage-completion-definition.compact {
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.boi-stage-completion-definition span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 900;
}

.boi-stage-completion-definition strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  line-height: 1.35;
}

.boi-stage-completion-definition p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-stage-completion-definition ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.boi-stage-completion-definition li + li {
  margin-top: 4px;
}

.boi-stage-completion-definition li.done {
  color: #166534;
}

.boi-stage-completion-definition li.open {
  color: #9a3412;
  font-weight: 800;
}

.boi-stage-auto-advance {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1.3fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid #a7f3d0;
  border-left: 5px solid #059669;
  border-radius: 8px;
  background: #f0fdf4;
  padding: 14px;
}

.boi-stage-auto-advance span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #bbf7d0;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
}

.boi-stage-auto-advance strong {
  display: block;
  margin-top: 6px;
  color: #064e3b;
  font-size: 18px;
  line-height: 1.35;
}

.boi-stage-auto-advance p,
.boi-stage-auto-advance dd {
  margin: 6px 0 0;
  color: #42526b;
  line-height: 1.45;
}

.boi-stage-auto-advance dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.boi-stage-auto-advance dl div {
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ffffff;
  padding: 9px;
}

.boi-stage-auto-advance dt {
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.boi-final-audit-gate {
  display: grid;
  gap: 12px;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 8px;
  background: #fffaf3;
  padding: 14px;
  margin-top: 14px;
}

.boi-final-audit-gate.ready {
  border-color: #a7f3d0;
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-final-audit-summary {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-final-audit-summary strong {
  display: block;
  color: var(--text);
  line-height: 1.35;
}

.boi-final-audit-summary p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.boi-final-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.boi-final-audit-grid article {
  border: 1px solid #dbe4ef;
  border-left: 5px solid #64748b;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  min-width: 0;
}

.boi-final-audit-grid article.high {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.boi-final-audit-grid article.medium {
  border-left-color: #f97316;
  background: #fffaf3;
}

.boi-final-audit-grid article.low {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-final-audit-grid span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.boi-final-audit-grid article.high span {
  background: #fee2e2;
  color: #991b1b;
}

.boi-final-audit-grid article.medium span {
  background: #ffedd5;
  color: #9a3412;
}

.boi-final-audit-grid article.low span {
  background: #bbf7d0;
  color: #166534;
}

.boi-final-audit-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.boi-final-audit-grid p,
.boi-final-audit-grid em {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.boi-stage-gate-list {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boi-stage-gate-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.boi-stage-gate-list section {
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #fff7f7;
  padding: 10px;
}

.boi-stage-gate-list section.done {
  border-color: #bbf7d0;
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-stage-gate-list span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 900;
}

.boi-stage-gate-list section.done span {
  background: #bbf7d0;
  color: #166534;
}

.boi-stage-gate-list strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}

.boi-stage-gate-list p,
.boi-stage-gate-list em {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.boi-stage-gate-list em {
  color: #7f1d1d;
  font-weight: 700;
}

.boi-consultant-signal-strip {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.boi-consultant-signal-strip section {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  padding: 10px;
}

.boi-consultant-signal-strip section.done {
  border-color: #bfdbfe;
  background: #f8faff;
}

.boi-consultant-signal-strip span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.boi-consultant-signal-strip section.done span {
  background: #dbeafe;
  color: #1e40af;
}

.boi-consultant-signal-strip strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}

.boi-consultant-signal-strip p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-stage-request-drafts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boi-stage-request-drafts section {
  border: 1px solid #dbe4ef;
  border-left: 4px solid #64748b;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-stage-request-drafts section.open {
  border-left-color: #f97316;
  background: #fffaf3;
}

.boi-stage-request-drafts section.done {
  border-left-color: #16a34a;
}

.boi-stage-request-drafts span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.boi-stage-request-drafts section.open span {
  background: #ffedd5;
  color: #9a3412;
}

.boi-stage-request-drafts strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}

.boi-stage-request-drafts p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-stage-request-drafts .boi-email-draft {
  margin-top: 10px;
  max-height: 220px;
}

.boi-intake-recovery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boi-intake-recovery-grid article {
  border: 1px solid #dbe4ef;
  border-left: 4px solid #64748b;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-intake-recovery-grid article.open {
  border-left-color: #2563eb;
  background: #f8faff;
}

.boi-intake-recovery-grid article.blocked {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.boi-intake-recovery-grid article.resolved {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.boi-intake-recovery-grid span {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.boi-intake-recovery-grid article.open span {
  background: #dbeafe;
  color: #1e40af;
}

.boi-intake-recovery-grid article.blocked span {
  background: #fee2e2;
  color: #991b1b;
}

.boi-intake-recovery-grid article.resolved span {
  background: #bbf7d0;
  color: #166534;
}

.boi-intake-recovery-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.35;
}

.boi-intake-recovery-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-intake-recovery-grid dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
}

.boi-intake-recovery-grid dl div {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px;
}

.boi-intake-recovery-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.boi-intake-recovery-grid dd {
  margin: 3px 0 0;
  color: var(--text);
  font-weight: 900;
}

.boi-stage-lock-reason {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
  color: #64748b !important;
}

.boi-stage-advisor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.boi-stage-advisor-grid section {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.boi-stage-advisor-grid strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.boi-stage-advisor-grid ol,
.boi-stage-advisor-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.boi-stage-advisor-grid li + li {
  margin-top: 4px;
}

.boi-stage-advisor-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-consultant-stage.done {
  border-color: #86efac;
  background: #f0fdf4;
}

.boi-consultant-stage.done b,
.boi-consultant-stage.done summary > span {
  background: #16a34a;
  color: #ffffff;
}

.boi-consultant-stage.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.boi-consultant-stage.active b,
.boi-consultant-stage.active summary > span {
  background: #2563eb;
  color: #ffffff;
}

.boi-consultant-stage.blocked {
  border-color: #fed7aa;
  background: #fff7ed;
}

.boi-consultant-stage.blocked b,
.boi-consultant-stage.blocked summary > span {
  background: #f97316;
  color: #ffffff;
}

.boi-consultant-detail summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.boi-consultant-detail summary span {
  color: var(--muted);
  font-size: 12px;
}

.boi-operation-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: stretch;
}

.boi-operation-grid figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.boi-operation-grid img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top left;
}

.boi-operation-grid figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

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

.boi-operation-steps-linear {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.boi-operation-steps div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-operation-steps span {
  display: block;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.boi-operation-steps strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.boi-blocker-strip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  padding: 12px;
}

.boi-blocker-strip strong {
  white-space: nowrap;
}

.boi-stepper {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.boi-step {
  min-height: 128px;
  opacity: 1;
  border-color: #d9e3ee;
  background: #f8fafc;
}

.boi-step summary {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.boi-step b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dbe4ef;
  color: var(--muted);
}

.boi-step strong {
  display: block;
  margin-top: 0;
}

.boi-step p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.boi-step.active {
  border-color: #1d4ed8;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.boi-step.active b {
  background: #1d4ed8;
  color: #ffffff;
}

.boi-step.active strong {
  color: #0b3b75;
}

.boi-step summary > span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 8px;
  background: #e5edf5;
  color: #53657d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.boi-step.active summary > span {
  background: #bfdbfe;
  color: #1e3a8a;
}

.boi-step.done {
  border-color: #86efac;
  background: #f0fdf4;
}

.boi-step.done b {
  background: #15803d;
  color: #ffffff;
}

.boi-step.done summary > span {
  background: #bbf7d0;
  color: #166534;
}

.boi-step.blocked {
  border-color: #facc15;
  background: #fffbea;
}

.boi-step.blocked b {
  background: #ca8a04;
  color: #ffffff;
}

.boi-step.blocked summary > span {
  background: #fef3c7;
  color: #92400e;
}

.boi-step.not-started,
.boi-step.locked {
  border-color: #d1d5db;
  background: #f9fafb;
  opacity: 0.78;
}

.boi-step.not-started b,
.boi-step.locked b {
  background: #e5e7eb;
  color: #6b7280;
}

.boi-step-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.boi-step-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.boi-step-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.boi-step-legend .done { background: #f0fdf4; color: #166534; }
.boi-step-legend .done::before { background: #15803d; }
.boi-step-legend .active { background: #eff6ff; color: #1e3a8a; }
.boi-step-legend .active::before { background: #1d4ed8; }
.boi-step-legend .blocked { background: #fffbea; color: #92400e; }
.boi-step-legend .blocked::before { background: #ca8a04; }
.boi-step-legend .not-started { background: #f9fafb; color: #6b7280; }
.boi-step-legend .not-started::before { background: #9ca3af; }

.boi-selected-case-detail {
  border-top: 4px solid var(--brand);
}

.boi-case-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.boi-case-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-case-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.boi-case-detail-grid strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  margin-top: 4px;
}

.boi-case-detail-grid p,
.boi-detail-note p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.boi-accordion-grid > details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.boi-selected-case-detail .task-list {
  gap: 10px;
}

.boi-selected-case-detail .task {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 7px;
  min-width: 0;
  background: #ffffff;
  color: var(--text);
}

.boi-selected-case-detail .task span,
.boi-selected-case-detail .task em {
  color: var(--muted);
  line-height: 1.45;
}

.boi-selected-case-detail .task strong {
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.boi-selected-case-detail .task button {
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
}

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

.boi-task-actions .button-link {
  min-height: 34px;
  padding: 6px 12px;
}

.boi-selected-case-detail .inline-tool-button {
  margin: 10px 0;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
}

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

.boi-guard-grid .ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.boi-guard-grid .ok span {
  color: #166534;
}

.boi-guard-grid .blocked {
  border-color: #fed7aa;
  background: #fff7ed;
}

.boi-guard-grid .blocked span {
  color: #b45309;
}

.boi-reference {
  padding: 0;
}

.boi-reference > summary {
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 800;
  color: var(--brand-strong);
}

.boi-reference[open] > summary {
  border-bottom: 1px solid var(--line);
}

.boi-reference > *:not(summary) {
  margin: 14px;
}

.flat-panel {
  box-shadow: none;
}

.boi-case-strip {
  display: grid;
  gap: 8px;
}

.boi-case-strip button {
  justify-content: flex-start;
  text-align: left;
  background: #ffffff;
  color: var(--text);
}

.boi-case-strip button.selected {
  border-color: var(--brand);
  background: #e8f3fb;
}

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

.boi-requirement-workbench {
  display: grid;
  gap: 10px;
}

.boi-requirement-workbench article {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.boi-requirement-workbench article.needs-action {
  border-color: #fed7aa;
  background: #fffaf2;
}

.boi-requirement-workbench article.ready {
  border-color: #bbf7d0;
  background: #f8fffb;
}

.boi-requirement-workbench article > div:first-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.boi-requirement-workbench strong {
  color: var(--text);
}

.boi-requirement-workbench p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.boi-requirement-workbench dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.boi-requirement-workbench dl div {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.boi-requirement-workbench dt {
  margin-bottom: 3px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.boi-requirement-workbench dd {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.boi-input-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.boi-input-grid label:first-child {
  grid-column: span 2;
}

.boi-input-grid textarea {
  min-height: 96px;
}

.boi-generated-text {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #d6e3f0;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.5;
  font-family: Consolas, "Microsoft YaHei", "Noto Sans Thai", monospace;
  font-size: 12px;
}

.mini-card strong,
.job strong {
  color: var(--text);
}

.checkpoint span {
  color: var(--text);
  background: #e5e7eb;
}

.checkpoint.pass span {
  background: #dcfce7;
  color: #166534;
}

.checkpoint.pending span,
.checkpoint.warning span {
  background: #fef3c7;
  color: #92400e;
}

.checkpoint.blocked span {
  background: #fee2e2;
  color: #991b1b;
}

.progress {
  background: #e7edf3;
}

.progress i {
  background: linear-gradient(90deg, var(--brand), var(--ocean));
}

.slot-option,
.upload-list input[type="file"] {
  background: #ffffff;
  color: var(--text) !important;
}

.showcase-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(46, 189, 255, 0.28);
  border-radius: 12px;
  color: #eaf7ff;
  background:
    linear-gradient(135deg, rgba(4, 18, 38, 0.98), rgba(7, 37, 74, 0.96) 52%, rgba(0, 78, 122, 0.9)),
    repeating-linear-gradient(90deg, rgba(125, 211, 252, 0.08) 0 1px, transparent 1px 56px);
  box-shadow: 0 22px 48px rgba(8, 30, 63, 0.22);
}

.showcase-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.08), transparent),
    radial-gradient(circle at 82% 18%, rgba(56, 189, 248, 0.18), transparent 28%);
}

.showcase-copy,
.showcase-command {
  position: relative;
  z-index: 1;
}

.showcase-copy h2 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: 0;
}

.showcase-copy p {
  max-width: 820px;
  margin: 0;
  color: #bfd7ee;
  font-size: 16px;
  line-height: 1.7;
}

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

.showcase-actions button {
  border-color: rgba(125, 211, 252, 0.48);
  color: #ffffff;
  background: rgba(14, 116, 144, 0.6);
}

.showcase-command {
  display: grid;
  gap: 10px;
}

.showcase-command > div {
  padding: 14px;
  border: 1px solid rgba(148, 216, 255, 0.22);
  border-radius: 10px;
  background: rgba(5, 23, 48, 0.72);
  box-shadow: inset 0 0 28px rgba(34, 211, 238, 0.06);
}

.showcase-command span,
.showcase-command small {
  display: block;
  color: #9cc7dd;
  font-size: 12px;
  font-weight: 800;
}

.showcase-command strong {
  display: block;
  margin: 3px 0;
  color: #ffffff;
  font-size: 30px;
}

.mobile-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.phone-frame {
  min-height: 520px;
  padding: 12px;
  border-radius: 34px;
  background: linear-gradient(155deg, #061429, #111827 55%, #02111f);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 48px rgba(7, 19, 37, 0.24);
}

.phone-speaker {
  width: 72px;
  height: 5px;
  margin: 4px auto 10px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.5);
}

.phone-screen {
  min-height: 472px;
  display: grid;
  grid-template-rows: auto auto minmax(86px, auto) 1fr auto;
  gap: 10px;
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(232, 243, 255, 0.96)),
    linear-gradient(135deg, rgba(14, 116, 144, 0.08), transparent);
  color: #0b2545;
  overflow: hidden;
}

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

.phone-screen header span,
.phone-screen footer span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.phone-screen header strong {
  font-size: 18px;
  color: #002b5c;
}

.phone-hero-card {
  padding: 12px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #003463, #0369a1);
}

.phone-frame.green .phone-hero-card {
  background: linear-gradient(135deg, #064e3b, #059669);
}

.phone-frame.violet .phone-hero-card {
  background: linear-gradient(135deg, #312e81, #7c3aed);
}

.phone-frame.gold .phone-hero-card {
  background: linear-gradient(135deg, #7c2d12, #d97706);
}

.phone-hero-card p {
  margin: 0 0 10px;
  font-weight: 900;
}

.phone-hero-card div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.phone-hero-card b {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 15px;
}

.phone-hero-card b span {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.78);
}

.phone-timeline {
  display: grid;
  gap: 7px;
}

.phone-timeline span {
  position: relative;
  padding: 8px 10px 8px 28px;
  border: 1px solid #d8e4ef;
  border-radius: 9px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.phone-timeline span::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 13px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.phone-timeline span.done::before {
  background: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.phone-modules {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.phone-modules span {
  padding: 6px 8px;
  border: 1px solid #cddaea;
  border-radius: 999px;
  background: #ffffff;
  color: #12365c;
  font-size: 11px;
  font-weight: 800;
}

.translation-chat {
  display: grid;
  gap: 7px;
}

.translation-chat p {
  margin: 0;
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 800;
}

.translation-chat .from {
  background: #e0f2fe;
}

.translation-chat .to {
  background: #fff7ed;
}

.translation-chat .en {
  background: #ecfdf5;
}

.phone-screen footer {
  padding-top: 8px;
  border-top: 1px solid #d8e4ef;
}

.showcase-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.showcase-metrics article {
  padding: 16px;
  border: 1px solid #cddaea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.showcase-metrics span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.showcase-metrics strong {
  display: block;
  margin: 5px 0;
  color: #002b5c;
  font-size: 20px;
}

.showcase-metrics p {
  margin: 0;
  color: #526579;
  line-height: 1.55;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    box-shadow: none;
  }

  .sidebar:hover,
  .sidebar:focus-within {
    width: auto;
    box-shadow: none;
  }

  .brand,
  .nav {
    min-width: 0;
  }

  .brand-logo {
    width: 76px;
  }

  .main {
    height: auto;
    overflow: visible;
  }

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

  .topbar,
  .role-workbench-head,
  .split {
    grid-template-columns: 1fr;
    display: grid;
  }

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

  .kpi-grid,
  .showcase-hero,
  .mobile-showcase-grid,
  .showcase-metrics,
  .role-task-grid,
  .job-grid,
  .cards,
  .form-grid,
  .filter-bar,
  .boi-action-guide,
  .boi-simple-case-brief,
  .boi-simple-two-col,
  .boi-now-grid,
  .boi-stepper,
  .boi-guard-grid,
  .boi-operation-grid,
  .boi-operation-steps,
  .boi-modal-checklist > div,
  .boi-action-preflight,
  .boi-consultant-ruling,
  .boi-consultant-ruling dl,
  .boi-consultant-command-head,
  .boi-consultant-command-bottom,
  .boi-intake-status-grid dl,
  .boi-defect-grid dl,
  .boi-requirement-workbench dl {
    grid-template-columns: 1fr;
  }

  .boi-operation-grid img {
    height: auto;
    max-height: 260px;
  }

  .boi-blocker-strip {
    display: block;
  }

  .boi-action-links {
    min-width: 0;
  }

  .boi-focus-head,
  .boi-primary-action,
  .boi-pre-submit-decision {
    align-items: stretch;
    flex-direction: column;
  }

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

  .calendar-weekdays {
    display: none;
  }

  .calendar-popover {
    position: static;
    min-width: 0;
    box-shadow: none;
  }
}
