﻿:root {
  color-scheme: light;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: #172033;
  background: #f5f7fb;
}

body {
  margin: 0;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px;
}

.narrow-page {
  max-width: 560px;
}

.wide-page {
  max-width: 1280px;
}

.card {
  background: #fff;
  border: 1px solid #dfe4ef;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(36, 52, 88, 0.08);
  padding: 20px;
  margin-bottom: 18px;
}

.header-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.header-actions {
  white-space: nowrap;
}

h1 {
  margin: 0 0 10px;
  font-size: 26px;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

p {
  line-height: 1.7;
}

label {
  display: block;
  font-weight: 700;
  margin: 14px 0 8px;
}

.inline-label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  font-weight: 400;
}

input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cdd5e5;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
}

input[type="checkbox"] {
  width: auto;
}

button,
.button-link {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  background: #2457ff;
  color: white;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 14px 10px 0 0;
  text-decoration: none;
  font-size: 14px;
}

button.secondary,
.secondary-link {
  background: #1c263a;
}

button.danger {
  background: #c03535;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.small-button {
  padding: 8px 10px;
  margin: 0 6px 0 0;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #111827;
  color: #e5e7eb;
  padding: 14px;
  border-radius: 10px;
  min-height: 80px;
}

.empty-pre {
  min-height: 40px;
}

.generated-empty {
  border: 1px dashed #cdd5e5;
  border-radius: 10px;
  color: #69758d;
  padding: 14px;
}

.generated-codes {
  border: 1px solid #b8c8ff;
  background: #f5f8ff;
  border-radius: 12px;
  padding: 14px;
}

.generated-codes__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.generated-code-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(160px, auto);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.generated-code-input {
  border-color: #2457ff;
  background: #fff;
  color: #0b1a42;
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
}

.muted {
  color: #69758d;
}

.ok {
  color: #0f8f55;
  font-weight: 700;
}

.warn {
  color: #b35b00;
  font-weight: 700;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-actions {
  grid-column: 1 / -1;
}

.export-block-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.export-option-checkbox {
  border: 1px solid #dfe4ef;
  border-radius: 999px;
  padding: 8px 12px;
  background: #f8faff;
}

.table-wrap {
  overflow-x: auto;
}

.pager {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pager .small-button {
  margin: 0;
}

.pager-text {
  color: #69758d;
  font-size: 13px;
  font-weight: 700;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.search-form button {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e5eaf3;
  padding: 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8faff;
  font-size: 13px;
}

.table-input {
  min-width: 180px;
  padding: 8px;
  border-radius: 8px;
}

.small-input {
  min-width: 70px;
  width: 80px;
}

.table-hint {
  color: #8a96aa;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.key-code-cell {
  min-width: 220px;
}

.key-code-box {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.full-key-code {
  display: block;
  color: #0b1a42;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 800;
  word-break: break-all;
}

.link-cell {
  min-width: 360px;
  max-width: 520px;
}

.submitted-link-summary {
  max-width: 440px;
}

.link-card {
  border: 1px solid #e5eaf3;
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
  background: #fbfcff;
}

.link-card__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}

.key-mini {
  font-family: Consolas, "Courier New", monospace;
  font-weight: 800;
  word-break: break-all;
}

.submitted-link-url {
  color: #172033;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.one-line {
  max-width: 430px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.empty-list {
  border: 1px dashed #cdd5e5;
  border-radius: 10px;
  padding: 14px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.42);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  width: min(920px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.28);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid #e5eaf3;
}

.modal-header h2 {
  margin-bottom: 6px;
}

.modal-header .small-button {
  align-self: flex-start;
  margin: 0;
}

.modal-body {
  padding: 10px 18px 18px;
  overflow: auto;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  background: #eef3ff;
  color: #2457ff;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 12px;
}

.session-status-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.session-ok {
  background: #e9f8f1;
  color: #0f8f55;
}

.session-warn {
  background: #fff4df;
  color: #b35b00;
}

.nowrap {
  white-space: nowrap;
}

code {
  background: #eef1f7;
  border-radius: 6px;
  padding: 2px 5px;
}

@media (max-width: 860px) {
  .header-card {
    display: block;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .generated-code-row {
    grid-template-columns: 1fr;
  }

  .search-form,
  .export-block-groups,
  .key-code-box {
    grid-template-columns: 1fr;
  }

  .pager {
    justify-content: stretch;
  }

  .pager .small-button,
  .pager-text {
    width: 100%;
    text-align: center;
  }

  .responsive-table-wrap {
    overflow: visible;
  }

  .responsive-table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    border: 1px solid #e5eaf3;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    background: #fff;
  }

  .responsive-table td {
    border-bottom: 0;
    padding: 8px 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    display: block;
    color: #69758d;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 4px;
  }

  .table-input,
  .small-input,
  .key-code-cell,
  .link-cell {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .one-line {
    max-width: 100%;
    white-space: normal;
  }

  .modal-mask {
    padding: 10px;
    align-items: stretch;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
  }

  .modal-header {
    display: block;
  }

  .modal-header .small-button {
    width: 100%;
    margin-top: 10px;
  }
}

/* 在线导图前台 */
.access-page {
  padding-top: 24px;
}

.access-card {
  border-radius: 12px;
}

.online-page {
  max-width: 466px;
  margin: 22px auto 0;
  padding-bottom: 36px;
}

.online-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(28, 45, 76, 0.16);
  padding: 4px;
  margin-bottom: 24px;
}

.online-tab {
  margin: 0;
  border-radius: 8px;
  background: #fff;
  color: #2d3f61;
  height: 48px;
  padding: 0 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.online-tab.active {
  background: #2f63e8;
  color: #fff;
  box-shadow: 0 2px 8px rgba(47, 99, 232, 0.42);
}

.tab-icon {
  font-size: 18px;
}

.online-card {
  background: #fff;
  min-height: 520px;
  padding: 66px 32px 28px;
  box-shadow: 0 14px 32px rgba(28, 45, 76, 0.08);
}

.notice-box {
  border: 2px solid #ff9700;
  background: linear-gradient(180deg, #fff7c8 0%, #ffe49d 100%);
  border-radius: 12px;
  color: #d06400;
  font-weight: 700;
  text-align: center;
  padding: 18px 14px;
  margin-bottom: 24px;
}

.notice-icon {
  color: #1a1a1a;
  margin-right: 8px;
}

.flow-badge {
  display: inline-block;
  background: #eaf2ff;
  color: #2f63e8;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.flow-list {
  margin: 0 0 18px 0;
  padding-left: 0;
  list-style-position: inside;
  color: #5c6d8d;
  font-weight: 700;
  line-height: 1.65;
}

.flow-list li {
  margin: 8px 0;
}

.flow-list a {
  color: #06172f;
  font-weight: 800;
}

.online-map-form label {
  color: #5c6d8d;
  margin: 10px 0 6px;
}

.online-map-form input {
  height: 48px;
  border: 2px solid #dde4ef;
  border-radius: 11px;
  color: #47566f;
}

.online-map-form input:focus {
  border-color: #2f63e8;
  outline: none;
}

.online-map-form button {
  width: 100%;
  height: 48px;
  margin: 16px 0 0;
  border-radius: 10px;
  background: #2f63e8;
  font-size: 16px;
}

.online-message {
  min-height: 22px;
  color: #b35b00;
  font-weight: 700;
}

.online-footer-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
}

.online-footer-actions a,
.online-footer-actions button {
  color: #8a96aa;
  background: transparent;
  padding: 0;
  margin: 0;
  font-weight: 400;
  text-decoration: none;
}

.online-alert-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}

.online-alert-mask[hidden] {
  display: none;
}

.online-alert-card {
  width: min(420px, 100%);
  box-sizing: border-box;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.24);
  padding: 24px 20px 22px;
  text-align: center;
}

.online-alert-title {
  margin: 0 0 12px;
  color: #ef233c;
  font-size: 20px;
  font-weight: 800;
}

.online-alert-message {
  margin: 0;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.online-alert-button {
  min-width: 64px;
  height: 38px;
  margin: 18px 0 0;
  border-radius: 8px;
  background: #2457ff;
  padding: 0 18px;
}

@media (max-width: 540px) {
  .online-page {
    max-width: none;
    margin: 12px;
  }

  .online-card {
    padding: 36px 20px 24px;
    min-height: auto;
  }

  .online-tabs {
    margin-bottom: 14px;
  }

  .online-tab {
    font-size: 13px;
  }
}
