:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #182a43;
  background: #f3f5f8;
  font-size: 16px;
  line-height: 1.5;
  --ink: #101d31;
  --accent: #087962;
  --border: #dee5ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid #13ad86;
}
button {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.875rem;
  min-height: 40px;
  transition: background 0.15s;
}
button:hover {
  background: #f0f5f6;
}
.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.primary:hover {
  background: #075e4e;
}
.danger {
  color: #b42c36;
  background: #fff4f4;
  border-color: #f0c9cc;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--ink);
  color: #b8c8dd;
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font-size: 1.6rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  color: white;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 34px;
  height: 38px;
  background: #31d3a7;
  color: var(--ink);
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 1.3rem;
}
.brand-sub {
  font-size: 0.75rem;
  color: #8fa5bf;
  margin: 5px 0 35px 60px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.nav-label {
  font-size: 0.75rem;
  color: #6f89a8;
  padding: 0 14px;
  margin: 25px 0 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar button {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: transparent;
  border: none;
  color: #b8c8dd;
  padding: 12px 14px;
  margin: 2px 0;
}
.sidebar button.active {
  background: #233950;
  color: white;
  box-shadow: inset 3px 0 #31d3a7;
}
.sidebar button:hover {
  background: #233950;
}
.nav-icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid #314056;
  padding: 20px 12px 0;
  font-size: 0.875rem;
}
.sidebar-footer strong {
  display: block;
  color: white;
  overflow-wrap: anywhere;
}
.role {
  color: #31d3a7;
  font-size: 0.75rem;
}
.main {
  min-width: 0;
}
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 38px;
  gap: 20px;
}
.topbar .crumb {
  font-size: 0.875rem;
  color: #6c7e95;
}
.topbar .crumb b {
  color: #233950;
}
.top-right {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 0.875rem;
}
.avatar {
  width: 36px;
  height: 36px;
  background: #e8f4ef;
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.content {
  padding: 32px 38px;
  max-width: 1700px;
  margin: auto;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}
.heading h1 {
  font-size: 1.85rem;
  line-height: 1.2;
  margin: 0 0 7px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.muted {
  color: #6c7e95;
  font-size: 0.875rem;
}
h2 {
  font-size: 1.1rem;
  margin: 0;
}
h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}
p {
  margin: 8px 0 16px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border: 1px solid #bee0d2;
  background: #eaf7f1;
  border-radius: 10px;
  margin-bottom: 24px;
}
.notice.warning {
  border-color: #e8d9af;
  background: #fff9e9;
}
.notice strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.9375rem;
}
.notice p {
  font-size: 0.875rem;
  margin: 0;
  color: #526981;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6c7e95;
  font-size: 0.875rem;
}
.stat strong {
  font-size: 2rem;
  display: block;
  margin: 10px 0 5px;
  line-height: 1.2;
  letter-spacing: -0.04em;
}
.stat small {
  color: #6c7e95;
  font-size: 0.8125rem;
}
.cards {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.panel-body {
  padding: 22px 24px;
}
.steps {
  display: grid;
  gap: 0;
}
.step {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid #eef1f5;
}
.step:last-child {
  border: 0;
}
.step-num {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #637990;
}
.step.complete .step-num {
  background: #def4ea;
  border-color: #def4ea;
  color: var(--accent);
}
.step p {
  margin: 4px 0 10px;
  font-size: 0.875rem;
  color: #637990;
}
.empty {
  padding: 54px 24px;
  text-align: center;
  color: #6c7e95;
}
.empty-icon {
  margin: auto auto 15px;
  background: #f0f4f8;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  font-size: 1.5rem;
  color: #8ca2b8;
}
.empty h3 {
  color: #233950;
}
.empty p {
  max-width: 420px;
  margin: 8px auto 20px;
  font-size: 0.875rem;
}
.toolbar {
  display: flex;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
  max-width: 420px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 0.875rem;
}
th {
  background: #f8fafc;
  color: #637990;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 13px 22px;
  font-weight: 650;
}
td {
  padding: 16px 22px;
  border-top: 1px solid #edf1f5;
  vertical-align: middle;
}
td strong {
  display: block;
  color: #233950;
}
td small {
  color: #71849b;
}
.link {
  color: var(--accent);
  border: 0;
  padding: 0;
  background: none;
  font-weight: 650;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  background: #eef2f7;
  color: #647890;
}
.badge.green {
  background: #e6f6ed;
  color: #15734e;
}
.badge.orange {
  background: #fff1dc;
  color: #9c6513;
}
.badge.red {
  background: #feeaed;
  color: #b02c3a;
}
.tag {
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: #60738c;
  padding: 3px 7px;
  border-radius: 5px;
}
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.policy-card {
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.policy-card h3 {
  font-size: 1.05rem;
}
.policy-card .actions {
  margin-top: 20px;
}
.policy-card .muted {
  margin-top: 12px;
}
.policy-card ul {
  padding-left: 18px;
  margin: 16px 0;
  color: #506980;
  font-size: 0.875rem;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-info {
  background: var(--ink);
  color: #b8c8dd;
  padding: 65px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-info .brand {
  padding: 0;
}
.login-info h1 {
  font-size: 2.7rem;
  line-height: 1.15;
  color: white;
  letter-spacing: -0.05em;
  max-width: 430px;
}
.login-info p {
  max-width: 420px;
  line-height: 1.8;
}
.login-info .login-small {
  font-size: 0.8125rem;
  color: #8199b5;
}
.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 35px;
}
.login-form form {
  width: 100%;
  max-width: 380px;
}
.login-form h2 {
  font-size: 1.65rem;
  margin-bottom: 8px;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.field label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #30445c;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #cbd6e2;
  border-radius: 7px;
  background: white;
  padding: 10px 12px;
  color: #233950;
  font-size: 0.9375rem;
  min-height: 42px;
}
textarea {
  min-height: 88px;
  resize: vertical;
}
.full {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.span2 {
  grid-column: span 2;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.875rem;
  padding: 8px 0;
}
.check input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0;
}
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.section-label {
  color: #637990;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin: 22px 0 12px;
}
.error {
  background: #feeaed;
  color: #a02635;
  padding: 12px;
  border-radius: 7px;
  font-size: 0.875rem;
  margin: 12px 0;
}
.hidden {
  display: none !important;
}
dialog {
  border: none;
  border-radius: 14px;
  width: 650px;
  max-width: calc(100% - 28px);
  max-height: 90vh;
  padding: 0;
  box-shadow: 0 25px 100px #101d3140;
}
dialog::backdrop {
  background: #0c1628a0;
  backdrop-filter: blur(3px);
}
.modal-head {
  padding: 22px 25px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h2 {
  font-size: 1.2rem;
}
.modal-body {
  padding: 24px 25px;
  overflow: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 25px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}
.qr {
  width: 100%;
  max-width: 380px;
  display: block;
  margin: auto;
}
.qr-instructions {
  padding-left: 22px;
  color: #4b627c;
  font-size: 0.9375rem;
}
.qr-instructions li {
  margin: 12px 0;
}
.details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.detail-label {
  color: #71849b;
  font-size: 0.8125rem;
}
.detail-value {
  font-size: 0.9375rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.device-head {
  display: flex;
  gap: 16px;
  align-items: center;
}
.phone-icon {
  background: #eaf7f1;
  color: var(--accent);
  border: 1px solid #d1ecdf;
  border-radius: 12px;
  width: 50px;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}
#toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  max-width: 420px;
  border-radius: 9px;
  padding: 14px 20px;
  background: #101d31;
  color: white;
  box-shadow: 0 8px 40px #101d3133;
  transform: translateY(120px);
  transition: transform 0.2s;
  z-index: 100;
}
#toast.show {
  transform: translateY(0);
}
.loading {
  padding: 50px;
  text-align: center;
  color: #60738c;
}
.footer-note {
  font-size: 0.8125rem;
  color: #7a8ca3;
  margin: 22px 0;
}
.code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.8125rem;
  background: #f2f5f8;
  border-radius: 6px;
  padding: 10px;
  overflow-wrap: anywhere;
}
.timeline {
  display: grid;
  gap: 15px;
}
.timeline-item {
  padding-left: 16px;
  border-left: 2px solid #dce5ef;
}
.timeline-item strong {
  font-size: 0.875rem;
}
.timeline-item .muted {
  font-size: 0.8125rem;
}
.mobile-nav {
  display: none;
}
@media (max-width: 1050px) {
  .shell {
    grid-template-columns: 200px 1fr;
  }
  .sidebar {
    padding: 24px 10px;
  }
  .content {
    padding: 26px;
  }
  .topbar {
    padding: 0 26px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .details {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: relative;
    padding: 16px;
    display: block;
  }
  .brand-sub,
  .nav-label,
  .sidebar-footer {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    margin-top: 14px;
    gap: 4px;
  }
  .sidebar nav button {
    width: auto;
    flex-shrink: 0;
    font-size: 0.8125rem;
    padding: 9px;
  }
  .nav-icon {
    display: none;
  }
  .topbar {
    height: 60px;
    padding: 0 18px;
  }
  .top-right .muted {
    display: none;
  }
  .content {
    padding: 23px 16px;
  }
  .heading {
    flex-direction: column;
    margin-bottom: 20px;
  }
  .heading h1 {
    font-size: 1.6rem;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 1.7rem;
  }
  .panel-head,
  .panel-body {
    padding: 18px;
  }
  .login {
    display: block;
  }
  .login-info {
    padding: 26px;
  }
  .login-info h1,
  .login-info p,
  .login-small {
    display: none;
  }
  .login-form {
    padding: 45px 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .details {
    grid-template-columns: 1fr 1fr;
  }
  .notice {
    padding: 16px;
  }
  .policy-grid {
    grid-template-columns: 1fr;
  }
  .topbar .crumb {
    font-size: 0.8125rem;
  }
}

.toolbar select {
  width: auto;
  min-width: 180px;
}
