:root {
  --ink: #172b46;
  --muted: #738197;
  --brand: #165dff;
  --line: #e7ecf3;
}
body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft Yahei",
    sans-serif;
  background: #f2f5fa;
  color: var(--ink);
  font-size: 13px;
  padding: 22px !important;
  margin: 0;
}
.business-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 18px;
}
.business-heading h1 {
  font-size: 25px;
  margin: 7px 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.business-heading p {
  margin: 0;
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #8795aa;
}
.workspace-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mode-badge {
  font-size: 11px;
  background: #e5edf9;
  padding: 7px 12px;
  border-radius: 24px;
  color: #466283;
}
.notice {
  padding: 10px 14px;
  color: #697e95;
  background: #eaf0f9;
  border: 1px solid #dae5f5;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 12px;
}
.card-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 3px 10px #192c4310;
}
.card-box h2,
.section-title {
  font-size: 16px;
  font-weight: 650;
  margin: 0 0 16px;
  color: var(--ink);
}
.muted,
small {
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric {
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.metric strong {
  display: block;
  font-size: 29px;
  font-weight: 700;
  color: var(--ink);
  margin: 9px 0 2px;
  font-variant-numeric: tabular-nums;
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric.primary {
  background: #173753;
  color: white;
}
.metric.primary strong,
.metric.primary span {
  color: white;
}
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr);
  gap: 18px;
}
.grid-even {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
}
.toolbar label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #dbe2ed;
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: white;
  min-width: 0;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #a7c6ff;
  outline-offset: 1px;
}
textarea {
  min-height: 100px;
  resize: vertical;
  width: 100%;
}
button {
  font: inherit;
}
.btn {
  font-size: 12px !important;
  border-radius: 6px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse !important;
}
th {
  text-align: left;
  background: #f7f9fc;
  color: #7d8a9d;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
td,
th {
  padding: 13px 10px !important;
  border-bottom: 1px solid #edf1f6;
  vertical-align: middle;
}
td {
  font-size: 12px;
  color: var(--ink);
}
tbody tr:hover {
  background: #fafcff;
}
.tag {
  display: inline-block;
  border-radius: 4px;
  padding: 3px 7px;
  background: #eaf1ff;
  color: #3265c3;
  font-size: 11px;
  margin: 2px 3px 2px 0;
}
.tag.green {
  background: #e7f6ef;
  color: #23905f;
}
.tag.orange {
  background: #fff1e0;
  color: #b97729;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tabs button {
  border: 1px solid var(--line);
  padding: 9px 16px;
  background: white;
  color: #60738a;
  border-radius: 7px;
}
.tabs button.active {
  background: #165dff;
  color: white;
  border-color: #165dff;
}
.empty {
  padding: 34px;
  text-align: center;
  color: #8491a3;
}
.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.split-heading h2 {
  margin: 0;
}
.actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.actions .btn {
  padding: 5px 8px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--brand);
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.chart {
  height: 250px;
  width: 100%;
}
dialog {
  border: 0;
  border-radius: 14px;
  padding: 0;
  width: min(960px, 94vw);
  max-height: 92vh;
  color: var(--ink);
  box-shadow: 0 20px 80px #12284133;
}
dialog::backdrop {
  background: #14283f55;
}
.dialog-heading {
  position: sticky;
  top: 0;
  background: white;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.dialog-heading h2 {
  font-size: 18px;
  margin: 0;
}
#dialog-content {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #60738a;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.form-error {
  color: #b33e3e;
  background: #fff1f1;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
}
.form-error:empty {
  display: none;
}
.timeline {
  border-left: 2px solid #dfe9f7;
  margin: 12px;
  padding-left: 20px;
}
.timeline article {
  margin-bottom: 18px;
}
.timeline p {
  margin: 4px 0;
  white-space: pre-wrap;
}
.facts {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  font-size: 12px;
  margin: 12px 0;
}
.facts dt {
  color: #8190a3;
  font-weight: 400;
}
.facts dd {
  margin: 0;
}
.detail-need {
  background: #f4f8ff;
  border-radius: 8px;
  padding: 16px;
  line-height: 1.8;
}
.content-text {
  white-space: pre-wrap;
  line-height: 1.9;
  word-break: break-word;
}
.chat-box {
  height: 360px;
  overflow-y: auto;
  background: #f5f8fc;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.bubble {
  max-width: 85%;
  margin: 10px 0;
  padding: 12px 15px;
  border-radius: 12px;
  background: white;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  line-height: 1.7;
}
.bubble.customer {
  margin-left: auto;
  background: #e9f1ff;
}
.bubble small {
  display: block;
  font-size: 10px;
  margin-bottom: 4px;
}
#feedback {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 20px;
  background: #173753;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px #17375344;
  z-index: 100;
  max-width: 80vw;
  display: none;
}
#feedback.show {
  display: block;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.asset {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.asset img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.asset div {
  padding: 12px;
}
.small-note {
  font-size: 11px;
  color: #8291a4;
  line-height: 1.8;
}
.task-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
}
.task-steps span {
  background: #edf6f2;
  color: #327f65;
  padding: 8px;
  border-radius: 5px;
}
.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  margin-top: 15px;
}
.room-photo {
  width: 66px;
  height: 44px;
  object-fit: cover;
  border-radius: 5px;
}
.mobile-hide {
  display: table-cell;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
@media (max-width: 1050px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2,
  .grid-even {
    grid-template-columns: 1fr;
  }
  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  body {
    padding: 12px !important;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .business-heading {
    align-items: flex-start;
  }
  .business-heading h1 {
    font-size: 21px;
  }
  .mode-badge {
    display: none;
  }
  .image-grid {
    grid-template-columns: 1fr;
  }
}
