:root {
  --ink: #182b25;
  --muted: #738079;
  --green: #19765c;
  --green-dark: #135e49;
  --soft: #e9f5ee;
  --border: #dfe6e0;
  --surface: #f6f8f5;
  --red: #b54143;
  --amber: #9a671b;
  --shadow: 0 4px 22px #20362a08;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
  line-height: 1.55;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #78b69c;
  outline-offset: 3px;
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #88bba2;
  outline-offset: 1px;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
.layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #162822;
  color: #d1ded5;
  padding: 30px 22px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.7px;
}
.brand img {
  width: 38px;
}
.brand small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.3px;
  color: #9bb6a6;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 46px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #a9beb1;
  font-size: 13px;
  transition: background 0.15s;
}
.nav a:hover {
  text-decoration: none;
  background: #ffffff08;
  color: white;
}
.nav a.active {
  background: #294a3c;
  color: #fff;
}
.nav a.active svg {
  color: #b6db9e;
}
.sidebar-note {
  margin-top: auto;
  font-size: 12px;
  color: #8ca896;
  padding: 20px 10px 0;
  border-top: 1px solid #31443a;
}
.sidebar-note b {
  display: block;
  color: #dce9df;
  margin-bottom: 6px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  background: #fafbf9;
  font-size: 12px;
  color: var(--muted);
}
.topbar .profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 32px;
  height: 32px;
  background: #e8ede7;
  color: #496651;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 650;
}
.content {
  padding: 32px 38px 48px;
  max-width: 1450px;
  margin: 0 auto;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}
h1 {
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 6px 0 8px;
  font-weight: 620;
}
h2 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 8px;
  font-weight: 620;
  letter-spacing: -0.25px;
}
h3 {
  font-size: 14px;
  margin: 0 0 7px;
}
p {
  margin: 0 0 14px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 10px;
  font-weight: 650;
  color: var(--green);
}
.muted,
.hint {
  color: var(--muted);
}
.hint {
  font-size: 12px;
  line-height: 1.55;
  margin-top: 7px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.btn:hover {
  background: #f1f5ef;
  text-decoration: none;
}
.btn.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.btn.primary:hover {
  background: var(--green-dark);
}
.btn.danger {
  color: var(--red);
}
.btn.small {
  padding: 6px 10px;
  font-size: 11px;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.stat,
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.stat {
  padding: 21px 22px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-value {
  font-size: 35px;
  letter-spacing: -1.2px;
  line-height: 1.5;
  font-weight: 580;
  margin-top: 10px;
}
.stat-caption {
  color: var(--muted);
  font-size: 11px;
}
.card {
  padding: 24px;
  margin-bottom: 20px;
}
.card.flush {
  padding: 0;
  overflow: hidden;
}
.card-head {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.card-head p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.status-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid #d1e4d7;
  border-radius: 9px;
  background: #ecf4ee;
}
.status-strip.neutral {
  background: #f0f2ef;
  border-color: var(--border);
}
.status-main {
  display: flex;
  gap: 14px;
  align-items: center;
}
.status-main svg {
  color: var(--green);
}
.status-main strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.status-main small {
  color: var(--muted);
  font-size: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 5px;
  background: #eef1ed;
  color: #65746b;
  font-weight: 550;
}
.pill.green {
  background: #e8f3e9;
  color: #2d7750;
}
.pill.red {
  background: #f9eded;
  color: #b05050;
}
.pill.amber {
  background: #fbf2df;
  color: #987123;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: currentColor;
  display: inline-block;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 20px;
}
.equal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.chart {
  width: 100%;
  height: 170px;
}
.chart-labels {
  display: flex;
  justify-content: space-around;
  font-size: 10px;
  color: var(--muted);
}
.legend {
  display: flex;
  gap: 20px;
  font-size: 11px;
  color: var(--muted);
  margin: 15px 0;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend .dot {
  background: #acd1af;
}
.legend .reject {
  background: #345f4a;
}
.small-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.small-list li {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #edf0ea;
  font-size: 12px;
}
.small-list b {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}
.small-list small {
  font-size: 11px;
  color: var(--muted);
}
.step {
  flex-shrink: 0;
  background: #eff3eb;
  color: #668563;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
}
th {
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  background: #fafbf8;
  padding: 12px 20px;
  border-block: 1px solid #e9ede6;
}
td {
  padding: 16px 20px;
  border-bottom: 1px solid #edf0ea;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: #fcfdfa;
}
.table-title {
  font-size: 12px;
  font-weight: 550;
  display: block;
}
.table-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.message-preview {
  max-width: 320px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-icon {
  width: 34px;
  height: 34px;
  background: #eff4eb;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: #548361;
  margin-right: 11px;
}
.chat-cell {
  display: flex;
  align-items: center;
}
.mono {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
}
.empty {
  text-align: center;
  padding: 50px 28px;
  color: var(--muted);
}
.empty svg {
  color: #8caa91;
  margin-bottom: 12px;
}
.empty b {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty p {
  font-size: 12px;
  max-width: 420px;
  margin: 0 auto 16px;
}
.banner {
  background: #fff4dc;
  border: 1px solid #efdfb5;
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 12px;
  margin-bottom: 20px;
  color: #775719;
}
.banner.info {
  background: #edf3ee;
  border-color: #d5e3d7;
  color: #41604a;
}
.banner.error {
  background: #fff0f0;
  border-color: #ecd2d2;
  color: #9c4040;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.field {
  display: block;
  min-width: 0;
}
.field.full {
  grid-column: 1/-1;
}
.field > span {
  display: block;
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 7px;
}
input:not([type='checkbox']),
select,
textarea {
  width: 100%;
  border: 1px solid #dce4da;
  background: #fcfdfa;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
}
input::placeholder,
textarea::placeholder {
  color: #a0a99d;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.65;
}
input[type='checkbox'] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  margin: 0;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  margin: 12px 0;
}
.check input {
  flex-shrink: 0;
  margin-top: 2px;
}
.section-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.section-number {
  color: #94ac94;
  font-size: 10px;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 21px;
}
.tabs button {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  padding: 9px 13px;
  color: var(--muted);
  font-size: 12px;
}
.tabs button.active {
  border-color: var(--green);
  color: var(--green);
  background: #edf5ee;
}
.policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 295px;
  gap: 20px;
  align-items: start;
}
.policy-aside {
  position: sticky;
  top: 22px;
}
.policy-aside .card {
  padding: 20px;
}
.policy-aside p {
  font-size: 12px;
  color: var(--muted);
}
.save-bar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  background: #f6f8f5ed;
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.result {
  border-radius: 7px;
  padding: 14px;
  background: #edf5ef;
  font-size: 12px;
  margin-top: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.result.bad {
  background: #fff1ed;
  color: #9a4d3a;
}
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.filters input {
  flex: 2;
  min-width: 150px;
}
.filters select {
  flex: 1;
  min-width: 125px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 22px;
  font-size: 11px;
  color: var(--muted);
}
.loading {
  padding: 80px;
  text-align: center;
  color: var(--muted);
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
}
.login-brand {
  padding: 58px;
  background: #162822;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand h1 {
  font-size: 48px;
  max-width: 460px;
  line-height: 1.1;
  letter-spacing: -1.8px;
  font-weight: 500;
}
.login-brand p {
  color: #a6bcae;
  max-width: 370px;
  line-height: 1.8;
}
.login-decoration {
  height: 210px;
  display: grid;
  place-items: center;
}
.login-decoration svg {
  width: 125px;
  height: 125px;
  stroke: #97bfa5;
  stroke-width: 1;
}
.login-form {
  padding: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 490px;
}
.login-card .brand {
  color: var(--ink);
  margin-bottom: 24px;
}
.login-card .btn.primary {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
}
.login-card h1 {
  font-size: 27px;
}
.login-card .field {
  margin-bottom: 16px;
}
.login-footer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 25px;
}
#toast {
  position: fixed;
  right: 28px;
  bottom: 26px;
  background: #1c3a2b;
  color: white;
  border-radius: 8px;
  padding: 13px 20px;
  box-shadow: 0 8px 25px #0002;
  max-width: 420px;
  z-index: 20;
  font-size: 12px;
  display: none;
}
#toast.show {
  display: block;
}
#toast.error {
  background: #8f3636;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: min(760px, 94vw);
  max-height: 86vh;
  box-shadow: 0 25px 90px #0002;
  color: var(--ink);
}
dialog::backdrop {
  background: #11251870;
  backdrop-filter: blur(3px);
}
dialog pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  background: #f6f8f4;
  padding: 18px;
  border-radius: 7px;
  font-size: 13px;
  max-height: 300px;
  overflow: auto;
}
dialog dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  font-size: 12px;
  gap: 8px;
}
dialog dt {
  color: var(--muted);
}
dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.switch-row {
  display: flex;
  gap: 9px;
  align-items: center;
}
.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
}
.audit-line {
  font-size: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.inline-code {
  background: #edf1eb;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 11px;
  word-break: break-word;
}
.spaced {
  margin-top: 20px;
}
.hidden {
  display: none !important;
}
details summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green);
  margin: 14px 0;
}
details .fields {
  margin-top: 15px;
}
.footer-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 30px;
}
.row-click {
  cursor: pointer;
}
.link-button {
  background: none;
  border: none;
  color: var(--green);
  padding: 0;
  font-size: 12px;
  text-align: left;
}
.help-copy {
  max-width: 820px;
}
.help-copy p,
.help-copy li {
  font-size: 13px;
  color: #56685c;
}
.help-copy li {
  margin-bottom: 10px;
}
.help-copy h2 {
  margin-top: 26px;
}
.version {
  font-size: 10px;
  color: #809c89;
  margin-top: 8px;
}
@media (max-width: 1150px) {
  .layout {
    grid-template-columns: 200px 1fr;
  }
  .sidebar {
    padding: 26px 15px;
  }
  .content {
    padding: 27px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .policy-layout {
    grid-template-columns: 1fr;
  }
  .policy-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 800px) {
  .layout {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 16px 18px;
  }
  .brand {
    font-size: 19px;
  }
  .brand img {
    width: 32px;
  }
  .brand small,
  .sidebar-note {
    display: none;
  }
  .nav {
    flex-direction: row;
    margin-top: 16px;
    overflow: auto;
    gap: 5px;
  }
  .nav a {
    padding: 8px 10px;
    white-space: nowrap;
    font-size: 11px;
    gap: 6px;
  }
  .nav svg {
    width: 14px;
  }
  .topbar {
    height: 58px;
    padding: 0 18px;
  }
  .content {
    padding: 23px 18px;
  }
  .page-head {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat-value {
    font-size: 29px;
  }
  .grid-2,
  .equal-cols,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 20px;
  }
  .login-page {
    display: block;
  }
  .login-brand {
    padding: 25px;
  }
  .login-brand h1,
  .login-brand p,
  .login-decoration,
  .login-brand > small {
    display: none;
  }
  .login-form {
    padding: 30px 22px;
  }
  .status-strip {
    align-items: flex-start;
  }
  .status-strip > .pill {
    display: none;
  }
  .policy-aside {
    display: block;
  }
  .fields {
    gap: 14px;
  }
  .card-head {
    padding: 18px;
  }
  .page-head > .actions .btn {
    padding: 8px 10px;
  }
  .save-bar {
    font-size: 11px;
  }
  .message-preview {
    max-width: 210px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
