:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #233a33;
  background: #f4f6f3;
  font-synthesis: none;
  line-height: 1.5;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: #376c52;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #97c8a7;
  outline-offset: 3px;
}
button,
input,
select {
  border-radius: 8px;
}
button {
  border: 0;
}
input,
select {
  border: 1px solid #d7dfd9;
  background: #fff;
  color: inherit;
  padding: 10px 12px;
  min-width: 0;
}
input[type="checkbox"] {
  accent-color: #326b50;
  cursor: pointer;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
input[role="switch"] {
  appearance: none;
  width: 38px;
  height: 22px;
  border: 0;
  background: #cbd4ce;
  border-radius: 20px;
  position: relative;
  padding: 0;
  transition: background 0.15s;
}
input[role="switch"]:before {
  content: "";
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 3px #0002;
  transition: transform 0.15s;
}
input[role="switch"]:checked {
  background: #377357;
}
input[role="switch"]:checked:before {
  transform: translateX(16px);
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 78px;
  padding: 0 5vw;
  background: #fff;
  border-bottom: 1px solid #dfe6df;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.8px;
  color: #203c2e;
}
.brand span {
  font-size: 15px;
  font-weight: 400;
  color: #7c8b80;
  letter-spacing: 0;
  margin-left: 10px;
}
.top-actions {
  display: flex;
  gap: 24px;
  align-items: center;
}
.private-label {
  font-size: 12px;
  color: #607466;
  display: flex;
  align-items: center;
  gap: 7px;
}
.private-label i {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: #52916a;
}
.text-button {
  background: none;
  color: #637567;
  font-size: 13px;
  padding: 8px;
}
main {
  max-width: 1260px;
  margin: auto;
  padding: 48px 38px 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.2px;
  font-weight: 650;
  color: #73907b;
  margin: 0 0 10px;
}
h1 {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.3;
  margin: 0 0 10px;
}
.subtitle {
  font-size: 14px;
  color: #7a887d;
  margin: 0;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 550;
  padding: 11px 17px;
  white-space: nowrap;
  line-height: 1.5;
  min-height: 40px;
}
.primary {
  background: #326b50;
  color: #fff;
  border: 1px solid #326b50;
  border-radius: 8px;
}
.primary:hover {
  background: #27583f;
  text-decoration: none;
}
.primary span {
  font-size: 18px;
}
.secondary {
  color: #53675a;
  background: #fff;
  border: 1px solid #d7dfd9;
}
.secondary:hover {
  background: #f3f6f2;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 30px;
}
.metrics article {
  padding: 21px 24px;
  border: 1px solid #e0e7df;
  background: #fff;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.metrics span {
  font-size: 12px;
  color: #748376;
}
.metrics strong {
  font-size: 32px;
  line-height: 1.3;
  letter-spacing: -1px;
  margin: 10px 0 9px;
  font-weight: 600;
}
.metrics small {
  font-size: 11px;
  color: #97a196;
}
.metrics article:nth-child(2) {
  background: #edf4ec;
  border-color: #dbe7d9;
}
.accounts-panel {
  border: 1px solid #dfe5dd;
  background: #fff;
  border-radius: 13px;
  overflow: hidden;
}
.panel-toolbar {
  padding: 23px 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
  font-weight: 650;
}
.panel-toolbar p {
  font-size: 11px;
  color: #92a08f;
  margin: 6px 0 0;
}
.count {
  background: #f1f4ee;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 500;
  color: #83927e;
  margin-left: 8px;
  vertical-align: middle;
}
.filters {
  display: flex;
  gap: 9px;
}
.filters input,
.filters select {
  font-size: 12px;
  min-height: 37px;
  background: #fcfdfa;
}
.search {
  display: flex;
  align-items: center;
  position: relative;
}
.search span {
  position: absolute;
  left: 11px;
  color: #84957f;
  font-size: 22px;
  line-height: 1;
}
.search input {
  padding-left: 33px;
  width: 245px;
}
.icon-button {
  border: 1px solid #dce3d9;
  background: #fff;
  color: #73846f;
  font-size: 21px;
  padding: 3px 10px;
  line-height: 1.4;
  min-height: 36px;
  min-width: 36px;
}
.icon-button:hover {
  background: #f2f5ee;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 750px;
}
th {
  background: #f7f9f5;
  border-top: 1px solid #edf0e9;
  border-bottom: 1px solid #e8ede3;
  color: #8b9883;
  font-size: 11px;
  font-weight: 500;
  padding: 13px 22px;
}
td {
  padding: 22px;
  border-bottom: 1px solid #edf0e9;
  font-size: 12px;
}
tr:last-child td {
  border-bottom: 0;
}
tr:hover td {
  background: #fcfdfb;
}
.person {
  display: flex;
  align-items: center;
  gap: 13px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #edf2e8;
  color: #5e7754;
  font-weight: 650;
  font-size: 15px;
  flex-shrink: 0;
}
.avatar.admin {
  background: #e1eee3;
  color: #39734b;
}
.person strong {
  font-size: 13px;
  font-weight: 600;
}
.person small {
  display: block;
  font-size: 10px;
  color: #8e9c88;
  margin-top: 4px;
}
.admin-badge {
  font-size: 9px;
  padding: 2px 5px;
  border: 1px solid #d8e4d5;
  border-radius: 4px;
  color: #69875d;
  margin-left: 7px;
  font-weight: 400;
}
.status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: #5c7d53;
}
.status:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #76a866;
}
.status.off {
  color: #9c9489;
}
.status.off:before {
  background: #bbb2a5;
}
.access {
  display: inline-block;
  background: #edf4eb;
  padding: 4px 9px;
  border-radius: 5px;
  color: #5b7f4c;
  font-size: 10px;
}
.access.off {
  background: #f4f5f1;
  color: #a1a797;
}
.role-chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  background: #f0f2e9;
  color: #788359;
  font-size: 10px;
}
.role-chip.admin,
.role-chip.owner {
  background: #f4ede2;
  color: #a0804d;
}
.actions-column {
  text-align: right;
}
.row-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  white-space: nowrap;
}
.row-actions button {
  color: #47724f;
  font-size: 11px;
  background: none;
  padding: 4px 0;
}
.row-actions button:hover {
  text-decoration: underline;
}
.row-actions .muted {
  color: #a2ab9a;
  font-size: 11px;
}
.empty {
  padding: 55px;
  text-align: center;
  color: #9aa491;
  font-size: 13px;
}
.notes {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  padding: 18px 20px;
  background: #edf1e8;
  border-radius: 9px;
}
.note-icon {
  border: 1px solid #90a384;
  width: 17px;
  height: 17px;
  line-height: 15px;
  border-radius: 50%;
  font-size: 11px;
  text-align: center;
  color: #7b936d;
  flex-shrink: 0;
  margin-top: 2px;
}
.notes p {
  font-size: 11px;
  color: #829176;
  line-height: 1.9;
  margin: 0;
}
.notes strong {
  color: #647c56;
  font-weight: 550;
}
footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #dfe5da;
  padding-top: 20px;
  margin-top: 46px;
  color: #9da894;
  font-size: 10px;
}
footer a {
  color: #8d9d81;
}
.login-panel {
  padding: 64px 28px;
  text-align: center;
  background: #fff;
  border: 1px solid #dfe5da;
  border-radius: 14px;
}
.large-icon {
  margin: 0 auto 20px;
  width: 48px;
  height: 48px;
  background: #eaf2e7;
  border-radius: 13px;
  color: #4e7959;
  font-size: 28px;
}
.login-panel p {
  color: #829079;
  font-size: 13px;
  margin: 13px 0 26px;
}
.login-panel .small {
  font-size: 11px;
  margin-top: 17px;
  color: #9ba58f;
}
.error-banner {
  background: #fff1eb;
  border: 1px solid #ebd6c6;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.7;
  color: #a25a3d;
  border-radius: 8px;
  margin: 0 0 18px;
}
dialog {
  padding: 0;
  border: 1px solid #dce4d6;
  border-radius: 16px;
  width: min(650px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  box-shadow: 0 24px 100px #1f392d33;
  color: inherit;
  background: #fff;
}
dialog::backdrop {
  background: #20352c69;
  backdrop-filter: blur(3px);
}
dialog form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 44px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 23px 28px;
  border-bottom: 1px solid #e8ede2;
  background: #fcfdfb;
}
.dialog-header .eyebrow {
  margin-bottom: 5px;
  font-size: 9px;
}
.dialog-header h2 {
  font-size: 21px;
}
.dialog-header .icon-button {
  border: 0;
  background: none;
  font-size: 27px;
}
.dialog-body {
  padding: 25px 28px;
  overflow: auto;
}
.dialog-body section + section {
  margin-top: 26px;
}
.dialog-body h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 13px;
}
.dialog-body label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 11px;
  color: #7a8a70;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}
.dialog-body input:not([type="checkbox"]),
.dialog-body select {
  width: 100%;
  font-size: 12px;
}
.dialog-body input:disabled {
  background: #f6f8f2;
  color: #9ba591;
}
.field-hint {
  font-size: 10px;
  line-height: 1.8;
  color: #9aa58f;
  margin: 9px 0 0;
}
.password-row {
  display: flex;
  gap: 8px;
}
.password-row input {
  flex: 1;
  width: 0 !important;
}
.password-row .secondary {
  font-size: 11px;
  padding: 8px 12px;
}
.dialog-body .checkbox-line {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #7c8d70;
  margin: 12px 0 0;
}
.tool-choice {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px !important;
  border: 1px solid #dde6d6;
  background: #fafcf7;
  padding: 15px;
  border-radius: 10px;
}
.tool-choice + .tool-choice {
  margin-top: 10px;
}
.tool-monogram {
  width: 33px;
  height: 33px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #e2eddd;
  color: #5c8350;
  font-size: 15px;
  font-weight: 650;
  flex-shrink: 0;
}
.tool-monogram.knowledge {
  background: #ecebdf;
  color: #8d8758;
}
.tool-choice > span:nth-child(2),
.tool-copy {
  flex: 1;
}
.tool-copy {
  display: block !important;
}
.tool-choice strong {
  font-size: 12px;
  font-weight: 550;
  color: #526a47;
}
.tool-choice small {
  font-size: 10px;
  color: #8c9c7f;
  display: block;
  margin-top: 4px;
  line-height: 1.7;
}
.tool-hint {
  font-size: 10px;
  line-height: 1.9;
  color: #9ba68f;
  margin: 12px 0 0;
}
.role-section {
  margin: 12px 0 0 45px;
}
.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e8ede2;
  padding-top: 21px;
}
.status-row h3 {
  margin-bottom: 5px;
}
.status-row p {
  font-size: 10px;
  color: #96a38b;
  margin: 0;
}
.status-row .checkbox-line {
  margin: 0;
}
.dialog-body .error-banner {
  margin: 22px 0 0;
}
.dialog-footer {
  margin: 0;
  border-top: 1px solid #e8ede2;
  padding: 17px 28px;
  align-items: center;
  background: #fcfdf9;
}
.dialog-footer p {
  font-size: 10px;
  color: #9ba68f;
  margin: 0;
}
.dialog-footer > div {
  display: flex;
  gap: 9px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: #284f37;
  color: #fff;
  font-size: 12px;
  padding: 13px 23px;
  border-radius: 9px;
  box-shadow: 0 5px 30px #17392322;
  z-index: 10;
  max-width: 90vw;
}
@media (max-width: 850px) {
  main {
    padding: 32px 20px 20px;
  }
  .topbar {
    padding: 0 22px;
    height: 67px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .panel-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .filters {
    width: 100%;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .private-label {
    display: none;
  }
  .page-heading {
    gap: 14px;
  }
  .metrics article {
    padding: 18px;
  }
  .metrics strong {
    font-size: 27px;
  }
}
@media (max-width: 480px) {
  main {
    padding: 27px 14px 18px;
  }
  .brand {
    font-size: 20px;
  }
  .brand span {
    font-size: 12px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading .primary {
    padding: 9px 12px;
    font-size: 11px;
    margin-top: 25px;
  }
  .subtitle {
    font-size: 11px;
  }
  .metrics {
    gap: 10px;
    margin-bottom: 20px;
  }
  .metrics small {
    font-size: 9px;
  }
  .filters {
    gap: 7px;
  }
  .filters select {
    max-width: 103px;
    padding: 8px;
  }
  .panel-toolbar {
    padding: 18px;
  }
  .dialog-header,
  .dialog-body {
    padding: 20px;
  }
  .dialog-footer {
    padding: 15px 20px;
  }
  .dialog-footer > p {
    display: none;
  }
  .dialog-footer > div {
    width: 100%;
    justify-content: flex-end;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .tool-choice {
    padding: 12px;
  }
  .tool-choice small {
    font-size: 9px;
  }
  .role-section {
    margin-left: 0;
  }
  .notes {
    padding: 14px;
  }
  .notes p {
    font-size: 10px;
  }
  footer {
    margin-top: 30px;
  }
  .top-actions {
    gap: 8px;
  }
}
