:root {
  --page-bg: #f5f7fb;
  --card-bg: #ffffff;
  --line: #edf0f5;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #0066cc;
  --primary-focus: #0071e3;
  --danger: #d9363e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

.ant-btn {
  border-radius: 8px;
}

.ant-btn:focus,
.ant-input:focus,
.native-select:focus,
.link:focus,
.copy-entry:focus {
  outline: 2px solid var(--primary-focus);
  outline-offset: 2px;
}

.ant-btn-primary {
  min-height: 40px;
  padding: 0 22px;
  border-color: var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}

.ant-btn-primary:hover,
.ant-btn-primary:focus {
  border-color: var(--primary-focus);
  background: var(--primary-focus);
  color: #fff;
}

.ant-btn-primary:active {
  transform: scale(.95);
}

.license-layout {
  min-height: 100vh;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: transparent;
  border-bottom: 0;
  line-height: normal;
}

.topbar h1,
.login-panel h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: block;
}

.login-brand {
  justify-content: center;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.icon-button:hover,
.icon-button:focus {
  border-color: transparent;
  background: #eef2f7;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions form {
  margin: 0;
}

.page {
  padding: 16px 24px 24px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 336px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.content-column {
  min-width: 0;
}

.flat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--line);
}

.toolbar-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-actions .ant-btn-link:disabled {
  color: #bfbfbf;
  cursor: not-allowed;
}

.action-more-root {
  flex: 0 0 auto;
  line-height: 0;
}

.action-more-root .action-more-trigger {
  width: 28px;
  height: 28px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: #fff;
}

.action-more-root .action-more-trigger:hover,
.action-more-root .action-more-trigger:focus {
  border-color: #91caff;
  color: var(--primary);
  background: #eef2f7;
}

.ant-dropdown .ant-dropdown-menu,
.ant-dropdown-menu {
  padding: 6px;
  border-radius: 10px;
}

.ant-dropdown .ant-dropdown-menu-item,
.ant-dropdown-menu-item {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 8px;
}

.ant-dropdown .ant-dropdown-menu-item:hover,
.ant-dropdown .ant-dropdown-menu-item-active,
.ant-dropdown-menu-item:hover,
.ant-dropdown-menu-item-active {
  background: #eef2f7;
}

.ant-dropdown .ant-dropdown-menu-item-disabled:hover,
.ant-dropdown-menu-item-disabled:hover {
  background: transparent;
}

.danger-link {
  color: var(--danger);
}

.danger-link:hover,
.danger-link:focus {
  color: #a8071a;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.status-pill.deployed {
  background: #f6ffed;
  color: #237804;
}

.stats-card {
  display: grid;
  gap: 0;
  padding-bottom: 20px;
  background: var(--card-bg);
}

.stats-title-row {
  padding-bottom: 16px;
}

.stats-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 16px 18px;
}

.compact-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.chart-shell {
  position: relative;
  height: 260px;
  padding: 8px 20px 0;
}

.search-form {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.search-form input {
  max-width: 480px;
  width: 100%;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
}

.search-form .native-select {
  flex: 0 0 132px;
}

.search-form .custom-select {
  flex: 0 0 132px;
}

.compact-field .custom-select {
  width: 100%;
}

.native-select,
.custom-select-trigger,
.custom-multi-select-trigger {
  height: 40px;
  min-width: 112px;
  max-width: 100%;
  padding: 4px 32px 4px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.search-form .native-select {
  height: 44px;
}

.search-form .custom-select-trigger {
  height: 44px;
}

.native-select-source {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
  display: inline-block;
  min-width: 112px;
}

.custom-select-trigger,
.custom-multi-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.custom-select-trigger::after,
.custom-multi-select-trigger::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.custom-select-menu {
  position: fixed;
  display: none;
  z-index: 1000;
  min-width: 112px;
  padding: 6px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
}

.custom-select-menu.open {
  display: grid;
  gap: 2px;
}

.custom-select-search {
  width: 100%;
  height: 34px;
  margin-bottom: 4px;
  padding: 6px 10px;
  border-radius: 8px;
}

.custom-multi-select {
  position: relative;
  display: inline-block;
  width: 100%;
  min-width: 112px;
}

.custom-multi-select-label {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-multi-select-label.placeholder {
  color: #bfbfbf;
}

.custom-multi-select-menu {
  position: fixed;
  display: none;
  z-index: 1000;
  min-width: 220px;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
}

.custom-multi-select-menu.open {
  display: grid;
  gap: 2px;
}

.custom-multi-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.custom-multi-select-option:hover,
.custom-multi-select-option:focus-within {
  background: #eef2f7;
}

.custom-multi-select-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.custom-multi-select-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-option {
  width: 100%;
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option:focus {
  background: #eef2f7;
  outline: 0;
}

.custom-select-option.selected {
  background: #eaf4ff;
  color: var(--primary);
}

.search-form .ant-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
}

.search-form input[type="hidden"] {
  display: none;
}

.table-wrap {
  overflow: auto;
  background: var(--card-bg);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.record-count {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap > table,
.manage-table {
  width: 100%;
  min-width: 1560px;
  border-collapse: collapse;
}

.table-wrap > table th,
.table-wrap > table td,
.manage-table th,
.manage-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.table-wrap > table th,
.manage-table th {
  color: var(--muted);
  background: #fafafa;
  font-weight: 600;
}

.customer-table {
  table-layout: fixed;
  min-width: 1700px;
}

.customer-table th,
.customer-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-table th:nth-child(1),
.customer-table td:nth-child(1) {
  width: 260px;
}

.customer-table th:nth-child(2),
.customer-table td:nth-child(2) {
  width: 130px;
}

.customer-table th:nth-child(3),
.customer-table td:nth-child(3) {
  width: 80px;
}

.customer-table th:nth-child(4),
.customer-table td:nth-child(4),
.customer-table th:nth-child(7),
.customer-table td:nth-child(7) {
  width: 84px;
}

.customer-table th:nth-child(5),
.customer-table td:nth-child(5) {
  width: 180px;
}

.customer-table th:nth-child(6),
.customer-table td:nth-child(6) {
  width: 150px;
}

.customer-table th:nth-child(8),
.customer-table td:nth-child(8) {
  width: 116px;
}

.customer-table th:nth-child(9),
.customer-table td:nth-child(9),
.customer-table th:nth-child(10),
.customer-table td:nth-child(10) {
  width: 170px;
}

.customer-table th:nth-child(11),
.customer-table td:nth-child(11) {
  width: 200px;
}

.customer-table .row-actions {
  flex-wrap: nowrap;
}

.customer-table .row-actions .link,
.customer-table .status-pill {
  white-space: nowrap;
}

.customer-table .time-cell {
  font-variant-numeric: tabular-nums;
  text-overflow: clip;
}

.empty {
  height: 104px;
  text-align: center;
  color: var(--muted);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.page-size-form {
  display: flex;
  align-items: center;
}

.link {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.customer-link {
  max-width: 168px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-weight: 500;
}

.marker {
  max-width: 288px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.customer-table .marker {
  max-width: calc(100% - 30px);
}

.marker-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.copy-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.copy-entry:hover,
.copy-entry:focus,
.copy-entry.copied {
  background: #eef2f7;
  color: var(--primary);
}

.copy-entry svg {
  width: 14px;
  height: 14px;
}

.toast {
  position: fixed;
  top: 72px;
  left: 50%;
  z-index: 1200;
  min-width: 112px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(17, 24, 39, .92);
  color: #fff;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.manage-page {
  display: grid;
  gap: 16px;
}

.manage-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.manage-sidebar {
  display: grid;
  gap: 4px;
  padding: 8px;
  background: var(--card-bg);
}

.manage-menu-item {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.manage-menu-item:hover,
.manage-menu-item:focus,
.manage-menu-item.active {
  background: #eaf4ff;
  color: var(--primary);
  outline: 0;
}

.manage-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.manage-panel {
  display: none;
  gap: 16px;
}

.manage-panel.active {
  display: grid;
}

.manage-card {
  display: grid;
  gap: 16px;
  padding-bottom: 16px;
  background: var(--card-bg);
}

.manage-form {
  display: grid;
  gap: 12px;
  padding: 0 16px;
}

.manage-form .ant-input,
.manage-form .native-select {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
}

.manage-form select[multiple] {
  min-height: 96px;
  padding: 8px 12px;
}

.manage-filter {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
}

.manage-filter .ant-input {
  flex: 0 1 360px;
  width: 360px;
  max-width: 360px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
}

.manage-filter .native-select {
  flex: 0 0 140px;
  width: 140px;
  height: 40px;
  border-radius: 8px;
}

.manage-filter .custom-select {
  flex: 0 0 140px;
  width: 140px;
}

.manage-filter .custom-select-trigger {
  height: 40px;
}

.manage-filter .ant-btn {
  flex: 0 0 60px;
  width: 60px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
}

.permission-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.permission-tree {
  display: grid;
  gap: 12px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
}

.permission-group {
  display: grid;
  gap: 8px;
}

.permission-group + .permission-group {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.permission-group h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}

.permission-node {
  display: grid;
  gap: 6px;
}

.permission-children {
  display: grid;
  gap: 6px;
  margin-left: 18px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.permission-leaf {
  min-height: 24px;
}

.permission-check-line {
  min-height: 24px;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
}

.check-line input {
  width: 16px;
  height: 16px;
}

.manage-table {
  min-width: 0;
}

.manage-table td {
  vertical-align: top;
}

.permission-summary-cell {
  max-width: 560px;
}

.permission-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.permission-summary strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.permission-summary span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-table td p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.manage-table form {
  margin: 0;
}

.switch-form {
  display: inline-flex;
}

.status-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 74px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.status-switch span {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d9d9d9;
  transition: background .18s ease;
}

.status-switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .22);
  transition: transform .18s ease;
}

.status-switch.checked {
  color: var(--primary);
}

.status-switch.checked span {
  background: var(--primary);
}

.status-switch.checked span::after {
  transform: translateX(16px);
}

.status-switch em {
  font-style: normal;
  font-size: 13px;
}

.status-switch:disabled {
  color: #bfbfbf;
  cursor: not-allowed;
}

.status-switch:disabled span {
  opacity: .62;
}

.success-message {
  min-height: 0;
  color: #237804;
}

.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  margin: 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.pagination .disabled {
  pointer-events: none;
  color: #bfbfbf;
}

.pagination .ant-pagination-item-active {
  border-color: var(--primary);
  color: var(--primary);
}

dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
}

dialog::backdrop {
  background: rgba(15, 23, 42, .45);
}

.dialog-card {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  background: var(--card-bg);
}

.dialog-card .ant-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -20px -20px 2px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog-close {
  color: var(--muted);
}

.dialog-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
}

.dialog-explain {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #d6e4ff;
  border-radius: 8px;
  background: #f0f7ff;
  color: var(--text);
}

.dialog-explain strong {
  font-size: 14px;
  font-weight: 650;
}

.dialog-explain p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.dialog-explain code {
  color: var(--primary);
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.field-label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.dialog-grid {
  display: grid;
  gap: 12px;
}

.dialog-grid.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-panel {
  display: grid;
  gap: 12px;
}

.monospace-input {
  font-family: "JetBrains Mono", "Cascadia Mono", Consolas, monospace;
  line-height: 1.55;
}

.required-label::before {
  content: "*";
  margin-right: 4px;
  color: var(--danger);
  font-weight: 650;
}

.dialog-card .ant-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-color: #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.deploy-native-select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-color: #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.deploy-mode-switch-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 4px 0;
}

.deploy-mode-option {
  min-width: 48px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.deploy-mode-option.active {
  color: var(--primary);
  font-weight: 650;
}

.deploy-mode-switch.ant-switch {
  flex: 0 0 auto;
}

.deploy-dialog-card .field-label {
  gap: 8px;
}

.deploy-message {
  min-height: 22px;
  margin-top: -2px;
  line-height: 1.5;
}

.dialog-card .custom-multi-select,
.dialog-card .custom-multi-select-trigger {
  width: 100%;
}

.dialog-card .ant-input:hover {
  border-color: var(--primary-focus);
}

.dialog-card .ant-input::placeholder {
  color: #bfbfbf;
}

.flat-collapse {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.flat-collapse summary {
  display: flex;
  align-items: center;
  min-height: 28px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  list-style-position: inside;
}

.flat-collapse summary:hover {
  color: var(--primary);
}

.flat-collapse label {
  margin-top: 0;
}

.profile-fields {
  display: grid;
  gap: 12px;
}

.message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
}

.test-message {
  color: var(--muted);
  font-size: 13px;
}

.test-message.success {
  color: #237804;
}

.test-message.fail {
  color: var(--danger);
}

.dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.result {
  display: grid;
  gap: 12px;
}

.hidden {
  display: none;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 520px;
  padding: 16px;
  background: #fafafa;
}

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

.result-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.result-status strong {
  display: block;
  color: #237804;
  font-weight: 650;
}

.result-status p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  word-break: break-all;
}

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f6ffed;
  color: #52c41a;
}

.success-mark svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.result-buttons {
  display: flex;
  gap: 8px;
}

.dialog-card > .ant-btn-primary,
.dialog-actions .ant-btn,
.result-buttons .ant-btn {
  min-height: 40px;
  border-radius: 8px;
}

.admin-antd-modal .ant-modal-content {
  overflow: hidden;
  border-radius: 8px;
}

.admin-antd-modal .ant-modal-header {
  border-radius: 8px 8px 0 0;
}

.admin-antd-modal .ant-modal-footer {
  padding: 12px 24px;
}

.admin-antd-modal .ant-modal-body {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.admin-antd-modal .ant-input,
.admin-antd-modal .ant-picker,
.admin-antd-modal .ant-select:not(.ant-select-customize-input) .ant-select-selector,
.admin-antd-modal .ant-btn {
  border-radius: 8px;
}

.admin-antd-modal .ant-input,
.admin-antd-modal .ant-select-single:not(.ant-select-customize-input) .ant-select-selector,
.admin-antd-modal .ant-picker {
  height: 40px;
  min-height: 40px;
}

.admin-antd-modal textarea.license-result-textarea.ant-input,
.admin-antd-modal .license-result-textarea {
  height: min(300px, calc(100vh - 560px)) !important;
  min-height: 220px !important;
  max-height: 300px !important;
  resize: none;
}

.admin-antd-modal .ant-modal-footer .ant-btn {
  min-width: 78px;
  height: 38px;
  padding: 4px 16px;
}

.admin-antd-modal .ant-modal-footer .ant-btn + .ant-btn {
  margin-left: 8px;
}

.ant-picker-dropdown .ant-picker-content {
  width: 100%;
  table-layout: fixed;
}

.ant-picker-dropdown .ant-picker-content th,
.ant-picker-dropdown .ant-picker-content td {
  padding: 0;
  border-bottom: 0;
  text-align: center;
  font-size: 14px;
}

.ant-picker-dropdown .ant-picker-cell {
  padding: 3px 0;
}

.result-buttons .ant-btn.copied {
  border-color: #52c41a;
  color: #237804;
  background: #f6ffed;
}

textarea {
  width: 100%;
  height: 150px;
  border-radius: 8px;
  resize: vertical;
  font-family: Consolas, monospace;
}

.rich-editor {
  display: grid;
  overflow: hidden;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
}

.rich-editor:focus-within {
  border-color: var(--primary-focus);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, .12);
}

.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}

.rich-toolbar .icon-button {
  width: 30px;
  height: 30px;
}

.rich-input {
  min-height: 112px;
  max-height: 240px;
  overflow: auto;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  outline: 0;
}

.rich-input:empty::before {
  content: attr(data-placeholder);
  color: #bfbfbf;
  pointer-events: none;
}

.rich-input p,
.rich-content p {
  margin: 0 0 6px;
}

.rich-input p:last-child,
.rich-content p:last-child {
  margin-bottom: 0;
}

.rich-input ul,
.rich-input ol,
.rich-content ul,
.rich-content ol {
  margin: 0;
  padding-left: 18px;
}

.rich-input li,
.rich-content li {
  margin: 2px 0;
}

#licenseText {
  height: min(300px, calc(100vh - 560px)) !important;
  min-height: 220px !important;
  padding: 12px 14px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.result-card > .license-text-readonly,
.result-card pre.license-text-readonly,
.result-card textarea.license-text-readonly {
  flex: 0 0 min(300px, calc(100vh - 560px));
  height: min(300px, calc(100vh - 560px)) !important;
  min-height: 220px !important;
  max-height: 300px !important;
}

.license-text-readonly {
  display: block;
  width: 100%;
  max-height: none;
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  word-break: break-all;
  background: #fff;
  cursor: text;
  user-select: text;
}

body.drawer-open {
  overflow: hidden;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
}

.drawer.open {
  display: block;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .32);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(520px, calc(100vw - 28px));
  height: 100%;
  padding: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 16px 0 0 16px;
  background: var(--card-bg);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header > div {
  min-width: 0;
}

.drawer-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.drawer-header h2 {
  margin: 6px 0;
  font-size: 20px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.timeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-top: 4px;
}

.timeline-toolbar h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: var(--muted);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  padding: 0 0 8px;
}

.timeline-item article {
  min-width: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin-top: 5px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-item.upgrade .timeline-dot {
  background: #faad14;
}

.timeline-item.profile .timeline-dot {
  background: #13c2c2;
}

.timeline-item.deploy .timeline-dot {
  background: #52c41a;
}

.timeline-item article {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-item header {
  display: block;
}

.timeline-item strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.timeline-time {
  justify-self: end;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.timeline-detail {
  display: grid;
  align-content: start;
  gap: 4px;
}

.timeline-detail p,
.timeline-detail-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
  word-break: break-all;
}

.timeline-detail span,
.timeline-detail-row > span {
  color: var(--muted);
}

.timeline-detail strong {
  color: var(--text);
  font-weight: 400;
}

.timeline-rich-row {
  align-items: start;
}

.timeline-detail .rich-content {
  display: block;
  min-width: 0;
  line-height: 1.45;
  word-break: break-word;
}

.timeline-detail .rich-content strong,
.timeline-detail .rich-content b {
  font-weight: 650;
}

.login-page {
  min-height: 100vh;
  display: block;
  background: var(--page-bg);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  width: 100%;
  padding: 24px 16px;
  box-sizing: border-box;
}

.login-panel {
  display: grid;
  width: min(460px, 100%);
  min-height: 566px;
  padding: 52px 40px 28px;
  border-color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .08), 0 0 0 1px rgba(255, 255, 255, .36) inset;
  backdrop-filter: blur(16px);
}

.login-panel .brand-logo {
  width: 36px;
  height: 36px;
}

.login-brand {
  margin-top: 4px;
}

.login-form {
  display: grid;
  gap: 0;
  margin-top: 44px;
  align-self: start;
}

.login-ant-form .ant-form-item {
  min-height: 94px;
  margin-bottom: 0;
}

.login-ant-form .ant-form-item-explain {
  min-height: 22px;
}

.login-ant-form .ant-form-item-label {
  padding-bottom: 8px;
}

.login-ant-form .ant-form-item-label > label {
  height: auto;
  color: var(--muted);
  font-size: 14px;
}

.login-form .ant-input,
.login-form .ant-input-affix-wrapper {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
}

.login-form .ant-input-affix-wrapper {
  height: 44px;
}

.login-form .ant-input-affix-wrapper > .ant-input {
  min-height: 0;
  height: auto;
  padding: 0;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 116px;
  gap: 10px;
}

.captcha-image-button {
  height: 44px;
  padding: 0;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}

.captcha-image-button:hover,
.captcha-image-button:focus {
  border-color: var(--primary-focus);
  outline: 0;
}

.captcha-image-button img {
  display: block;
  width: 116px;
  height: 44px;
}

.login-form .captcha-image-button.ant-btn {
  width: 116px;
  height: 44px;
  min-height: 44px;
  border-radius: 8px;
}

.login-form .captcha-image-button.ant-btn > span {
  display: block;
  height: 44px;
}

.login-form .ant-btn {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
}

.login-copyright {
  align-self: end;
  margin: 28px 0 0;
  color: #8c8c8c;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.error {
  margin: 0;
  color: var(--danger);
}

.file-service-tabs {
  padding: 0 16px;
}

.file-service-tabs .ant-tabs-nav {
  margin: 0;
}

.file-service-tabs .ant-tabs-nav::before {
  border-bottom-color: var(--line);
}

.file-service-tabs .ant-tabs-nav-list {
  position: relative;
}

.file-service-tabs .ant-tabs-tab {
  padding: 13px 0;
}

.file-service-tabs .ant-tabs-tab + .ant-tabs-tab {
  margin-left: 28px;
}

.file-service-tabs .ant-tabs-tab-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.file-service-tabs .ant-tabs-tab:hover .ant-tabs-tab-btn,
.file-service-tabs .ant-tabs-tab-active .ant-tabs-tab-btn {
  color: var(--primary);
}

.file-service-tabs .ant-tabs-tab-btn:focus {
  outline: 0;
}

.file-service-tab-panel {
  display: none;
}

.file-service-tab-panel.active {
  display: block;
}

.file-service-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: end;
  padding: 8px 16px 16px;
}

.file-service-form .field-label {
  min-width: 0;
}

.file-service-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-service-actions .ant-btn {
  min-height: 36px;
}

.test-status {
  font-size: 13px;
  color: var(--muted);
}

.test-status.success {
  color: #237804;
}

.test-status.fail {
  color: var(--danger);
}

.file-service-meta {
  margin: 0;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.file-service-files-header {
  border-top: 1px solid var(--line);
}

.file-service-path {
  min-height: 40px;
  padding: 10px 16px 0;
  color: var(--muted);
}

.file-service-path .link,
.file-service-entry {
  color: var(--primary);
  font-weight: 500;
}

.file-service-table {
  width: calc(100% - 32px);
  min-width: 0;
  margin: 0 16px;
}

.file-service-table td {
  vertical-align: middle;
}

.file-service-empty,
.file-service-meta {
  text-align: center;
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    align-items: flex-start;
    padding: 12px 14px;
  }

  .page {
    padding: 12px 14px calc(32px + env(safe-area-inset-bottom));
  }

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

  .stats-controls {
    grid-template-columns: 1fr;
  }

  .chart-shell {
    height: 220px;
  }

  .toolbar,
  .search-form,
  .manage-filter,
  .table-footer,
  .result-actions,
  .toolbar-actions,
  .topbar-actions,
  .manage-shell {
    flex-direction: column;
    align-items: stretch;
  }

  .manage-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manage-sidebar {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    overflow-x: auto;
  }

  .search-form input {
    max-width: none;
  }

  .manage-filter .ant-input,
  .manage-filter .native-select,
  .manage-filter .custom-select,
  .manage-filter .ant-btn {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .search-form .native-select {
    flex-basis: auto;
    width: 100%;
  }

  .search-form .custom-select {
    flex-basis: auto;
    width: 100%;
  }

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

  .table-wrap {
    width: 100%;
    overflow-x: visible;
    overflow-y: visible;
  }

  .table-wrap > table,
  .manage-table,
  .file-service-table {
    min-width: 0;
  }

  .table-wrap > table thead,
  .manage-table thead,
  .file-service-table thead {
    display: none;
  }

  .table-wrap > table tbody,
  .manage-table tbody,
  .file-service-table tbody {
    display: grid;
    gap: 0;
  }

  .table-wrap > table tbody tr,
  .manage-table tbody tr,
  .file-service-table tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap > table tbody tr:last-child,
  .manage-table tbody tr:last-child,
  .file-service-table tbody tr:last-child {
    border-bottom: 0;
  }

  .table-wrap > table th,
  .table-wrap > table td,
  .manage-table th,
  .manage-table td,
  .file-service-table th,
  .file-service-table td {
    border-bottom: 0;
  }

  .table-wrap > table td,
  .manage-table td,
  .file-service-table td {
    display: grid;
    gap: 4px;
    padding: 8px 0;
    font-size: 14px;
  }

  .table-wrap > table td::before,
  .manage-table td::before,
  .file-service-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
  }

  .empty {
    display: block;
    grid-column: 1 / -1;
    height: auto;
    padding: 28px 0;
    text-align: center;
  }

  .empty::before {
    content: none;
  }

  .marker-cell {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: center;
  }

  .marker-cell::before {
    grid-column: 1 / -1;
  }

  .marker {
    max-width: 100%;
    min-height: 32px;
    text-align: left;
  }

  .copy-entry {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  td[data-label="创建时间"],
  td[data-label="更新时间"],
  td[data-label="操作"] {
    grid-column: 1 / -1;
  }

  .row-actions {
    align-items: stretch;
  }

  .action-more-root {
    width: 100%;
  }

  .action-more-root .action-more-trigger {
    width: 100%;
  }

  td[data-label="操作"] .link {
    min-height: 40px;
    width: 100%;
    padding: 0 16px;
    border: 1px solid var(--primary);
    border-radius: 8px;
  }

  .customer-link {
    max-width: 100%;
    min-height: 32px;
    text-align: left;
  }

  .drawer-panel {
    width: min(100vw - 20px, 520px);
    padding: 16px;
  }

  .timeline-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-toolbar .custom-select {
    width: 100%;
  }

  .timeline-item header {
    display: block;
  }

  .table-footer {
    gap: 12px;
  }

  .page-size-form {
    justify-content: flex-start;
  }

  .pagination {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .pagination a,
  .pagination span {
    min-width: 64px;
    justify-content: center;
  }

  dialog {
    width: min(100vw - 32px, 640px);
    max-height: calc(100vh - 32px - env(safe-area-inset-bottom));
  }

  .dialog-grid.two-columns {
    grid-template-columns: 1fr;
  }

  .dialog-card {
    max-height: calc(100vh - 32px - env(safe-area-inset-bottom));
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  #licenseText {
    height: 320px !important;
    min-height: 320px !important;
  }

  .result-card > .license-text-readonly,
  .result-card pre.license-text-readonly,
  .result-card textarea.license-text-readonly {
    flex-basis: 320px;
    height: 320px !important;
    min-height: 320px !important;
  }

  .result-card {
    min-height: 420px;
  }
}
