:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #243b44;
  background: #f5f7fa;
  font-size: 14px;
  line-height: 1.6;
  --primary: #147d70;
  --border: #e5eaf0;
  --muted: #7b8794;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #83cbbd;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
  line-height: 1.35;
  margin-bottom: 8px;
}
h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
h3 {
  font-size: 15px;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #81969e;
  margin-bottom: 8px;
}
.primary,
.secondary {
  border-radius: 7px;
  padding: 9px 16px;
  font-weight: 600;
}
.primary {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}
.primary:hover {
  background: #096659;
}
.secondary {
  background: #fff;
  border: 1px solid #dce3e9;
  color: #435963;
}
.secondary:hover {
  background: #edf6f3;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 5px 8px;
  font-weight: 600;
}
.text-button:hover {
  background: #edf6f3;
  border-radius: 5px;
}
.icon-button {
  background: #f3f5f7;
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  width: 36px;
  height: 36px;
  color: #536773;
  line-height: 1;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #36b99d;
  color: #fff;
  font-weight: 700;
  font-size: 23px;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}
.login-intro {
  background: #122e37;
  padding: 12vh 12%;
  color: #d8e9e8;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background-image: radial-gradient(
    ellipse at 100% 90%,
    #18534e,
    transparent 70%
  );
}
.login-intro .brand-mark {
  margin-bottom: 50px;
  width: 52px;
  height: 52px;
  font-size: 30px;
}
.login-intro h1 {
  font-size: clamp(34px, 4vw, 55px);
  line-height: 1.4;
  letter-spacing: 1px;
  color: #fff;
  margin: 20px 0;
}
.login-intro p {
  line-height: 2;
  color: #b0c8cd;
}
.intro-foot {
  margin-top: auto;
  padding-top: 65px;
  font-size: 12px;
  letter-spacing: 3px;
  color: #95b2b9;
}
.login-card {
  width: calc(100% - 70px);
  max-width: 400px;
  align-self: center;
  justify-self: center;
  padding: 40px 0;
}
.login-card h2 {
  font-size: 28px;
  margin: 20px 0 8px;
}
.login-card .muted {
  margin-bottom: 32px;
}
.tag {
  font-size: 11px;
  background: #e8f5f0;
  color: #147d70;
  padding: 5px 10px;
  border-radius: 5px;
}
.login-card button {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
}
.login-note {
  font-size: 12px;
  color: #8b969d;
  margin: 20px 0;
}
.login-card label {
  margin-bottom: 20px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #657681;
  font-weight: 600;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #dce3e8;
  background: white;
  color: #243b44;
  border-radius: 7px;
  padding: 10px 12px;
  min-height: 41px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 2px solid #cce9e1;
}
input::placeholder,
textarea::placeholder {
  color: #9ba6ad;
  font-weight: 400;
}
.error {
  color: #b3423d;
  min-height: 20px;
  white-space: pre-wrap;
}
.workspace {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 224px;
  flex-shrink: 0;
  background: #132e38;
  color: #b7c8cf;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 28px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 27px;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: #8eaab4;
  letter-spacing: 2px;
  font-weight: 400;
}
.nav-label {
  text-transform: uppercase;
  font-size: 10px;
  color: #7996a2;
  letter-spacing: 1.5px;
  padding: 16px 15px 8px;
  margin: 0;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 7px;
  margin: 4px 0;
  font-size: 13px;
}
.nav-item:hover {
  background: #1b3c47;
  color: white;
}
.nav-item.selected {
  background: #23574f;
  color: #c8f6e5;
  box-shadow: inset 3px 0 #49c2a1;
}
.nav-icon {
  font-size: 20px;
  width: 23px;
  text-align: center;
  line-height: 1;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 10px;
  padding: 30px 10px 0;
  color: #93aab4;
}
.sidebar-bottom small {
  display: block;
  font-size: 10px;
  padding: 9px 0 0 13px;
  color: #678590;
}
.live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #3cbd9d;
  border-radius: 50%;
  margin-right: 8px;
}
.main-shell {
  margin-left: 224px;
  min-width: 0;
  width: calc(100% - 224px);
}
.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  font-size: 12px;
}
.breadcrumb {
  color: #88949c;
}
.breadcrumb span {
  margin-left: 12px;
}
.breadcrumb span:last-child {
  color: #354c57;
}
.account {
  display: flex;
  align-items: center;
  gap: 20px;
}
.account .text-button {
  color: #80909a;
  font-size: 12px;
}
main {
  max-width: 1700px;
  margin: auto;
  padding: 32px 36px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}
.page-heading .muted {
  margin: 0;
  font-size: 13px;
}
.page-heading > .secondary {
  font-size: 12px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 28px;
}
.metric {
  padding: 22px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}
.metric > span {
  font-size: 12px;
}
.metric strong {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.5px;
  margin: 8px 0 6px;
  line-height: 1.3;
}
.metric small {
  font-size: 10px;
  color: #98a4ab;
}
.section-heading,
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.section-heading h2 {
  font-size: 16px;
  margin: 0;
}
.section-heading {
  margin: 24px 0 16px;
}
.section-heading .text-button,
.panel-heading .text-button {
  font-size: 12px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.panel-heading {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}
.panel-heading h2 {
  font-size: 15px;
  margin: 0;
}
.configuration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}
.config-card {
  padding: 20px;
}
.config-card h3 {
  margin-bottom: 8px;
}
.config-card .badge {
  margin: 5px 0 13px;
}
.config-card p {
  font-size: 12px;
  margin-bottom: 10px;
}
.config-card p:last-child {
  margin-bottom: 0;
  font-size: 11px;
}
.notice {
  border: 1px solid #dce9e6;
  background: #eef7f3;
  border-radius: 7px;
  padding: 12px 16px;
  font-size: 12px;
  color: #4d776e;
  margin: 18px 0;
  white-space: pre-wrap;
}
.error-notice {
  background: #fff0ec;
  border-color: #f0d1c7;
  color: #a14135;
}
.filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px;
  border-bottom: 1px solid var(--border);
}
.filters input,
.filters select {
  font-size: 12px;
  min-height: 38px;
  padding: 8px 9px;
}
.filters .search-field {
  min-width: 180px;
  flex: 1;
}
.filters label {
  font-size: 11px;
  max-width: 100%;
}
.filters button {
  font-size: 12px;
  min-height: 38px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  min-width: 100%;
  text-align: left;
  font-size: 12px;
}
th {
  background: #f9fafc;
  color: #829099;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
td,
th {
  padding: 16px 20px;
  border-bottom: 1px solid #edf0f3;
}
td {
  max-width: 280px;
  min-width: 90px;
  word-break: break-word;
  color: #4b606b;
}
td > span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
td:first-child {
  font-variant-numeric: tabular-nums;
}
td.row-actions {
  white-space: nowrap;
  min-width: 120px;
}
td.row-actions button {
  font-size: 11px;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcfc;
}
.badge,
td > .badge {
  display: inline-block;
  font-size: 10px;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 5px;
}
.badge.success {
  background: #e7f4ee;
  color: #26816a;
}
.badge.danger {
  background: #fcecea;
  color: #b4554e;
}
.badge.warning {
  background: #fff4de;
  color: #a7832d;
}
.badge.neutral {
  background: #eef1f5;
  color: #81909c;
}
.pagination {
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  font-size: 12px;
}
.pagination > span {
  margin-right: auto;
}
.pagination button {
  font-size: 11px;
  padding: 6px 12px;
}
progress {
  display: block;
  height: 5px;
  width: 130px;
  accent-color: #27927c;
  margin-top: 8px;
}
.empty {
  padding: 60px 20px;
  text-align: center;
  color: #98a4ad;
  font-size: 13px;
}
.loading {
  padding: 70px;
  text-align: center;
  color: #81939b;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  color: #9ba7b0;
  font-size: 10px;
  padding-top: 28px;
}
.detail-dialog,
.status-dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 80px #142f3830;
  padding: 28px;
  color: #243b44;
  max-height: 90vh;
}
.detail-dialog {
  width: 850px;
  max-width: 94vw;
}
.status-dialog {
  width: 440px;
  max-width: 94vw;
}
.detail-dialog::backdrop,
.status-dialog::backdrop {
  background: #10253088;
}
.detail-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.detail-dialog h2 {
  margin: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  font-size: 13px;
  margin: 0 0 24px;
}
.detail-grid dt {
  padding: 11px;
  color: #83929c;
  background: #f8fafb;
  border-bottom: 1px solid #e9eef1;
}
.detail-grid dd {
  margin: 0;
  padding: 11px 15px;
  word-break: break-word;
  white-space: pre-wrap;
  border-bottom: 1px solid #e9eef1;
}
.detail-dialog h3 {
  margin: 26px 0 14px;
}
.detail-dialog td {
  max-width: 240px;
}
.status-dialog label {
  margin: 18px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.pre-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
@media (min-width: 1600px) {
  main {
    padding: 40px 48px;
  }
  .metrics {
    gap: 22px;
  }
  .metric {
    padding: 26px;
  }
  .configuration-grid {
    gap: 22px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 190px;
    padding: 24px 12px;
  }
  .main-shell {
    margin-left: 190px;
    width: calc(100% - 190px);
  }
  main {
    padding: 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .metrics,
  .configuration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .brand {
    font-size: 17px;
  }
  .nav-item {
    padding: 11px 12px;
  }
  .filters label {
    flex: 1;
  }
  .filters input[type="date"] {
    min-width: 125px;
  }
}
@media (max-width: 700px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    padding: 14px;
  }
  .brand {
    padding: 0 4px 10px;
  }
  .brand small {
    display: none;
  }
  .sidebar > .nav-label,
  .sidebar-bottom,
  .sidebar nav > .nav-label {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
  }
  .nav-item {
    flex-shrink: 0;
    font-size: 12px;
    padding: 8px 12px;
    margin: 0;
  }
  .nav-icon {
    display: none;
  }
  .main-shell {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 55px;
    padding: 0 16px;
  }
  .account {
    gap: 8px;
  }
  main {
    padding: 22px 14px;
  }
  h1 {
    font-size: 23px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 8px;
  }
  .page-heading > .secondary {
    padding: 7px 10px;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .metric {
    padding: 16px;
  }
  .metrics,
  .configuration-grid {
    gap: 10px;
  }
  .metric strong {
    font-size: 27px;
  }
  .config-card {
    padding: 15px;
  }
  .filters {
    padding: 15px;
    gap: 10px;
  }
  .filters .search-field {
    min-width: 100%;
    flex-basis: 100%;
  }
  .filters label {
    min-width: calc(50% - 10px);
  }
  .pagination {
    padding: 14px 10px;
    gap: 8px;
  }
  .pagination button {
    padding: 5px 7px;
  }
  .page-footer {
    gap: 10px;
  }
  .detail-dialog,
  .status-dialog {
    padding: 18px;
  }
  .detail-grid {
    grid-template-columns: 95px minmax(0, 1fr);
  }
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-intro {
    display: none;
  }
  .login-card {
    padding: 30px 0;
  }
  .loading {
    padding: 50px 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
.legal-page {
  max-width: 880px;
  margin: 36px auto;
  background: white;
  border-radius: 12px;
  padding: 30px;
  line-height: 1.9;
}
.legal-page h1 {
  margin: 28px 0;
}
#detail-content form label {
  margin-bottom: 18px;
}
