:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color: #252d2b;
  background: #f7f8f6;
  font-size: 14px;
  line-height: 1.65;
  --green: #99752f;
  --muted: #727c76;
  --border: #e3e7e1;
  --surface: #ffffff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  color: #47534d;
  background: #f1f4ef;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover {
  background: #e9eee6;
  border-color: #bbc6b7;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.primary {
  background: #99752f;
  border-color: #99752f;
  color: #ffffff;
  font-weight: 600;
}
.primary:hover {
  background: #806124;
  border-color: #806124;
}
input,
select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
  color: #252d2b;
  min-width: 0;
}
input::placeholder {
  color: #929b94;
}
input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid #99752f;
  outline-offset: 3px;
}
label {
  display: block;
  font-weight: 500;
  margin: 15px 0 6px;
}
label input,
label select {
  display: block;
  width: 100%;
  margin-top: 6px;
}
label.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
}
label.check input {
  width: auto;
  margin: 0;
}
form > button {
  margin-top: 18px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
  margin-bottom: 0;
  font-weight: 650;
}
h2 {
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 600;
}
h3 {
  font-size: 15px;
  margin-bottom: 4px;
}
.muted {
  color: var(--muted);
}
.small,
small {
  font-size: 12px;
}
.error {
  color: #b14e37;
}
.full {
  width: 100%;
}
[hidden] {
  display: none !important;
}
a {
  color: #8a692c;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 0;
  background:
    radial-gradient(ellipse at 50% 0, #e7dfcc70, transparent 60%), #f7f8f6;
}
.login-card {
  width: min(430px, 90vw);
  background: #ffffff;
  border: 1px solid #e0e5dc;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 30px 100px #52633b0c;
}
.login-card h1 {
  margin: 24px 0 10px;
  font-size: 27px;
}
.login-card > .muted {
  margin-bottom: 30px;
}
.login-card .small {
  margin-bottom: 0;
  margin-top: 24px;
}
.brand-mark {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
  padding: 3px;
  flex: 0 0 auto;
}
.login-card .brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 12px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 222px;
  background: #fdfefb;
  border-right: 1px solid var(--border);
  padding: 28px 14px 20px;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 8px 36px;
}
.brand strong {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 1px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #849080;
  margin-top: 3px;
}
.nav-label {
  font-size: 11px;
  letter-spacing: 1px;
  color: #8d968a;
  padding: 0 14px 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar nav button {
  background: transparent;
  color: #687465;
  border: 1px solid transparent;
  text-align: left;
  padding: 10px 14px;
}
.sidebar nav button:hover {
  background: #f1f4ec;
  color: #29372b;
}
.sidebar nav button.selected {
  background: #f2ead9;
  color: #846221;
  border-color: #e8dcc0;
}
.sidebar nav i {
  display: inline-block;
  width: 25px;
  font-style: normal;
  font-size: 17px;
  vertical-align: -1px;
}
.sidebar nav span {
  float: right;
  background: #eadbb8;
  color: #816126;
  border-radius: 5px;
  padding: 0 6px;
  font-size: 11px;
}
.sidebar nav span:empty {
  display: none;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: #7e8a79;
  display: grid;
  gap: 12px;
  padding: 20px 10px 0;
}
.sidebar-foot button {
  background: transparent;
  color: #788573;
  border-radius: 20px;
}
.connection {
  color: #4d7b62;
}
.connection:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #65947b;
}
.connection.offline {
  color: #9c732e;
}
.connection.offline:before {
  background: #9c732e;
}
main {
  margin-left: 222px;
  padding: 30px 36px 60px;
  max-width: 1660px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #899382;
  font-weight: 500;
  margin-bottom: 5px;
}
header > button {
  border-radius: 20px;
  font-size: 12px;
  padding: 8px 16px;
}
.hero {
  background: linear-gradient(115deg, #f8f4e9, #ffffff 75%);
  border: 1px solid #e6dfcd;
  padding: 27px 28px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.hero h2 {
  font-size: 23px;
  font-weight: 550;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
}
.hero p {
  margin-bottom: 0;
  color: #7a816f;
  font-size: 13px;
  max-width: 590px;
}
.pill {
  display: inline-block;
  border-radius: 6px;
  background: #edf5ef;
  color: #477657;
  border: 1px solid #d4e4d8;
  padding: 3px 8px;
  font-size: 11px;
  white-space: nowrap;
}
.hero > .pill {
  color: #947339;
  border-color: #e5d8b9;
  background: #fcf9ef;
}
.pill.warn {
  background: #fff6e7;
  color: #9a6b20;
  border-color: #f1dfb9;
}
.pill.bad {
  background: #fff0ed;
  color: #ad513e;
  border-color: #efd6cf;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
.metric,
.card,
.list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
}
.metric .value {
  font-size: 32px;
  font-weight: 550;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 12px 0 9px;
  font-variant-numeric: tabular-nums;
}
.metric > small:first-child {
  color: #64705d;
  font-size: 12px;
}
.metric small {
  color: #89937f;
  font-size: 11px;
}
.two-col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.card h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}
.card p:last-child {
  margin-bottom: 0;
}
.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.actions + p {
  margin-top: 18px;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.toolbar p {
  flex: 1;
  margin: 0;
}
.toolbar input {
  flex: 1;
}
.toolbar select {
  max-width: 350px;
}
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.list-item {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.list-item .info {
  min-width: 0;
  flex: 1;
}
.list-item p {
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}
.list-item .actions {
  margin: 0;
  justify-content: flex-end;
}
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed #cdd6c5;
  border-radius: 10px;
}
dl {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  font-size: 12px;
  margin-bottom: 24px;
}
dt {
  color: #8a927f;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
#notice {
  position: sticky;
  top: 10px;
  z-index: 5;
  padding: 13px 18px;
  background: #eff7ef;
  color: #447252;
  border: 1px solid #d5e6d4;
  border-radius: 8px;
  margin-bottom: 20px;
}
#notice.error {
  background: #fff3eb;
  border-color: #f0d8c8;
}
.table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 13px;
}
td,
th {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: #f1f4ef;
  color: #7c8874;
  font-weight: 500;
}
td:nth-child(5) {
  max-width: 340px;
  white-space: normal;
  font-size: 12px;
}
.chat {
  background: transparent;
  min-height: 350px;
  padding: 12px 0 24px 18px;
  display: grid;
  gap: 24px;
  border-left: 1px solid #e0e7d9;
  margin: 26px 0 0 5px;
}
.message {
  max-width: 880px;
  position: relative;
}
.message:before {
  content: "";
  position: absolute;
  top: 7px;
  left: -22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aa955a;
  box-shadow: 0 0 0 4px #f7f8f6;
}
.message-head {
  font-size: 12px;
  color: #7a8671;
  margin-bottom: 9px;
}
.bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
}
.bubble img {
  display: block;
  max-width: min(340px, 100%);
  max-height: 300px;
  border-radius: 7px;
  cursor: zoom-in;
  margin-top: 8px;
}
.bubble video {
  max-width: 100%;
  max-height: 300px;
}
.file {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
}
.transcript {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  color: #638267;
}
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #efe0bf;
  background: #fffaed;
  margin-bottom: 10px;
  color: #8d7134;
  font-size: 12px;
}
dialog {
  color: #252d2b;
  background: #ffffff;
  border: 1px solid #dfe5d7;
  border-radius: 14px;
  max-width: 560px;
  width: calc(100vw - 40px);
  padding: 30px;
  box-shadow: 0 25px 80px #233b2126;
}
dialog::backdrop {
  background: #24302655;
  backdrop-filter: blur(4px);
}
#preview {
  max-width: 90vw;
  width: auto;
}
#preview img {
  display: block;
  max-width: 80vw;
  max-height: 75vh;
  margin-top: 10px;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 25px 0;
}
summary {
  cursor: pointer;
  margin-top: 20px;
  color: #99752f;
}
#attachment-image {
  max-width: 100%;
  max-height: 65vh;
  object-fit: contain;
}
#attachment-name,
#attachment-context {
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  main {
    padding: 26px;
    margin-left: 200px;
  }
  .sidebar {
    width: 200px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .list-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero {
    flex-direction: column;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 20px 16px 14px;
  }
  .brand {
    padding: 0 0 20px;
  }
  .nav-label {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  .sidebar nav button {
    padding: 7px 10px;
    font-size: 12px;
  }
  .sidebar nav i {
    width: 20px;
    font-size: 14px;
  }
  .sidebar-foot {
    margin-top: 14px;
    padding: 12px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  .sidebar-foot > span:nth-child(2) {
    display: none;
  }
  .sidebar-foot button {
    padding: 4px 12px;
    font-size: 11px;
  }
  main {
    margin: 0;
    padding: 22px 16px 40px;
  }
  h1 {
    font-size: 23px;
  }
  .metrics {
    gap: 10px;
  }
  .metric {
    padding: 16px;
  }
  .metric .value {
    font-size: 27px;
  }
  .hero {
    padding: 20px;
  }
  .hero h2 {
    font-size: 19px;
  }
  .toolbar > * {
    width: 100%;
    flex: auto;
  }
  .toolbar select {
    max-width: none;
  }
  .card {
    padding: 20px;
  }
  .list-item .actions {
    justify-content: flex-start;
  }
  .login-card {
    padding: 30px;
  }
}

/* Shared layout and task-oriented controls. */
.page-description {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
main {
  max-width: 1760px;
}
header {
  align-items: flex-start;
}
header > button {
  margin-top: 6px;
}
.login {
  grid-template-columns: minmax(280px, 480px) minmax(320px, 430px);
  gap: 9vw;
  justify-content: center;
  padding: 70px 40px;
}
.login-intro .eyebrow {
  color: #96733e;
}
.login-intro h2 {
  font-size: 42px;
  line-height: 1.4;
  letter-spacing: -1.5px;
  margin: 20px 0;
  font-weight: 550;
}
.login-intro > p {
  color: #7d8877;
  max-width: 370px;
  font-size: 15px;
  line-height: 1.9;
}
.login-steps {
  display: grid;
  gap: 22px;
  margin-top: 38px;
}
.login-steps div {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #64725f;
  font-size: 13px;
}
.login-steps b {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #dddcc7;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #987a42;
}
.login-card {
  width: 100%;
  box-shadow: 0 16px 70px #48583808;
}
.brand-mark {
  padding: 3px;
  border: 1px solid #efeee4;
}
.sidebar nav svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero {
  padding: 24px 28px;
  background: linear-gradient(105deg, #fbf9f0, #ffffff);
}
.hero h2 {
  font-size: 22px;
}
.metric {
  box-shadow: 0 2px 4px #42502c02;
  border-radius: 12px;
}
.two-col {
  align-items: start;
}
.card {
  border-radius: 12px;
}
.list-item {
  padding: 20px 24px;
  transition: border-color 0.15s;
}
.list-item:hover {
  border-color: #c8d2bf;
}
.list-item h3 {
  font-size: 16px;
  margin-bottom: 7px;
}
.item-heading {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 5px;
}
.item-heading h3 {
  margin: 0;
}
.list-item p.small {
  margin-top: 7px;
}
.item-more {
  position: relative;
}
.item-more > summary {
  list-style: none;
  margin: 0;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  color: #788271;
  background: white;
}
.item-more > summary::-webkit-details-marker {
  display: none;
}
.item-more[open] > summary {
  background: #f3f5ee;
}
.more-actions {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 20;
  min-width: 170px;
  display: grid;
  gap: 4px;
  padding: 8px;
  background: white;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px #28362016;
  border-radius: 10px;
}
.more-actions button {
  border: none;
  text-align: left;
  background: transparent;
}
.more-actions button:hover {
  background: #f5f7f1;
}
.more-actions button.danger {
  color: #aa5947;
}
.list-summary {
  display: flex;
  justify-content: space-between;
  color: #84907b;
  font-size: 12px;
  margin: 0 0 14px;
}
.message-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: white;
}
.message-rail {
  background: #fcfdf9;
  border-right: 1px solid var(--border);
  padding: 18px 12px;
}
.message-rail > input {
  width: 100%;
  border-radius: 20px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 16px;
}
.message-rail > p {
  padding: 0 9px;
  font-size: 11px;
  color: #929c88;
}
#message-rooms {
  max-height: 650px;
  overflow: auto;
  display: grid;
  gap: 5px;
}
.room-button {
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  min-width: 0;
}
.room-button strong {
  display: block;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.room-button small {
  color: #95a08b;
  font-size: 11px;
  display: block;
  margin-top: 4px;
}
.room-button.selected {
  background: #f1eddf;
  border-color: #e8e0c7;
  color: #886b30;
}
.message-reader {
  padding: 22px 24px;
  min-width: 0;
}
.message-reader .toolbar {
  margin-bottom: 10px;
}
.message-reader .toolbar input {
  font-size: 12px;
  padding: 8px 10px;
}
.message-reader .toolbar input[type="date"] {
  flex: 0 1 145px;
}
.message-reader .toolbar button {
  font-size: 12px;
  padding: 7px 12px;
}
.message-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 18px;
}
.message-title h2 {
  margin: 0;
  font-size: 18px;
}
.message-title a {
  font-size: 12px;
}
#message-group {
  display: none;
}
.date-shortcuts {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 15px;
}
.date-shortcuts button {
  background: transparent;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 12px;
}
#message-result {
  font-size: 11px;
  color: #89967e;
  margin-left: auto;
}
.chat {
  margin: 8px 0 0 3px;
  min-height: 270px;
}
.bubble {
  background: #fafcf7;
  border-color: #e8ecdf;
  padding: 13px 17px;
}
.message-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.message-head strong {
  color: #485541;
  font-size: 13px;
  font-weight: 550;
}
.message-head time {
  color: #98a08f;
  font-size: 11px;
}
.day-separator {
  font-size: 11px;
  color: #929b87;
  padding: 3px 0;
}
.file {
  border-radius: 6px;
  font-size: 12px;
}
.file a {
  display: block;
  padding: 5px 8px;
  background: #f2f5eb;
  border: 1px solid #e4ead9;
  border-radius: 6px;
}
.empty {
  border-style: solid;
  background: #fbfcf8;
}
.pager {
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #8b9681;
}
.pager button {
  font-size: 12px;
}
.table-wrap {
  border-radius: 12px;
}
th {
  font-size: 12px;
  padding-top: 13px;
  padding-bottom: 13px;
  background: #f5f7f0;
}
tbody tr:hover {
  background: #fafbf7;
}
td:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.settings-grid .card > details > summary {
  margin-top: 0;
  padding: 9px 0;
}
.settings-grid .card p {
  font-size: 13px;
  line-height: 1.85;
}
.settings-grid form h3 {
  margin-top: 0;
}
.settings-grid .card {
  scroll-margin-top: 24px;
}
.settings-links {
  display: flex;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.settings-links a {
  color: #7d896e;
  font-size: 12px;
}
.settings-links a:hover {
  color: #947136;
}
.form-hint {
  font-size: 12px;
  color: #8b977d;
  margin: 5px 0 18px;
}
dialog h2 {
  font-size: 20px;
  margin-bottom: 18px;
}
dialog .actions {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  margin-top: 24px;
}
@media (max-width: 1100px) {
  .message-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .message-reader {
    padding: 18px;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .login {
    gap: 40px;
  }
  .login-intro h2 {
    font-size: 34px;
  }
}
@media (max-width: 800px) {
  .login {
    display: grid;
    grid-template-columns: minmax(0, 430px);
    gap: 26px;
    padding: 32px 20px;
  }
  .login-intro {
    display: none;
  }
  .message-layout {
    display: block;
  }
  .message-rail {
    display: none;
  }
  #message-group {
    display: block;
    width: 100%;
    max-width: none;
  }
  .message-title {
    flex-wrap: wrap;
  }
  .message-reader .toolbar > * {
    flex: auto;
  }
  .message-reader .toolbar input[type="date"] {
    flex: 1;
  }
  .message-reader {
    padding: 18px 14px;
  }
  .page-description {
    font-size: 12px;
  }
  .list-item {
    padding: 18px;
  }
  .more-actions {
    left: 0;
    right: auto;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
.settings-grid {
  grid-template-areas: "feishu wecom" "destinations rules" "password password";
}
#setting-feishu {
  grid-area: feishu;
}
#setting-wecom {
  grid-area: wecom;
}
#setting-destinations {
  grid-area: destinations;
}
#setting-rules {
  grid-area: rules;
}
#setting-password {
  grid-area: password;
}
#setting-password form {
  max-width: 560px;
}
@media (max-width: 1100px) {
  .settings-grid {
    grid-template-areas: "wecom" "feishu" "destinations" "password" "rules";
  }
}

#password {
  width: 100%;
}

header > button {
  flex-shrink: 0;
  white-space: nowrap;
}
