:root {
  color-scheme: light;
  --paper: #f6f7f5;
  --surface: #fff;
  --ink: #202d3b;
  --muted: #667585;
  --line: #e4e9ed;
  --accent: #147d70;
  --accent-soft: #e8f5f1;
  --danger: #b93b46;
  --shadow: 0 8px 32px #1e354008;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s;
}
button:hover {
  background: #f0f4f5;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: #066c63;
}
.danger {
  color: var(--danger);
}
.danger.primary {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.quiet {
  border-color: transparent;
  background: transparent;
}
.icon-button {
  font-size: 24px;
  padding: 1px 10px;
  font-weight: 400;
}
.small-button {
  padding: 6px 10px;
  font-size: 12px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #68b9b0;
  outline-offset: 3px;
}
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  padding: 30px 18px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.8px;
  font-weight: 750;
  padding: 0 12px 34px;
}
.brand:hover {
  text-decoration: none;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.5px;
  font-weight: 500;
  margin-top: 1px;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 30px;
  width: 38px;
  height: 40px;
  border-radius: 11px;
  font-weight: 600;
  font-family: Georgia, serif;
  font-style: italic;
}
.nav-label,
.eyebrow {
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 750;
  color: var(--muted);
}
.nav-label {
  padding: 14px 14px 4px;
}
nav .nav-label:first-child {
  padding-top: 0;
}
nav {
  display: grid;
  gap: 5px;
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 7px;
  color: var(--muted);
  font-weight: 550;
}
nav a:hover {
  background: var(--paper);
  text-decoration: none;
}
nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 17px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 30px 12px 0;
  display: grid;
  gap: 13px;
}
.sidebar-bottom button {
  justify-content: flex-start;
  padding: 4px 0;
  color: var(--muted);
}
.back-link {
  font-size: 13px;
  color: var(--muted);
}
.security-note {
  font-size: 10px;
  color: #86929e;
  margin-top: 16px;
}
.topbar {
  height: 74px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #ffffffb3;
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb span {
  padding: 0 14px;
  color: #b2bdc6;
}
.breadcrumb strong {
  font-weight: 550;
  color: var(--ink);
}
.admin-badge {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 5px;
  color: var(--muted);
  background: #fff;
}
main {
  padding: 36px 40px;
  max-width: 1600px;
  margin: auto;
  min-height: calc(100dvh - 126px);
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-heading h1 {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -1px;
  margin: 0 0 5px;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}
.stat-number {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
  margin: 10px 0 4px;
}
.stat-note {
  font-size: 11px;
  color: var(--muted);
}
.grid-two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.configuration-section {
  margin-bottom: 28px;
}
.configuration-section h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.configuration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.configuration-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 136px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.configuration-item:hover {
  border-color: #a8d8ce;
  text-decoration: none;
}
.configuration-name {
  font-weight: 700;
  font-size: 15px;
}
.configuration-description {
  color: var(--muted);
  font-size: 12px;
}
.configuration-detail {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  margin-top: auto;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-header {
  padding: 19px 22px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.card-header h2 {
  font-size: 14px;
  margin: 0;
  font-weight: 650;
}
.card-body {
  padding: 22px;
}
.card-body p:first-child {
  margin-top: 0;
}
.card-body p:last-child {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
}
.toolbar {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.search {
  max-width: 360px;
  width: 100%;
}
input,
select,
textarea {
  border: 1px solid #d8e0e5;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #8a96a1;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--muted);
  background: #fcfcfd;
  font-weight: 650;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 18px 22px;
  border-bottom: 1px solid #eff2f4;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fcfdfd;
}
.cell-title {
  font-weight: 600;
}
.cell-detail {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.routing-summary {
  min-width: 175px;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent);
}
.pill.neutral {
  background: #f0f2f5;
  color: var(--muted);
}
.pill.warning {
  background: #fff1df;
  color: #95631c;
}
.pill.error {
  background: #fcecef;
  color: var(--danger);
}
.meter {
  width: 120px;
  height: 4px;
  overflow: hidden;
  background: #edf1f3;
  border-radius: 4px;
  margin: 7px 0;
}
.meter span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
}
.empty {
  padding: 55px 25px;
  text-align: center;
}
.empty h2 {
  font-size: 18px;
  margin: 0 0 8px;
}
.empty p {
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 20px;
}
.empty-icon {
  font-size: 27px;
  color: var(--accent);
  margin-bottom: 14px;
}
.loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}
#notice {
  padding: 12px 16px;
  background: var(--accent-soft);
  color: #05685f;
  border-radius: 7px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
}
#notice.error {
  background: #fff0f1;
  color: var(--danger);
}
.setup-item {
  display: flex;
  gap: 14px;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
}
.setup-item:last-child {
  border: 0;
}
.step-number {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}
.setup-item h3 {
  font-size: 13px;
  margin: 0 0 4px;
}
.setup-item p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.setup-item a {
  margin-left: auto;
  align-self: center;
  font-size: 12px;
  white-space: nowrap;
}
.activity {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
}
.activity:last-child {
  border: 0;
}
.activity p {
  margin: 0;
  font-size: 12px;
}
.activity small {
  font-size: 10px;
  color: var(--muted);
}
footer {
  padding: 12px 40px 22px;
  color: #8b97a2;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
}
dialog {
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 13px;
  width: min(560px, calc(100vw - 30px));
  max-height: 90dvh;
  box-shadow: 0 24px 80px #132b4430;
  color: var(--ink);
}
dialog::backdrop {
  background: #142d4255;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 26px 18px;
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 6px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.5px;
}
.dialog-heading button {
  align-self: flex-start;
}
.dialog-actions {
  padding: 18px 26px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
}
#dialog-body {
  padding: 24px 26px;
  display: grid;
  gap: 18px;
}
label.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
label.field small {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
textarea {
  resize: vertical;
  min-height: 110px;
}
label.checkbox {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-weight: 400;
}
label.checkbox input {
  margin-top: 4px;
  accent-color: var(--accent);
}
.helper {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}
.form-error {
  color: var(--danger);
  background: #fff0f1;
  padding: 12px;
  margin: 0 26px 20px;
  border-radius: 6px;
  font-size: 12px;
}
.warning-box {
  background: #fff6e8;
  color: #825c23;
  padding: 14px;
  border-radius: 7px;
  font-size: 12px;
}
.targets {
  max-height: 200px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  display: grid;
  gap: 10px;
}
.code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.skip {
  position: fixed;
  left: 15px;
  top: -50px;
  background: white;
  padding: 10px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  main {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .configuration-grid {
    grid-template-columns: 1fr;
  }
  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  td,
  th {
    padding: 15px;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    overflow-y: visible;
    padding: 15px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0 3px 15px;
    font-size: 21px;
  }
  .brand small {
    display: inline;
    margin-left: 8px;
  }
  .brand-mark {
    width: 31px;
    height: 33px;
  }
  .nav-label,
  .security-note {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  nav a {
    padding: 8px 11px;
    white-space: nowrap;
    font-size: 12px;
  }
  .nav-icon {
    display: none;
  }
  .sidebar-bottom {
    padding: 14px 3px 0;
    display: flex;
    justify-content: space-between;
  }
  .topbar {
    height: 50px;
    padding: 0 20px;
  }
  main {
    padding: 25px 18px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .stat-number {
    font-size: 25px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar input {
    max-width: none;
  }
  .toolbar select {
    flex: 1;
  }
  .admin-badge {
    font-size: 10px;
  }
  footer {
    padding: 10px 18px;
  }
  .row-actions {
    flex-wrap: wrap;
  }
  .dialog-heading,
  #dialog-body,
  .dialog-actions {
    padding: 20px;
  }
  .breadcrumb {
    font-size: 11px;
  }
  .code {
    max-width: 210px;
  }
  .setup-item {
    padding: 16px;
  }
  .setup-item a {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.empty a.primary {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 7px;
  text-decoration: none;
}
.empty a.primary:hover {
  background: #066c63;
}

.mail-operation{padding:18px 24px;border-top:1px solid var(--line);overflow-wrap:anywhere}.mail-operation h3{margin:0 0 6px}.mail-operation p{margin:6px 0}.mail-operation button{margin-top:10px}
