:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #192b3b;
  background: #f5f7fa;
  font-size: 14px;
  --navy: #112b40;
  --teal: #087b6d;
  --muted: #647789;
  --border: #e3e9ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 42px;
  border: 1px solid #d8e1e7;
  border-radius: 7px;
  padding: 9px 16px;
  color: #223d50;
  background: white;
  text-decoration: none;
  transition: background 0.15s;
}
button:hover,
.button:hover {
  background: #edf3f6;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.primary {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.primary:hover {
  background: #08675d;
}
input,
select {
  width: 100%;
  padding: 11px;
  border: 1px solid #ccd7df;
  border-radius: 6px;
  min-height: 44px;
  background: #fff;
  color: #1b3345;
}
input:focus,
select:focus {
  outline: 2px solid #269b8c;
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #28a594;
  outline-offset: 2px;
}
label {
  display: block;
  font-weight: 550;
  font-size: 13px;
  margin: 18px 0 10px;
}
label input,
label select {
  margin-top: 8px;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.6px;
  margin-bottom: 10px;
}
h2 {
  font-size: 18px;
  margin-bottom: 12px;
}
h3 {
  font-size: 14px;
  margin-bottom: 6px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 650;
  color: #668391;
  margin-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: 2px;
  font-weight: 650;
  font-size: 17px;
}
.brand b {
  display: grid;
  place-items: center;
  border: 1px solid #689282;
  border-radius: 9px;
  height: 34px;
  width: 34px;
  color: #80d4b9;
  font-size: 22px;
}
.brand span {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 1.8px;
  align-self: end;
  margin-bottom: 5px;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-story {
  background: var(--navy);
  color: white;
  padding: 56px 12%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.login-story h1 {
  font-size: 40px;
  line-height: 1.55;
  font-weight: 500;
}
.login-story p:not(.eyebrow) {
  color: #aac0cf;
  line-height: 2;
}
.login-story small {
  color: #a1b5c3;
}
.login-card {
  align-self: center;
  width: min(380px, 80%);
  justify-self: center;
}
.login-card .primary {
  width: 100%;
  margin-top: 24px;
  justify-content: space-between;
}
.sidebar {
  width: 246px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--navy);
  color: white;
  padding: 34px 24px;
  display: flex;
  flex-direction: column;
}
.sidebar .brand {
  font-size: 15px;
}
.nav-caption {
  font-size: 11px;
  color: #97aebb;
  margin: 44px 12px 16px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav button {
  justify-content: space-between;
  background: none;
  border: 0;
  color: #b7c8d5;
  border-radius: 6px;
  min-height: 48px;
  text-align: left;
}
.sidebar nav button.active {
  color: #fff;
  background: #214356;
  border-left: 3px solid #78cab2;
}
.sidebar nav button span {
  font-size: 10px;
  color: #92adbd;
}
.sidebar-bottom {
  margin-top: auto;
  color: #a8bfce;
  font-size: 12px;
}
.sidebar-bottom button {
  background: none;
  border: 0;
  color: #b7c8d5;
  padding: 6px;
  font-size: 12px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #74cbaa;
  border-radius: 50%;
  margin-right: 7px;
}
main {
  margin-left: 246px;
  padding: 0 40px 40px;
  max-width: 1900px;
}
.topbar {
  height: 76px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.topbar b {
  font-weight: 500;
  color: #213d4f;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 38px 0 24px;
}
.page-heading p:last-child {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.stats article {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.stats article > span {
  color: #63778a;
  font-size: 13px;
}
.stats strong {
  display: block;
  font-size: 35px;
  font-weight: 600;
  margin: 17px 0 8px;
  letter-spacing: -1px;
}
.stats small {
  font-size: 11px;
  color: #7a8c99;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  margin-bottom: 22px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.card-head h2,
.card-head p {
  margin-bottom: 0;
}
.tag {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #7b919e;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
}
.source-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #edf1f4;
  padding: 20px 0;
  gap: 14px;
}
.source-row p {
  font-size: 12px;
  margin: 0;
}
.badge {
  font-size: 11px;
  background: #edf4f1;
  color: #2a7563;
  padding: 6px 9px;
  border-radius: 5px;
  white-space: nowrap;
}
.badge.warning {
  background: #fff2df;
  color: #946315;
}
.note {
  padding: 15px;
  background: #f5f8fa;
  color: #607585;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.8;
}
.accent-card {
  background: #eaf3ef;
  border-color: #d8e8df;
}
.accent-card h2 {
  font-size: 23px;
  margin-top: 30px;
}
.accent-card p:not(.eyebrow) {
  color: #536f66;
  line-height: 1.9;
}
.accent-card button {
  margin-top: 8px;
  border-color: #b9d1c4;
  background: transparent;
}
.steps {
  display: flex;
  gap: 18px;
  border-top: 1px solid #cfdfd6;
  margin-top: 32px;
  padding-top: 20px;
  font-size: 11px;
  color: #58776b;
}
.table-wrap {
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
th {
  background: #f7f9fb;
  color: #758795;
  font-weight: 500;
  padding: 13px 12px;
  white-space: nowrap;
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid #edf1f4;
  color: #365062;
  max-width: 350px;
  overflow-wrap: anywhere;
}
td button {
  font-size: 11px;
  min-height: 32px;
  padding: 5px 9px;
  margin: 2px;
}
.search-label {
  max-width: 320px;
  color: #6c8190;
  font-size: 11px;
}
.search-label input {
  font-size: 13px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}
dialog {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: min(480px, 92vw);
  max-height: 90vh;
  box-shadow: 0 20px 90px #1235;
}
dialog::backdrop {
  background: #102e4566;
}
dialog form > .primary {
  width: 100%;
  margin-top: 14px;
}
.form-error,
#login-error {
  color: #a52d35;
  line-height: 1.5;
}
#notice {
  padding: 12px 16px;
  background: #fff1db;
  border: 1px solid #ead6b0;
  border-radius: 6px;
  margin-bottom: 20px;
  line-height: 1.6;
}
ol {
  padding-left: 22px;
  line-height: 2.5;
}
#pair-list {
  margin-top: 20px;
}
#pair-list p {
  font-size: 12px;
}
#pair-list button {
  font-size: 11px;
  min-height: 30px;
  padding: 4px 8px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  main {
    padding: 0 24px 30px;
    margin-left: 215px;
  }
  .sidebar {
    width: 215px;
    padding: 30px 18px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 240px;
    padding: 26px;
  }
  .login-story h1 {
    font-size: 25px;
  }
  .login-story > div:nth-child(2) {
    margin-top: 26px;
  }
  .login-story small,
  .login-story > div:nth-child(2) > p:last-child {
    display: none;
  }
  .login-card {
    padding: 32px 0;
  }
  .sidebar {
    position: static;
    width: auto;
    padding: 18px;
  }
  .sidebar nav {
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin-top: 18px;
  }
  .sidebar nav button {
    font-size: 11px;
    padding: 7px;
    justify-content: center;
  }
  .sidebar nav span,
  .nav-caption,
  .sidebar-bottom {
    display: none;
  }
  main {
    margin: 0;
    padding: 0 16px 25px;
  }
  .topbar {
    height: 56px;
    font-size: 11px;
  }
  .page-heading {
    padding: 26px 0;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .card {
    padding: 18px;
  }
  .stats {
    gap: 10px;
  }
  .stats article {
    padding: 18px;
  }
  .stats strong {
    font-size: 28px;
  }
  .stats small {
    font-size: 10px;
  }
  .card-head {
    align-items: flex-start;
  }
  .tag {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.operations-panel .toolbar{display:flex;gap:16px;flex-wrap:wrap}
.operations-panel .toolbar>label{flex:1;min-width:140px}
.operations-panel .columns{display:grid;grid-template-columns:1.25fr 1fr;gap:22px}
.operations-panel textarea{box-sizing:border-box;width:100%;min-height:130px;resize:vertical;border:1px solid #cedbe3;border-radius:6px;padding:12px;font:inherit;color:inherit;background:white}
.operations-panel .record{padding:15px 0;border-bottom:1px solid #e5ebee}
.operations-panel .table-scroll{overflow:auto}
.operations-panel table{min-width:570px}
.operations-panel .card{margin-bottom:22px}
@media(max-width:800px){.operations-panel .columns{grid-template-columns:1fr}.sidebar nav{grid-template-columns:repeat(3,1fr)}}
