
    :root {
      color-scheme: light;
      --bg: #f6f7f9;
      --panel: #ffffff;
      --line: #dde2e8;
      --text: #1f2933;
      --muted: #64748b;
      --ok: #0f8f5f;
      --warn: #b7791f;
      --bad: #c24135;
      --accent: #2454a6;
      --accent-soft: #eef4ff;
      --accent-border: #c8d8f2;
    }
    * {
      box-sizing: border-box;
      scrollbar-width: thin;
      scrollbar-color: rgba(100, 116, 139, 0.56) transparent;
    }
    *::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    *::-webkit-scrollbar-track {
      background: transparent;
    }
    *::-webkit-scrollbar-thumb {
      border-radius: 999px;
      background: rgba(100, 116, 139, 0.56);
    }
    *::-webkit-scrollbar-thumb:hover {
      background: rgba(100, 116, 139, 0.72);
    }
    body {
      margin: 0;
      min-height: 100vh;
      background: var(--bg);
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      font-size: 14px;
    }
    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 0 24px;
      background: var(--panel);
      border-bottom: 1px solid var(--line);
    }
    .topbar-brand {
      flex: 0 0 auto;
      min-width: 132px;
      display: inline-flex;
      align-items: center;
      gap: 10px;
    }
    .topbar-nav {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      justify-content: flex-start;
      align-items: center;
    }
    h1, h2, p { margin: 0; }
    h1 { font-size: 20px; font-weight: 700; line-height: 1.1; }
    .brand-title {
      display: block;
      white-space: nowrap;
    }
    .brand-copy {
      display: grid;
      align-items: center;
      gap: 2px;
      min-width: 0;
    }
    .brand-ai-icon {
      width: 40px;
      height: 40px;
      border: 1px solid var(--accent-border);
      border-radius: 10px;
      background: var(--accent-soft);
      color: var(--accent);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }
    .brand-ai-icon svg {
      width: 24px;
      height: 24px;
      fill: none;
      stroke: currentColor;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 2;
    }
    h2 { font-size: 17px; font-weight: 700; }
    .eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; line-height: 1.1; text-transform: uppercase; margin-bottom: 2px; }
    button {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 6px;
      padding: 8px 14px;
      color: var(--text);
      cursor: pointer;
    }
    button[type="submit"] { background: var(--accent); color: white; border-color: var(--accent); }
    .account-menu {
      position: relative;
      flex: 0 0 auto;
    }
    .account-menu-trigger {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      padding: 0 10px 0 4px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: var(--text);
      font: inherit;
      font-weight: 700;
    }
    .account-menu-trigger:hover,
    .account-menu.open .account-menu-trigger {
      background: var(--accent-soft);
      color: var(--accent);
    }
    .account-avatar {
      width: 34px;
      height: 34px;
      border: 1px solid #e5edf7;
      border-radius: 50%;
      background: #ffffff;
      color: var(--accent);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    }
    .account-avatar svg {
      width: 21px;
      height: 21px;
      fill: none;
      stroke: currentColor;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 2;
    }
    .account-name {
      max-width: 128px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .account-caret {
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid currentColor;
      flex: 0 0 auto;
    }
    .account-menu-panel {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      z-index: 50;
      min-width: 176px;
      display: none;
      gap: 4px;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
    }
    .account-menu.open .account-menu-panel {
      display: grid;
    }
    .account-menu-panel .account-menu-item {
      display: flex;
      align-items: center;
      width: 100%;
      height: 36px;
      padding: 0 14px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--text);
      font: inherit;
      font-weight: 700;
      white-space: nowrap;
      line-height: 1;
      text-align: left;
    }
    .account-menu-panel .account-menu-item:hover {
      background: var(--accent-soft);
      color: var(--accent);
    }
    .account-menu-logout-form {
      margin: 0;
    }
    .account-menu-panel .account-menu-logout {
      color: var(--danger);
    }
    .account-menu-panel .account-menu-logout:hover {
      background: #fff1f2;
      color: var(--danger);
    }
    .admin-nav {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 52px;
      min-width: max-content;
      padding: 2px 4px;
      border: 0;
      border-radius: 8px;
      background: var(--panel);
      box-shadow: none;
    }
    .nav-item {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 42px;
      min-height: 42px;
      padding: 0 20px;
      border: 1px solid transparent;
      border-radius: 7px;
      color: var(--muted);
      font-size: 14px;
      font-weight: 750;
      text-decoration: none;
      white-space: nowrap;
      transition: background 140ms ease, color 140ms ease;
    }
    .nav-item:hover {
      color: var(--accent);
      background: var(--accent-soft);
    }
    .nav-item.active {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
      box-shadow: none;
    }
    .nav-dropdown {
      position: relative;
      display: inline-flex;
      align-items: stretch;
    }
    .nav-menu-trigger {
      gap: 8px;
      width: 100%;
      border: 0;
      font: inherit;
    }
    .nav-caret {
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid currentColor;
      flex: 0 0 auto;
      line-height: 1;
    }
    .nav-menu {
      display: none;
      position: absolute;
      top: calc(100% + 7px);
      left: 0;
      z-index: 30;
      width: 100%;
      min-width: 100%;
      padding: 6px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    }
    .nav-dropdown.open .nav-menu,
    .nav-dropdown:focus-within .nav-menu {
      display: grid;
      gap: 4px;
    }
    .nav-menu-item {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      text-decoration: none;
      white-space: nowrap;
    }
    .nav-menu-item:hover {
      color: var(--accent);
      background: var(--accent-soft);
    }
    .nav-menu-item.active {
      color: var(--accent);
      background: var(--accent-soft);
    }
    html.admin-page-loading-active .nav-menu,
    body.admin-page-loading-active .nav-menu {
      display: none;
    }
    .section-tools {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .refresh-tools {
      justify-content: flex-end;
      margin-left: auto;
    }
    .icon-button {
      width: 26px;
      height: 26px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-radius: 50%;
      font-size: 19px;
      line-height: 1;
      flex: 0 0 auto;
    }
    .refresh-icon {
      width: 16px;
      height: 16px;
      display: block;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .icon-button.loading .refresh-icon {
      animation: refresh-spin 760ms linear infinite;
      transform-origin: 50% 50%;
    }
    @keyframes refresh-spin {
      to { transform: rotate(360deg); }
    }
    .icon-button:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: #f4f7ff;
    }
    main { padding: 6px 14px 18px; }
    main[data-admin-main] {
      position: relative;
      min-height: calc(100vh - 62px);
    }
    .admin-page-loading-overlay {
      position: absolute;
      inset: 0;
      z-index: 25;
      display: grid;
      place-items: center;
      min-height: calc(100vh - 62px);
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(1px);
    }
    .admin-page-loading-overlay[hidden] {
      display: none;
    }
    html.admin-page-loading-active .admin-page-loading-overlay[hidden] {
      display: grid;
    }
    .admin-page-loading-panel {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-height: 40px;
      padding: 0 16px;
      border: 1px solid var(--accent-border);
      border-radius: 8px;
      background: var(--panel);
      color: var(--accent);
      font-size: 12px;
      font-weight: 400;
      box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    }
    .admin-page-loading-spinner {
      width: 16px;
      height: 16px;
      border: 1.5px solid var(--accent-border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: admin-page-loading-spin 760ms linear infinite;
    }
    @keyframes admin-page-loading-spin {
      to { transform: rotate(360deg); }
    }
    .summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(120px, 1fr));
      gap: 12px;
      margin-bottom: 18px;
    }
    .monitor-section .summary-grid {
      padding: 16px 18px;
      margin-bottom: 0;
    }
    .summary-grid article, .section, .login-box {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .summary-grid article { padding: 16px; }
    .summary-grid span { display: block; font-size: 24px; font-weight: 750; margin-bottom: 4px; }
    .summary-grid p, small { color: var(--muted); }
    .section { margin-top: 8px; overflow: hidden; }
    .section:first-child { margin-top: 0; }
    .section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 13px 18px;
      border-bottom: 1px solid var(--line);
    }
    .section-title-actions {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      min-width: 0;
    }
    .ai-channel-switch-title-section .section-head,
    .ai-customer-service-title-section .section-head {
      justify-content: flex-start;
      border-bottom: 0;
    }
    .ai-weight-log-open-button,
    .ai-auto-message-config-button,
    .ai-customer-service-config-button {
      flex: 0 0 auto;
    }
    .table-search {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      border-bottom: 1px solid var(--line);
      background: #fafbfc;
    }
    .standard-search-bar {
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
    }
    .standard-search-controls,
    .standard-search-actions,
    .table-search-actions,
    .config-filter-tools,
    .config-action-buttons {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }
    .standard-search-controls {
      flex: 1 1 auto;
      flex-wrap: wrap;
    }
    .standard-search-actions,
    .table-search-actions,
    .config-action-buttons {
      margin-left: auto;
      white-space: nowrap;
      flex-wrap: wrap;
    }
    .standard-toolbar-button {
      color: var(--muted);
      border-color: var(--line);
      background: var(--panel);
      font-weight: 700;
    }
    .standard-toolbar-button:hover {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
    }
    .standard-add-button {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
      font-weight: 700;
    }
    .standard-add-button:hover {
      background: #dfeaff;
      border-color: #9bbcf7;
    }
    .search-select-wrap {
      position: relative;
      display: inline-flex;
      width: 220px;
      height: 34px;
      flex: 0 0 220px;
    }
    .country-search-wrap {
      width: 150px;
      flex-basis: 150px;
    }
    .search-select-wrap::after {
      content: "";
      position: absolute;
      right: 12px;
      top: 50%;
      width: 0;
      height: 0;
      border-left: 5px solid transparent;
      border-right: 5px solid transparent;
      border-top: 6px solid var(--muted);
      transform: translateY(-28%);
      pointer-events: none;
    }
    .search-select {
      width: 100%;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      color: var(--text);
      font: inherit;
      appearance: none;
      -webkit-appearance: none;
      padding: 0 32px 0 10px;
    }
    .search-select::-ms-expand {
      display: none;
    }
    .search-input {
      width: 260px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      color: var(--text);
      font: inherit;
      padding: 0 10px;
    }
    .search-select:focus,
    .search-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(36, 84, 166, 0.12);
    }
    .search-button {
      height: 34px;
      padding: 0 12px;
      white-space: nowrap;
    }
    .search-button-primary {
      background: var(--accent);
      border-color: var(--accent);
      color: #ffffff;
    }
    .search-button-primary:hover {
      background: #1d4790;
      border-color: #1d4790;
    }
    .config-table {
      min-width: 920px;
      table-layout: fixed;
    }
    .ai-customer-service-config-stack {
      display: grid;
      gap: 0;
    }
    .ai-customer-service-config-table {
      min-width: 0;
      table-layout: fixed;
    }
    .ai-customer-service-config-table th,
    .ai-customer-service-config-table td {
      vertical-align: middle;
    }
    .ai-customer-service-config-table th {
      width: 1%;
      white-space: nowrap;
      color: var(--muted);
      text-align: left;
      background: var(--table-head);
    }
    .ai-customer-service-config-table td {
      width: auto;
    }
    .ai-customer-service-config-enabled-col {
      width: 104px;
    }
    .ai-customer-service-config-cooldown-label-col {
      width: 112px;
    }
    .ai-customer-service-config-cooldown-col {
      width: auto;
    }
    .ai-customer-service-config-add-col {
      width: 112px;
    }
    .ai-customer-service-config-enabled-cell {
      text-align: left;
    }
    .ai-customer-service-config-add-cell {
      text-align: right;
    }
    .ai-customer-service-basic-table tbody tr:last-child th,
    .ai-customer-service-basic-table tbody tr:last-child td {
      border-bottom: 1px solid var(--line);
    }
    .ai-customer-service-config-keyword-table-wrap {
      border-bottom: 0;
      border-radius: 0;
      flex: 0 1 auto;
    }
    .ai-customer-service-keyword-table {
      min-width: 0;
      table-layout: fixed;
    }
    .ai-customer-service-keyword-meaning-col {
      width: 18%;
    }
    .ai-customer-service-keyword-name-col {
      width: 14%;
    }
    .ai-customer-service-keyword-combination-col {
      width: 26%;
    }
    .ai-customer-service-keyword-reply-col {
      width: 28%;
    }
    .ai-customer-service-keyword-actions-col {
      width: 14%;
    }
    .ai-customer-service-keyword-table th,
    .ai-customer-service-keyword-table td {
      vertical-align: middle;
    }
    .ai-customer-service-keyword-table th:last-child,
    .ai-customer-service-keyword-table td:last-child {
      text-align: right;
    }
    .ai-customer-service-combination-tags {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      max-width: 100%;
    }
    .ai-customer-service-combination-tags.message-preview {
      display: flex;
      overflow: visible;
      white-space: normal;
      cursor: help;
    }
    .ai-customer-service-combination-tag {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      max-width: 100%;
      padding: 2px 8px;
      border: 1px solid var(--accent-border);
      border-radius: 6px;
      background: var(--accent-soft);
      font-size: 12px;
      font-weight: 750;
      line-height: 1.35;
      word-break: break-word;
    }
    .ai-customer-service-combination-tag.is-blue {
      color: var(--accent);
    }
    .ai-customer-service-combination-tag.is-red {
      color: var(--bad);
      border-color: #fecaca;
      background: #fff7f7;
    }
    .ai-customer-service-combination-tag.is-green {
      color: var(--ok);
      border-color: #bbf7d0;
      background: #f0fdf4;
    }
    .ai-customer-service-combination-field {
      gap: 8px;
    }
    .ai-customer-service-combination-field-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }
    .ai-customer-service-combination-config-button {
      flex: 0 0 auto;
      min-width: 70px;
      height: 30px;
      padding: 0 14px;
      border: 1px solid var(--accent-border);
      border-radius: 6px;
      background: var(--accent-soft);
      color: var(--accent);
      font: inherit;
      font-size: 13px;
      font-weight: 750;
      line-height: 1;
      cursor: pointer;
    }
    .ai-customer-service-combination-config-button:hover {
      background: #dfeaff;
      border-color: #9bbcf7;
    }
    .ai-customer-service-combination-config-button:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px rgba(36, 84, 166, 0.14);
    }
    .ai-customer-service-combination-preview-line {
      display: flex;
      align-items: center;
      min-height: 42px;
      width: 100%;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      overflow: hidden;
      min-width: 0;
    }
    .ai-customer-service-combination-tags.ai-customer-service-combination-tags-inline.message-preview {
      display: flex;
      flex-wrap: nowrap;
      overflow: hidden;
      white-space: nowrap;
      max-width: 100%;
    }
    .ai-customer-service-combination-tags-inline .ai-customer-service-combination-tag {
      flex: 0 0 auto;
      max-width: 140px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      word-break: normal;
    }
    .ai-customer-service-combination-modal {
      width: min(100%, 620px);
    }
    .ai-customer-service-combination-modal-field {
      display: block;
    }
    .ai-customer-service-combination-textarea {
      min-height: 220px;
    }
    .ai-customer-service-enabled-toggle {
      min-width: 76px;
      height: 34px;
      padding: 0 14px;
      border: 1px solid #9fd7b9;
      border-radius: 6px;
      background: #f0fdf6;
      color: #14935a;
      font: inherit;
      font-weight: 750;
      cursor: pointer;
    }
    .ai-customer-service-enabled-toggle.is-disabled {
      border-color: #ffc4c4;
      background: #fff5f5;
      color: #d64545;
    }
    .ai-customer-service-enabled-toggle:focus-visible {
      outline: none;
      box-shadow: 0 0 0 3px rgba(36, 84, 166, 0.12);
    }
    .ai-customer-service-reply-editor {
      display: grid;
      gap: 10px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fafbfc;
    }
    .ai-customer-service-reply-head {
      display: grid;
      grid-template-columns: minmax(180px, 220px);
      align-items: end;
      gap: 10px;
    }
    .ai-customer-service-reply-mode-field {
      min-width: 0;
    }
    .ai-customer-service-reply-mode-wrap {
      width: 100%;
    }
    .ai-customer-service-fixed-reply-field {
      gap: 8px;
    }
    .ai-customer-service-fixed-reply-field[hidden] {
      display: none;
    }
    .ai-customer-service-fixed-reply-field-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-width: 0;
    }
    .ai-customer-service-fixed-reply-preview-line {
      display: flex;
      align-items: center;
      min-height: 42px;
      width: 100%;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      overflow: hidden;
      min-width: 0;
    }
    .ai-customer-service-fixed-reply-modal {
      width: min(100%, 760px);
    }
    .ai-customer-service-fixed-reply-head {
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }
    .ai-customer-service-fixed-reply-table-wrap {
      max-height: min(58vh, 560px);
      overflow: auto;
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .ai-customer-service-fixed-reply-table {
      min-width: 0;
      table-layout: fixed;
    }
    .ai-customer-service-fixed-reply-content-col {
      width: 78%;
    }
    .ai-customer-service-fixed-reply-action-col {
      width: 22%;
    }
    .ai-customer-service-fixed-reply-table th,
    .ai-customer-service-fixed-reply-table td {
      vertical-align: middle;
    }
    .ai-customer-service-fixed-reply-table td {
      background: var(--panel);
    }
    .ai-customer-service-fixed-reply-content-cell {
      max-width: 100%;
    }
    .ai-customer-service-fixed-reply-table .config-preview {
      max-width: 100%;
    }
    .ai-customer-service-fixed-reply-content-modal {
      width: min(100%, 680px);
    }
    .ai-customer-service-fixed-reply-content-field {
      display: block;
    }
    .ai-customer-service-fixed-reply-content-textarea {
      min-height: 220px;
      resize: vertical;
    }
    .ai-customer-service-reply-statuses {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 6px;
      min-height: 34px;
    }
    .ai-customer-service-reply-statuses[hidden] {
      display: none;
    }
    .ai-customer-service-status-chip {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 30px;
      margin: 0;
      padding: 0 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      color: var(--text);
      font-size: 12px;
      font-weight: 750;
      cursor: pointer;
    }
    .ai-customer-service-status-chip input {
      width: 14px;
      height: 14px;
      margin: 0;
      accent-color: var(--accent);
    }
    .ai-customer-service-reply-block[hidden],
    .ai-customer-service-logic-reply-rows[hidden],
    .ai-customer-service-logic-reply-row[hidden] {
      display: none;
    }
    .ai-customer-service-logic-reply-rows {
      display: grid;
      gap: 8px;
    }
    .ai-customer-service-logic-reply-row {
      display: grid;
      grid-template-columns: 56px 88px minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
    }
    .ai-customer-service-logic-reply-status,
    .ai-customer-service-logic-reply-label {
      color: var(--muted);
      font-weight: 750;
      white-space: nowrap;
    }
    .ai-customer-service-logic-reply-preview-line {
      min-height: 38px;
      padding: 6px 10px;
    }
    .settings-checkbox {
      width: 18px;
      height: 18px;
      accent-color: var(--accent);
    }
    .compact-number-input {
      max-width: 160px;
    }
    .config-action-cell {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 34px;
    }
    .config-action-summary {
      color: var(--muted);
      font-weight: 700;
    }
    .inline-form-actions {
      justify-content: flex-end;
      padding-top: 12px;
    }
    .ai-customer-service-log-table {
      min-width: 980px;
      table-layout: fixed;
    }
    .ai-customer-service-group-col { width: 16%; }
    .ai-customer-service-trigger-col { width: 9%; }
    .ai-customer-service-message-col { width: 28%; }
    .ai-customer-service-reply-col { width: 32%; }
    .ai-customer-service-time-col { width: 15%; }
    .upstream-list-table {
      min-width: 1220px;
      table-layout: fixed;
    }
    .upstream-list-country-col { width: 5%; }
    .upstream-list-title-col { width: 15%; }
    .upstream-list-channel-col { width: 10%; }
    .upstream-list-business-col { width: 14%; }
    .upstream-list-rate-col { width: 10%; }
    .upstream-list-time-col { width: 11%; }
    .upstream-list-action-col { width: 14%; }
    .upstream-list-table th,
    .upstream-list-table td {
      vertical-align: middle;
    }
    .upstream-list-table .telegram-title-cell,
    .upstream-list-table .channel-name-cell {
      min-width: 0;
      max-width: none;
    }
    .upstream-channel-stack {
      display: flex;
      min-width: 0;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
    }
    .upstream-field-with-warning {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      max-width: 100%;
    }
    .plain-table-text-preview {
      display: block;
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .upstream-field-warning {
      display: inline-grid;
      flex: 0 0 auto;
      place-items: center;
      width: 16px;
      height: 16px;
      border: 1px solid #facc15;
      border-radius: 999px;
      background: #fffbeb;
      color: #b45309;
      font-size: 12px;
      font-weight: 700;
      line-height: 1;
      cursor: help;
    }
    .upstream-field-warning:focus-visible {
      outline: 2px solid rgba(245, 158, 11, 0.28);
      outline-offset: 2px;
    }
    .fee-warning-alert {
      margin: 12px 32px 0;
      padding: 10px 12px;
      border: 1px solid rgba(190, 120, 24, 0.38);
      border-radius: 8px;
      background: #fff8ed;
      color: #b86b12;
      font-size: 14px;
      font-weight: 700;
      line-height: 1.4;
    }
    .fee-warning-alert[hidden] {
      display: none;
    }
    .upstream-list-table .success-rate-heading {
      line-height: 1.2;
      white-space: nowrap;
    }
    .upstream-list-table .success-rate-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 400;
      color: var(--text);
    }
    .upstream-list-table .success-rate-cell.success-rate-good { color: var(--ok); }
    .upstream-list-table .success-rate-cell.success-rate-warn { color: var(--warn); }
    .upstream-list-table .success-rate-cell.success-rate-bad { color: var(--bad); }
    .upstream-list-table .success-rate-cell.success-rate-good,
    .upstream-list-table .success-rate-cell.success-rate-warn,
    .upstream-list-table .success-rate-cell.success-rate-bad {
      font-weight: 700;
    }
    .upstream-list-table .actions-cell.compact-actions {
      width: 166px;
      min-width: 166px;
    }
    .merchant-list-table {
      min-width: 1340px;
      table-layout: fixed;
    }
    .merchant-list-country-col { width: 6%; }
    .merchant-list-title-col { width: 18%; }
    .merchant-list-name-col { width: 12%; }
    .merchant-list-status-col { width: 8%; }
    .merchant-list-rate-col { width: 11%; }
    .merchant-list-time-col { width: 12%; }
    .merchant-list-action-col { width: 14%; }
    .merchant-list-table th,
    .merchant-list-table td {
      vertical-align: middle;
    }
    .merchant-list-table .telegram-title-cell {
      min-width: 0;
      max-width: none;
    }
    .merchant-list-table .merchant-name-cell {
      min-width: 0;
      max-width: 160px;
    }
    .merchant-list-table .success-rate-heading {
      line-height: 1.2;
      white-space: nowrap;
    }
    .merchant-list-table .success-rate-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 400;
      color: var(--text);
    }
    .merchant-list-table .success-rate-cell.success-rate-good { color: var(--ok); }
    .merchant-list-table .success-rate-cell.success-rate-warn { color: var(--warn); }
    .merchant-list-table .success-rate-cell.success-rate-bad { color: var(--bad); }
    .merchant-list-table .success-rate-cell.success-rate-good,
    .merchant-list-table .success-rate-cell.success-rate-warn,
    .merchant-list-table .success-rate-cell.success-rate-bad {
      font-weight: 700;
    }
    .merchant-list-table .actions-cell.compact-actions {
      width: 166px;
      min-width: 166px;
    }
    .merchant-config-table {
      min-width: 980px;
      table-layout: fixed;
    }
    .merchant-config-country-col { width: 10%; }
    .merchant-config-name-col { width: 20%; }
    .merchant-config-channel-col { width: 35%; }
    .merchant-config-table th,
    .merchant-config-table td {
      vertical-align: middle;
    }
    .merchant-config-table thead tr:first-child th:not(:last-child),
    .merchant-config-table .merchant-config-subhead th:first-child,
    .merchant-config-table tbody td:not(:last-child):not(.empty) {
      border-right: 1px solid #e5ebf3;
    }
    .merchant-config-table .merchant-config-group-head {
      border-bottom: 1px solid var(--line);
      text-align: center;
    }
    .merchant-config-table .merchant-config-subhead th {
      background: #fafbfc;
      padding-top: 4px;
      padding-bottom: 4px;
      white-space: nowrap;
    }
    .merchant-config-table .merchant-name-cell {
      min-width: 0;
      max-width: none;
    }
    .merchant-config-channel-cell {
      color: var(--text);
      padding: 8px;
      text-align: left;
      white-space: nowrap;
      vertical-align: middle;
    }
    .merchant-config-channel-content {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      width: 100%;
      max-width: 100%;
    }
    .merchant-config-channel-detail {
      display: grid;
      width: 100%;
      max-width: 100%;
      overflow: hidden;
      border: 1px solid #e5ebf3;
      border-radius: 6px;
      background: #ffffff;
      white-space: normal;
    }
    .merchant-config-channel-detail-payin {
      grid-template-columns: minmax(0, 1fr) 92px;
    }
    .merchant-config-channel-detail-payout {
      grid-template-columns: minmax(0, 1fr) 106px;
    }
    .merchant-config-channel-rows {
      min-width: 0;
    }
    .merchant-config-channel-rows-single {
      height: 100%;
    }
    .merchant-config-payin-row {
      display: grid;
      grid-template-columns: minmax(106px, 1.35fr) minmax(48px, 0.52fr) minmax(75px, 0.72fr) minmax(75px, 0.72fr);
      min-width: 0;
    }
    .merchant-config-payout-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      min-width: 0;
    }
    .merchant-config-channel-head-row.merchant-config-payin-row {
      grid-template-columns: minmax(106px, 1.35fr) minmax(48px, 0.52fr) minmax(75px, 0.72fr) minmax(75px, 0.72fr) 92px;
    }
    .merchant-config-channel-head-row.merchant-config-payout-row {
      grid-template-columns: minmax(0, 1fr) 106px;
    }
    .merchant-config-payin-row + .merchant-config-payin-row,
    .merchant-config-payout-row + .merchant-config-payout-row {
      border-top: 1px solid #edf1f7;
    }
    .merchant-config-payin-row span,
    .merchant-config-payout-row span {
      display: flex;
      align-items: center;
      min-width: 0;
      padding: 6px 9px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      color: var(--text);
      font-size: 13px;
      line-height: 1.25;
    }
    .merchant-config-payin-row span:not(:last-child),
    .merchant-config-payout-row span:not(:last-child) {
      border-right: 1px solid #edf1f7;
    }
    .merchant-config-channel-rows-single .merchant-config-payin-row,
    .merchant-config-channel-rows-single .merchant-config-payout-row {
      min-height: 100%;
    }
    .merchant-config-channel-action {
      display: flex;
      grid-column: 2;
      grid-row: 1;
      align-items: center;
      justify-content: center;
      min-width: 0;
      padding: 7px;
      border-left: 1px solid #edf1f7;
    }
    .merchant-config-channel-head-row {
      color: var(--muted);
      font-weight: 700;
    }
    .merchant-config-channel-head-row span {
      color: var(--muted);
      padding-top: 2px;
      padding-bottom: 2px;
    }
    .merchant-config-channel-cell .row-button {
      margin-left: 0;
    }
    .merchant-payin-channel-modal {
      width: 60vw;
      max-width: calc(100vw - 24px);
      min-height: min(72vh, 520px);
      max-height: calc(100vh - 36px);
      display: flex;
      flex-direction: column;
      padding: 18px 20px 20px;
    }
    .modal-backdrop.is-payout-config .merchant-payin-channel-modal {
      width: 36vw;
      min-width: min(560px, calc(100vw - 24px));
    }
    .merchant-payin-channel-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px;
      align-items: center;
      gap: 12px;
      min-height: 34px;
      margin-bottom: 10px;
    }
    .merchant-payin-channel-merchant {
      display: none;
    }
    .merchant-payin-channel-title-merchant {
      color: var(--bad);
    }
    .modal-subtitle {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
    }
    .modal-subtitle.merchant-payin-channel-merchant {
      margin: 0;
      color: var(--bad);
      font-size: 18px;
      font-weight: 800;
    }
    .modal-table-actions {
      display: flex;
      justify-content: flex-end;
      padding: 0 0 10px;
    }
    .modal-table-wrap {
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
      flex: 1 1 auto;
    }
    .merchant-payin-channel-table-wrap {
      position: relative;
      overflow: auto;
      padding-bottom: 56px;
    }
    .merchant-payin-channel-table {
      width: 100%;
      min-width: 0;
      table-layout: fixed;
    }
    .merchant-payin-channel-table th {
      height: 36px;
      padding-top: 6px;
      padding-bottom: 6px;
      vertical-align: middle;
    }
    .merchant-payin-channel-table td {
      height: 48px;
      padding-top: 8px;
      padding-bottom: 8px;
      vertical-align: middle;
    }
    .merchant-payin-channel-table tbody.has-config-rows {
      border-bottom: 1px solid var(--line);
    }
    .merchant-payin-channel-table th:not(:last-child),
    .merchant-payin-channel-table td:not(:last-child) {
      border-right: 1px solid #e5ebf3;
    }
    .merchant-payin-channel-table th:last-child,
    .merchant-payin-channel-table td:last-child {
      padding-left: 12px;
      padding-right: 12px;
      text-align: center;
    }
    .merchant-payin-channel-name-col {
      width: 34%;
    }
    .merchant-payin-channel-name-col-wide {
      width: 86%;
    }
    .merchant-payin-channel-weight-col {
      width: 16%;
    }
    .merchant-payin-channel-amount-col {
      width: 20%;
    }
    .merchant-payin-channel-action-col {
      width: 10%;
    }
    .merchant-payin-channel-action-col-wide {
      width: 14%;
    }
    .merchant-payin-channel-select-wrap {
      width: 100%;
      min-width: 0;
    }
    .merchant-payin-channel-select,
    .merchant-payin-channel-input {
      width: 100%;
      height: 32px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: #fff;
      color: var(--text);
      font: inherit;
      font-size: 12px;
    }
    .merchant-payin-channel-select {
      padding: 0 32px 0 12px;
      appearance: none;
    }
    .merchant-payin-channel-input {
      padding: 0 12px;
    }
    .merchant-payin-channel-table .actions-cell.compact-actions.merchant-payin-channel-row-actions {
      width: auto;
      min-width: 0;
      padding-left: 12px;
      padding-right: 12px;
      text-align: center;
      justify-content: center;
    }
    .merchant-payin-channel-row-actions .row-button {
      margin-left: 0;
    }
    .merchant-payin-channel-table .empty {
      height: 132px;
      text-align: center;
    }
    .merchant-payin-channel-add-wrap {
      position: absolute;
      right: 0;
      bottom: 11px;
      left: 0;
      display: flex;
      justify-content: center;
      pointer-events: none;
    }
    .merchant-payin-channel-add-button {
      width: 34px;
      height: 34px;
      position: relative;
      display: block;
      border: 1px solid #bfdbfe;
      border-radius: 50%;
      background: #eff6ff;
      color: var(--blue);
      font-size: 0;
      line-height: 1;
      font-weight: 400;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
      pointer-events: auto;
    }
    .merchant-payin-channel-add-button::before,
    .merchant-payin-channel-add-button::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 14px;
      height: 2px;
      border-radius: 999px;
      background: currentColor;
      transform: translate(-50%, -50%);
    }
    .merchant-payin-channel-add-button::after {
      width: 2px;
      height: 14px;
    }
    .merchant-payin-channel-add-button:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      box-shadow: none;
    }
    .merchant-payin-channel-add-button:hover {
      background: #dbeafe;
    }
    .merchant-payin-channel-add-button:disabled:hover {
      background: #eff6ff;
    }
    .merchant-payin-channel-save-wrap {
      position: absolute;
      right: 14px;
      bottom: 11px;
      display: flex;
      justify-content: flex-end;
    }
    .merchant-payin-channel-save-button {
      min-width: 72px;
      height: 36px;
    }
    .modal-save-button.merchant-payin-channel-save-button {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
    }
    .modal-save-button.merchant-payin-channel-save-button:hover {
      border-color: #9bbcf7;
      background: #dfeaff;
    }
    .monitor-upstream-board {
      background: transparent;
      border: 0;
      border-radius: 0;
      overflow: visible;
    }
    .monitor-country-tabs {
      display: inline-flex;
      align-items: flex-end;
      gap: 4px;
      padding-top: 5px;
      background: transparent;
    }
    .monitor-country-tabs-wrap {
      padding: 0 18px;
      border-bottom: 1px solid var(--line);
      background: #fafbfc;
    }
    .monitor-country-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 78px;
      height: 32px;
      margin-bottom: -1px;
      padding: 2px 20px 0;
      border: 1px solid var(--line);
      border-radius: 7px 7px 0 0;
      background: #eef2f7;
      color: var(--muted);
      font: inherit;
      font-weight: 700;
      cursor: pointer;
    }
    .monitor-country-tab.active {
      border-bottom-color: var(--panel);
      background: var(--panel);
      color: var(--accent);
    }
    .monitor-country-tab:not(.active):hover {
      color: var(--accent);
      background: #f5f7fb;
    }
    .monitor-upstream-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
      align-items: start;
    }
    .monitor-upstream-section {
      min-width: 0;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
    }
    .monitor-upstream-section + .monitor-upstream-section {
      border-left: 1px solid var(--line);
    }
    .monitor-upstream-table {
      min-width: 420px;
      table-layout: fixed;
    }
    .monitor-upstream-title-col { width: 28%; }
    .monitor-upstream-status-col { width: 20%; }
    .monitor-upstream-rate-col { width: 26%; }
    .monitor-upstream-payout-pending-col { width: 26%; }
    .monitor-upstream-payout-success-col { width: 26%; }
    .ai-sample-upstream-title-col { width: 18%; }
    .ai-sample-upstream-status-col { width: 11%; }
    .ai-sample-upstream-metric-col { width: 15%; }
    .ai-sample-upstream-weight-col { width: 13%; }
    .monitor-upstream-table th,
    .monitor-upstream-table td {
      vertical-align: middle;
    }
    .monitor-upstream-table .telegram-title-cell {
      min-width: 0;
      max-width: none;
    }
    .monitor-upstream-table .success-rate-heading {
      line-height: 1.2;
      white-space: nowrap;
    }
    .monitor-upstream-table .ai-weight-heading {
      white-space: nowrap;
    }
    .monitor-upstream-table .success-rate-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 400;
      color: var(--text);
    }
    .monitor-upstream-table .monitor-number-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
      color: var(--text);
    }
    .monitor-upstream-table .ai-weight-cell {
      font-weight: 700;
      color: var(--accent);
    }
    .monitor-upstream-table .success-rate-cell.success-rate-good { color: var(--ok); }
    .monitor-upstream-table .success-rate-cell.success-rate-warn { color: var(--warn); }
    .monitor-upstream-table .success-rate-cell.success-rate-bad { color: var(--bad); }
    .monitor-upstream-table .success-rate-cell.success-rate-good,
    .monitor-upstream-table .success-rate-cell.success-rate-warn,
    .monitor-upstream-table .success-rate-cell.success-rate-bad {
      font-weight: 700;
    }
    .monitor-merchant-table {
      min-width: 760px;
      table-layout: fixed;
    }
    .monitor-merchant-title-col { width: 18%; }
    .monitor-merchant-status-col { width: 13%; }
    .monitor-merchant-rate-col { width: 20%; }
    .monitor-merchant-count-col { width: 14.5%; }
    .ai-merchant-sample-table {
      min-width: 860px;
    }
    .ai-sample-merchant-title-col { width: 20%; }
    .ai-sample-merchant-status-col { width: 12%; }
    .ai-sample-merchant-rate-col { width: 19%; }
    .ai-sample-merchant-count-col { width: 14%; }
    .monitor-merchant-table th,
    .monitor-merchant-table td {
      vertical-align: middle;
    }
    .monitor-merchant-table .telegram-title-cell {
      min-width: 0;
      max-width: none;
    }
    .monitor-merchant-table .success-rate-heading {
      line-height: 1.2;
      white-space: nowrap;
    }
    .monitor-merchant-table .success-rate-cell,
    .monitor-merchant-table .monitor-number-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 400;
      color: var(--text);
    }
    .monitor-merchant-table .success-rate-cell.success-rate-good { color: var(--ok); }
    .monitor-merchant-table .success-rate-cell.success-rate-warn { color: var(--warn); }
    .monitor-merchant-table .success-rate-cell.success-rate-bad { color: var(--bad); }
    .monitor-merchant-table .success-rate-cell.success-rate-good,
    .monitor-merchant-table .success-rate-cell.success-rate-warn,
    .monitor-merchant-table .success-rate-cell.success-rate-bad {
      font-weight: 700;
    }
    .business-task-table {
      min-width: 720px;
      table-layout: fixed;
    }
    .exception-alert-table {
      min-width: 980px;
      table-layout: fixed;
    }
    .exception-alert-time-col { width: 16%; }
    .exception-alert-source-col { width: 20%; }
    .exception-alert-level-col { width: 10%; }
    .exception-alert-reason-col { width: 26%; }
    .exception-alert-detail-col { width: 28%; }
    .exception-alert-table th,
    .exception-alert-table td {
      vertical-align: middle;
    }
    .exception-source-cell,
    .exception-reason-cell,
    .exception-detail-cell {
      min-width: 0;
    }
    .exception-alert-table .message-preview,
    .exception-alert-table .table-text-preview {
      max-width: 100%;
    }
    .exception-alert-search-input {
      width: 360px;
      flex: 0 1 360px;
      min-width: 0;
      max-width: 100%;
    }
    .keyword-config-table {
      min-width: 1040px;
    }
    .auto-message-config-table {
      min-width: 980px;
    }
    .auto-message-list-table {
      min-width: 680px;
      table-layout: fixed;
    }
    .alert-list-table {
      min-width: 1260px;
      table-layout: fixed;
    }
    .channel-payout-stats-table {
      min-width: 1400px;
      table-layout: fixed;
    }
    .channel-payin-stats-table {
      min-width: 1180px;
      table-layout: fixed;
    }
    .channel-payin-stats-table th {
      white-space: nowrap;
      font-size: 12px;
    }
    .channel-payin-country-col { width: 6%; }
    .channel-payin-channel-col { width: 19%; }
    .channel-payin-count-col,
    .channel-payin-amount-col { width: 12.5%; }
    .merchant-payin-stats-table {
      min-width: 1320px;
    }
    .merchant-payin-country-col { width: 5%; }
    .merchant-payin-merchant-col { width: 13%; }
    .merchant-payin-channel-col { width: 15%; }
    .merchant-payin-count-col { width: 11%; }
    .merchant-payin-amount-col { width: 11.333%; }
    .channel-payin-number-cell {
      font-size: 12px;
      font-weight: 400;
      white-space: nowrap;
    }
    .channel-payin-stats-table .success-rate-cell.success-rate-good { color: var(--ok); }
    .channel-payin-stats-table .success-rate-cell.success-rate-warn { color: var(--warn); }
    .channel-payin-stats-table .success-rate-cell.success-rate-bad { color: var(--bad); }
    .channel-payin-stats-table .success-rate-cell.success-rate-good,
    .channel-payin-stats-table .success-rate-cell.success-rate-warn,
    .channel-payin-stats-table .success-rate-cell.success-rate-bad {
      font-weight: 700;
    }
    .channel-payout-stats-table th {
      white-space: nowrap;
      font-size: 12px;
    }
    .channel-payout-country-col { width: 4%; }
    .channel-payout-channel-col { width: 12%; }
    .channel-payout-count-col { width: 8%; }
    .channel-payout-amount-col { width: 8%; }
    .channel-payout-history-count-col { width: 11%; }
    .channel-payout-history-amount-col { width: 11%; }
    .channel-payout-number-cell {
      font-size: 12px;
      font-weight: 400;
      white-space: nowrap;
    }
    .channel-stats-time {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .channel-stats-time strong {
      color: var(--text);
      font-weight: 800;
    }
    .alert-country-col { width: 5%; }
    .alert-title-col { width: 18%; }
    .alert-channel-col { width: 14%; }
    .alert-notify-col { width: 8%; }
    .alert-time-col { width: 12%; }
    .alert-reminder-col { width: 19%; }
    .alert-original-col { width: 24%; }
    .config-country-col { width: 10%; }
    .config-business-col { width: 12%; }
    .config-status-col { width: 12%; }
    .keyword-config-table .config-keywords-col { width: 28%; }
    .keyword-config-table .config-exclude-contexts-col { width: 20%; }
    .keyword-config-table .config-count-col { width: 9%; }
    .keyword-config-table .config-actions-col { width: 12%; }
    .keyword-config-table .config-count-col,
    .keyword-config-table .config-count-cell,
    .keyword-config-table th:nth-child(5) {
      white-space: nowrap;
    }
    .auto-message-config-table .config-auto-message-col { width: 42%; }
    .auto-message-config-table .config-enabled-col { width: 12%; }
    .auto-message-config-table .config-actions-col { width: 14%; }
    .auto-message-config-table .config-enabled-cell {
      white-space: nowrap;
    }
    .auto-message-list-content-col { width: 78%; }
    .auto-message-list-action-col { width: 22%; }
    .keyword-config-table th,
    .keyword-config-table td,
    .auto-message-config-table th,
    .auto-message-config-table td,
    .auto-message-list-table th,
    .auto-message-list-table td {
      vertical-align: middle;
    }
    .auto-message-list-content-cell {
      max-width: 100%;
    }
    .modal-head-actions {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      margin-left: auto;
    }
    .auto-message-list-head {
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }
    .auto-message-list-modal .auto-message-list-head {
      margin-bottom: 8px;
    }
    .config-count-hint {
      margin-left: 10px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      white-space: nowrap;
    }
    .config-count-hint.no-margin {
      margin-left: 0;
    }
    .auto-message-list-table-wrap {
      max-height: min(50vh, 460px);
      overflow: auto;
      margin-top: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .auto-message-list-table td {
      vertical-align: middle;
      background: var(--panel);
    }
    .auto-message-list-table .config-preview {
      max-width: 100%;
    }
    .config-content-cell {
      max-width: 100%;
    }
    .config-preview {
      max-width: min(760px, 58vw);
    }
    .alert-list-table .alert-message-cell {
      width: auto;
      max-width: 100%;
    }
    .alert-list-table .country-cell,
    .alert-list-table .telegram-title-cell,
    .alert-list-table .channel-name-cell {
      width: auto;
      min-width: 0;
      max-width: none;
    }
    .alert-list-table th,
    .alert-list-table td,
    .channel-payin-stats-table th,
    .channel-payin-stats-table td,
    .channel-payout-stats-table th,
    .channel-payout-stats-table td {
      vertical-align: middle;
    }
    .channel-payout-stats-table .success-rate-heading {
      white-space: nowrap;
      line-height: 1.2;
    }
    .channel-payout-stats-table .success-rate-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
      font-weight: 400;
      color: var(--text);
    }
    .alert-list-table .alert-notify-cell {
      white-space: nowrap;
      font-weight: 400;
    }
    .alert-list-table .alert-time-cell {
      white-space: nowrap;
      font-size: 12px;
      line-height: 1.2;
    }
    .alert-list-table .message-preview,
    .alert-list-table .table-text-preview {
      max-width: 100%;
    }
    .settings-field {
      display: grid;
      gap: 8px;
      margin: 0;
      color: var(--muted);
      font-weight: 700;
    }
    .settings-field[hidden] {
      display: none;
    }
    .section-add-button {
      margin-left: 0;
    }
    .modal-form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      margin-top: 14px;
    }
    .modal-form-grid[hidden] {
      display: none;
    }
    .settings-input {
      height: 34px;
      padding: 0 10px;
    }
    .settings-input[readonly] {
      background: var(--panel-muted);
      color: var(--muted);
    }
    .upstream-edit-grid {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 12px 16px;
    }
    .upstream-edit-grid .settings-field {
      min-width: 0;
    }
    .upstream-edit-grid .settings-input,
    .upstream-edit-grid .modal-select-wrap,
    .upstream-edit-grid .search-select {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      flex: 0 0 auto;
    }
    .merchant-edit-grid .settings-field {
      min-width: 0;
    }
    .merchant-edit-grid .settings-input,
    .merchant-edit-grid .modal-select-wrap,
    .merchant-edit-grid .search-select {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      flex: 0 0 auto;
    }
    .upstream-detail-modal {
      max-width: 760px;
    }
    .detail-modal {
      max-width: 760px;
    }
    .upstream-detail-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px 14px;
      margin-top: 14px;
    }
    .detail-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px 14px;
      margin-top: 14px;
    }
    .detail-field {
      display: grid;
      gap: 6px;
      min-width: 0;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel-muted);
    }
    .detail-field span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .detail-field strong {
      min-width: 0;
      color: var(--text);
      font-size: 13px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .modal-select-wrap {
      width: 100%;
      height: 34px;
      flex: 1 1 auto;
    }
    .modal-field {
      margin-top: 14px;
    }
    .settings-textarea {
      width: 100%;
      min-height: 118px;
      resize: vertical;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      color: var(--text);
      font: inherit;
      font-weight: 500;
      line-height: 1.55;
      padding: 10px 11px;
    }
    .settings-textarea:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(36, 84, 166, 0.12);
    }
    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 900;
      display: grid;
      place-items: center;
      padding: 18px;
      background: rgba(15, 23, 42, 0.38);
    }
    .modal-backdrop[hidden] {
      display: none;
    }
    .keyword-manage-backdrop {
      z-index: 880;
    }
    .upstream-messages-backdrop {
      z-index: 880;
    }
    .alert-group-manage-backdrop {
      z-index: 880;
    }
    .alert-group-edit-backdrop {
      z-index: 940;
    }
    .settings-backdrop {
      z-index: 940;
    }
    .auto-message-list-backdrop {
      z-index: 930;
    }
    .exception-notice-backdrop {
      z-index: 980;
    }
    .password-change-backdrop {
      z-index: 980;
    }
    .ai-weight-log-backdrop {
      z-index: 940;
    }
    .ai-payin-weight-config-backdrop {
      z-index: 960;
    }
    .ai-customer-service-keyword-edit-backdrop {
      z-index: 960;
    }
    .ai-customer-service-combination-backdrop {
      z-index: 970;
    }
    .ai-customer-service-fixed-reply-backdrop {
      z-index: 970;
    }
    .ai-customer-service-fixed-reply-content-backdrop {
      z-index: 980;
    }
    .settings-modal {
      --modal-x-padding: 16px;
      width: min(100%, 620px);
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
      padding: 0 var(--modal-x-padding) 16px;
    }
    .settings-modal.merchant-payin-channel-modal {
      --modal-x-padding: 20px;
      width: 60vw;
      max-width: calc(100vw - 24px);
    }
    .keyword-manage-modal {
      width: min(100%, 980px);
      max-height: calc(100vh - 36px);
      display: flex;
      flex-direction: column;
    }
    .auto-message-list-modal {
      width: min(100%, 820px);
      max-height: calc(100vh - 36px);
      display: flex;
      flex-direction: column;
    }
    .upstream-messages-modal {
      width: min(100%, 1080px);
      max-height: calc(100vh - 36px);
      display: flex;
      flex-direction: column;
    }
    .alert-group-manage-modal {
      width: min(100%, 960px);
      max-height: calc(100vh - 36px);
      display: flex;
      flex-direction: column;
    }
    .alert-group-edit-modal {
      width: min(100%, 620px);
    }
    .exception-notice-modal {
      width: min(100%, 560px);
    }
    .password-change-modal {
      width: min(100%, 460px);
    }
    .google-auth-bind-modal {
      width: min(100%, 500px);
    }
    .google-auth-bind-body {
      display: grid;
      gap: 14px;
      margin-top: 14px;
    }
    .google-auth-qr {
      display: grid;
      place-items: center;
      min-height: 212px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #f8fafc;
    }
    .google-auth-qr svg {
      display: block;
      width: 192px;
      height: 192px;
    }
    .google-auth-qr-loading {
      color: var(--muted);
      font-weight: 700;
    }
    .google-auth-bind-body .settings-field {
      width: 100%;
      grid-template-columns: 118px minmax(0, 1fr);
      align-items: center;
    }
    .google-auth-code-input {
      width: 100%;
      text-align: center;
      letter-spacing: 4px;
      font-weight: 800;
    }
    .password-change-fields {
      display: grid;
      gap: 12px;
      margin-top: 14px;
    }
    .password-change-username {
      position: absolute;
      left: -9999px;
      top: 0;
      width: 1px;
      height: 1px;
      overflow: hidden;
      opacity: 0;
      pointer-events: none;
    }
    .password-change-fields .settings-input {
      width: 100%;
    }
    .password-change-error,
    .google-auth-bind-error {
      margin: 10px 0 0;
      color: var(--danger);
      font-size: 12px;
      font-weight: 700;
      line-height: 1.4;
    }
    .ai-weight-log-modal {
      width: min(100%, 950px);
      max-height: calc(100vh - 36px);
      display: flex;
      flex-direction: column;
    }
    .ai-weight-log-modal .modal-head {
      margin-bottom: 8px;
    }
    .ai-payin-weight-config-modal {
      width: min(100%, 460px);
    }
    .ai-payin-weight-config-grid .settings-field {
      min-width: 0;
    }
    .ai-payin-weight-config-grid .settings-input {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
    }
    .ai-auto-message-config-modal {
      width: min(100%, 600px);
    }
    .ai-customer-service-config-modal {
      width: min(100%, 920px);
    }
    .ai-customer-service-sub-modal {
      width: min(100%, 760px);
    }
    .ai-customer-service-keyword-add-modal {
      width: min(100%, 760px);
    }
    .ai-customer-service-keyword-add-field {
      display: grid;
      gap: 12px;
    }
    .ai-customer-service-keyword-form-field {
      display: grid;
      gap: 6px;
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 750;
    }
    .ai-customer-service-keyword-form-field .settings-input,
    .ai-customer-service-keyword-form-field .settings-textarea,
    .ai-customer-service-keyword-add-field .settings-input {
      width: 100%;
    }
    .ai-customer-service-keyword-edit-modal {
      width: min(100%, 760px);
    }
    .ai-customer-service-keyword-edit-field {
      display: grid;
      gap: 12px;
    }
    .ai-customer-service-keyword-edit-field .settings-input,
    .ai-customer-service-keyword-edit-field .settings-textarea {
      width: 100%;
    }
    .ai-customer-service-config-table-wrap {
      max-height: min(62vh, 560px);
      overflow: auto;
    }
    .ai-customer-service-keyword-table-wrap {
      border-bottom: 0;
      border-radius: 8px 8px 0 0;
      flex: 0 1 auto;
    }
    .ai-customer-service-config-stack > .table-footer {
      border-radius: 0;
    }
    .ai-customer-service-sub-modal .table-footer {
      border: 1px solid var(--line);
      border-top: 0;
      border-radius: 0 0 8px 8px;
    }
    .ai-auto-message-config-hint {
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }
    .ai-auto-message-config-hint span {
      display: block;
    }
    .ai-auto-message-config-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 16px;
    }
    .ai-auto-message-config-footer .modal-actions {
      margin-top: 0;
    }
    .ai-auto-message-enabled-button {
      min-width: 76px;
      color: #07844d;
      border-color: #9ce7bf;
      background: #ecfdf5;
    }
    .ai-auto-message-enabled-button.is-disabled {
      color: #9f2f2f;
      border-color: #fecaca;
      background: #fff1f2;
    }
    .ai-weight-log-tools {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin: 0 0 8px;
    }
    .ai-weight-log-status {
      flex: 1 1 auto;
      min-width: 0;
      color: var(--accent);
      font-size: 13px;
      font-weight: 700;
    }
    .ai-weight-config-button {
      min-width: 72px;
      height: 34px;
      padding: 0 14px;
    }
    .ai-payin-weight-auto-apply-button {
      min-width: 76px;
      color: #07844d;
      border-color: #9ce7bf;
      background: #ecfdf5;
    }
    .ai-payin-weight-auto-apply-button.is-disabled {
      color: #9f2f2f;
      border-color: #fecaca;
      background: #fff1f2;
    }
    .ai-weight-log-entries {
      height: min(55vh, 532px);
      margin-top: 0;
      overflow: auto;
      border: 1px solid #1f2937;
      border-radius: 8px;
      background: #111827;
      color: #e5edf7;
    }
    .ai-weight-log-entry {
      box-sizing: content-box;
      width: max-content;
      min-width: calc(100% - 14px);
      padding: 6px 7px;
      border-bottom: 1px solid rgba(229, 237, 247, 0.14);
    }
    .ai-weight-log-entry:last-child {
      border-bottom: 0;
    }
    .ai-weight-log-entry-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #ffffff;
      font-size: 11px;
      line-height: 1.3;
      min-width: max-content;
    }
    .ai-weight-log-entry-head strong {
      white-space: nowrap;
    }
    .ai-weight-log-entry-head span {
      color: #93c5fd;
      white-space: nowrap;
    }
    .ai-weight-log-final .ai-weight-log-entry-head span {
      color: #fbbf24;
    }
    .ai-weight-log-entry pre {
      margin: 4px 0 0;
      white-space: pre;
      overflow-wrap: normal;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
      font-size: 11px;
      line-height: 1.65;
    }
    .ai-weight-log-empty {
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 18px;
      text-align: center;
    }
    .exception-notice-body {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      margin-top: 14px;
    }
    .exception-notice-wide {
      grid-column: 1 / -1;
    }
    .alert-group-toolbar {
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 8px 8px 0 0;
    }
    .alert-group-search-input {
      flex: 0 1 360px;
      width: 360px;
      min-width: 0;
      max-width: 100%;
    }
    .alert-group-edit-input {
      width: 100%;
    }
    .alert-group-table-wrap {
      max-height: min(46vh, 420px);
      border: 1px solid var(--line);
      border-top: 0;
      overflow: auto;
    }
    .alert-group-table {
      min-width: 840px;
      table-layout: fixed;
    }
    .alert-group-table .telegram-title-cell {
      width: 28%;
      max-width: none;
    }
    .alert-group-template-cell {
      width: 38%;
      max-width: 100%;
    }
    .alert-group-table th:nth-child(3),
    .alert-group-table td:nth-child(3) {
      width: 20%;
    }
    .alert-group-table th:nth-child(4),
    .alert-group-table td:nth-child(4) {
      width: 14%;
    }
    .upstream-messages-modal .table-search {
      margin-top: 0;
      border: 1px solid var(--line);
      border-radius: 8px 8px 0 0;
    }
    .upstream-messages-table-wrap {
      max-height: min(56vh, 520px);
      border: 1px solid var(--line);
      border-top: 0;
      overflow: auto;
    }
    .upstream-messages-table-wrap table {
      min-width: 980px;
      table-layout: fixed;
    }
    .upstream-message-country-col { width: 7%; }
    .upstream-message-title-col { width: 24%; }
    .upstream-message-status-col { width: 10%; }
    .upstream-message-time-col { width: 18%; }
    .upstream-message-keyword-col { width: 12%; }
    .upstream-message-content-col { width: 29%; }
    .upstream-message-table th,
    .upstream-message-table td {
      vertical-align: middle;
    }
    .upstream-message-table .country-cell {
      width: auto;
      min-width: 0;
      white-space: nowrap;
    }
    .upstream-message-title-cell,
    .upstream-message-keyword-cell,
    .upstream-message-content-cell {
      min-width: 0;
    }
    .upstream-message-time-cell {
      white-space: nowrap;
      font-size: 12px;
      font-weight: 400;
    }
    .upstream-message-table .message-preview,
    .upstream-message-table .table-text-preview {
      max-width: 100%;
    }
    .upstream-messages-modal .table-footer {
      border: 1px solid var(--line);
      border-top: 0;
      border-radius: 0 0 8px 8px;
    }
    .keyword-manage-tools {
      margin-top: 0;
      border: 1px solid var(--line);
      border-radius: 8px 8px 0 0;
    }
    .keyword-manage-search-tools .search-input {
      width: 320px;
      flex: 0 1 320px;
    }
    .keyword-manage-table-wrap {
      max-height: min(54vh, 500px);
      border: 1px solid var(--line);
      border-top: 0;
      border-radius: 0;
      overflow: auto;
    }
    .keyword-manage-table-wrap table {
      min-width: 920px;
    }
    .keyword-manage-table-wrap .config-actions-col {
      width: 15%;
    }
    .keyword-manage-table-wrap th:last-child,
    .keyword-manage-table-wrap td:last-child {
      padding-right: 28px;
    }
    .keyword-manage-table-wrap .actions-cell.compact-actions {
      width: 170px;
      min-width: 170px;
    }
    .keyword-manage-modal .table-footer {
      border: 1px solid var(--line);
      border-top: 0;
      border-radius: 0 0 8px 8px;
    }
    .modal-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      box-sizing: border-box;
      height: 52px;
      min-height: 52px;
      margin: 0 calc(var(--modal-x-padding) * -1) 16px;
      padding: 0 var(--modal-x-padding);
      border-bottom: 1px solid var(--line);
      flex: 0 0 52px;
    }
    .keyword-manage-modal .modal-head,
    .upstream-messages-modal .modal-head,
    .alert-group-manage-modal .modal-head {
      margin-bottom: 10px;
    }
    h3 {
      margin: 0;
      font-size: 17px;
      font-weight: 750;
    }
    .modal-close-button {
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-radius: 50%;
      color: var(--muted);
      font-size: 20px;
      line-height: 1;
    }
    .modal-close-button:hover {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
    }
    .modal-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 14px;
    }
    .modal-button {
      height: 34px;
      padding: 0 14px;
      font-weight: 700;
    }
    .modal-save-button {
      color: #ffffff;
      border-color: var(--accent);
      background: var(--accent);
    }
    .modal-save-button:hover {
      background: #1d4790;
      border-color: #1d4790;
    }
    .modal-button:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .table-wrap { overflow-x: auto; }
    table { width: 100%; border-collapse: collapse; min-width: 1100px; }
    th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
    th { color: var(--muted); font-size: 12px; font-weight: 700; background: #fafbfc; }
    .management-table th,
    .management-table td {
      vertical-align: middle;
    }
    .list-time-cell {
      font-size: 12px;
      line-height: 1.2;
      font-weight: 400;
      white-space: nowrap;
    }
    tbody tr:last-child td { border-bottom: 0; }
    .actions-cell {
      width: 260px;
      min-width: 260px;
      white-space: nowrap;
    }
    .actions-cell.upstream-actions {
      width: 360px;
      min-width: 360px;
    }
    .actions-cell.compact-actions {
      width: 142px;
      min-width: 142px;
    }
    .row-select-wrap {
      position: relative;
      display: inline-flex;
      width: 90px;
      height: 30px;
      margin-right: 6px;
      vertical-align: middle;
    }
    .row-select-wrap::after {
      content: "";
      position: absolute;
      right: 9px;
      top: 50%;
      width: 0;
      height: 0;
      border-left: 4px solid transparent;
      border-right: 4px solid transparent;
      border-top: 5px solid var(--muted);
      transform: translateY(-25%);
      pointer-events: none;
    }
    .row-status-select {
      width: 100%;
      height: 30px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      color: var(--text);
      font: inherit;
      appearance: none;
      -webkit-appearance: none;
      padding: 0 26px 0 9px;
    }
    .country-cell {
      width: 64px;
      min-width: 64px;
      white-space: nowrap;
    }
    .telegram-title-cell {
      width: 250px;
      max-width: 250px;
    }
    .channel-name-cell {
      width: 150px;
      max-width: 150px;
    }
    .table-text-preview {
      max-width: 100%;
      font-size: 13px;
      line-height: 1.45;
    }
    .row-button {
      height: 30px;
      padding: 0 10px;
      margin-left: 4px;
      font-size: 12px;
      font-weight: 700;
      vertical-align: middle;
    }
    .row-button-primary {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
    }
    .row-button-secondary {
      color: var(--muted);
      border-color: var(--line);
      background: var(--panel);
    }
    .row-button-secondary:hover {
      color: var(--accent);
      border-color: var(--accent-border);
      background: var(--accent-soft);
    }
    .row-button-danger {
      color: var(--bad);
      border-color: #fecdd3;
      background: #fff1f2;
    }
    .auto-message-enabled-button {
      min-width: 68px;
      color: var(--ok);
      border-color: #bbf7d0;
      background: #f0fdf4;
    }
    .auto-message-disabled-button {
      min-width: 68px;
      color: var(--bad);
      border-color: #fecdd3;
      background: #fff7f7;
    }
    .scheduled-task-start-button {
      color: var(--ok);
      border-color: #bbf7d0;
      background: #f0fdf4;
    }
    .scheduled-task-stop-button {
      color: var(--bad);
      border-color: #fecdd3;
      background: #fff7f7;
    }
    .row-button:disabled {
      opacity: 0.55;
      cursor: not-allowed;
    }
    .table-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 48px;
      padding: 10px 14px;
      border-top: 1px solid var(--line);
      background: #fafbfc;
      color: var(--muted);
    }
    .page-info, .page-index {
      color: var(--muted);
      font-size: 12px;
      font-weight: 400;
      white-space: nowrap;
    }
    .pagination-controls {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .page-button {
      width: 28px;
      height: 28px;
      display: inline-grid;
      place-items: center;
      padding: 0;
      border-radius: 6px;
      font-size: 18px;
      font-weight: 800;
      line-height: 1;
    }
    .page-button:hover:not(:disabled) {
      border-color: var(--accent);
      color: var(--accent);
      background: #f4f7ff;
    }
    .page-button:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    .message-cell { width: 320px; max-width: 320px; }
    .message-preview {
      display: block;
      max-width: 320px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      cursor: help;
    }
    .message-tooltip {
      display: none;
      position: fixed;
      z-index: 1000;
      padding: 12px 14px;
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 8px;
      background: rgba(17, 24, 39, 0.88);
      color: #ffffff;
      box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
      white-space: pre-wrap;
      word-break: break-word;
      line-height: 1.55;
      font-size: 13px;
      pointer-events: none;
      opacity: 0;
      transform: translateY(2px);
      transition: opacity 120ms ease, transform 120ms ease;
    }
    .message-tooltip.visible { display: block; opacity: 1; transform: translateY(0); }
    .message-tooltip.message-tooltip-warning {
      border-color: #fde68a;
      background: #fffbeb;
      color: #92400e;
      box-shadow: 0 14px 34px rgba(146, 64, 14, 0.14);
      font-weight: 700;
    }
    .message-tooltip::before,
    .message-tooltip::after {
      content: "";
      position: absolute;
      left: var(--arrow-left, 24px);
      width: 0;
      height: 0;
      border-left: 7px solid transparent;
      border-right: 7px solid transparent;
      transform: translateX(-50%);
    }
    .message-tooltip[data-placement="bottom"]::before {
      top: -8px;
      border-bottom: 8px solid rgba(17, 24, 39, 0.88);
    }
    .message-tooltip[data-placement="bottom"]::after {
      top: -7px;
      border-bottom: 8px solid rgba(17, 24, 39, 0.88);
    }
    .message-tooltip.message-tooltip-warning[data-placement="bottom"]::before {
      border-bottom-color: #fde68a;
    }
    .message-tooltip.message-tooltip-warning[data-placement="bottom"]::after {
      border-bottom-color: #fffbeb;
      top: -6px;
    }
    .message-tooltip[data-placement="top"]::before {
      bottom: -8px;
      border-top: 8px solid rgba(17, 24, 39, 0.88);
    }
    .message-tooltip[data-placement="top"]::after {
      bottom: -7px;
      border-top: 8px solid rgba(17, 24, 39, 0.88);
    }
    .message-tooltip.message-tooltip-warning[data-placement="top"]::before {
      border-top-color: #fde68a;
    }
    .message-tooltip.message-tooltip-warning[data-placement="top"]::after {
      border-top-color: #fffbeb;
      bottom: -6px;
    }
    .empty { text-align: center; color: var(--muted); padding: 28px; }
    .empty-page-panel {
      min-height: 180px;
      display: grid;
      place-items: center;
      color: var(--muted);
      font-weight: 700;
      border-top: 1px solid var(--line);
      background: var(--panel);
    }
    .badge {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 2px 8px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 10.8px;
      border: 1px solid currentColor;
    }
    .badge.ok { color: var(--ok); background: #ecfdf5; }
    .badge.warn { color: var(--warn); background: #fffbeb; }
    .badge.bad { color: var(--bad); background: #fff1f2; }
    .badge.muted { color: var(--muted); background: #f8fafc; }
    .business-type-badge {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 2px 8px;
      border-radius: 999px;
      font-weight: 700;
      font-size: 10.8px;
      border: 1px solid currentColor;
    }
    .business-type-collection { color: #14935a; background: #ecfdf5; }
    .business-type-payout { color: #7c3aed; background: #f5f3ff; }
    .business-type-both { color: #2454a6; background: #eff6ff; }
    .upstream-business-status-stack {
      display: inline-flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      white-space: nowrap;
    }
    .upstream-business-status-stack > span,
    .upstream-business-status-pair {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }
    .settings-modal,
    .settings-modal :is(h3, label, span, strong, input, select, textarea, button, th, td, p, div) {
      font-weight: 400;
    }
    .login-shell {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 24px;
    }
    .login-box {
      width: min(100%, 360px);
      padding: 24px;
    }
    .login-box h1 { margin-bottom: 18px; }
    label { display: grid; gap: 6px; margin-top: 14px; color: var(--muted); }
    input {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 10px 11px;
      color: var(--text);
      font: inherit;
    }
    .login-box > button { width: 100%; margin-top: 18px; padding: 10px 14px; }
    .login-captcha-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 132px;
      gap: 10px;
      align-items: stretch;
    }
    .login-captcha-input {
      text-transform: uppercase;
      letter-spacing: 2px;
      font-weight: 700;
    }
    .login-captcha-button {
      width: 132px;
      min-width: 132px;
      height: 40px;
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: #eff6ff;
      overflow: hidden;
      cursor: pointer;
    }
    .login-captcha-button img {
      display: block;
      width: 132px;
      height: 40px;
    }
    .error {
      margin-bottom: 12px;
      color: var(--bad);
      background: #fff1f2;
      border: 1px solid #fecdd3;
      border-radius: 6px;
      padding: 9px 10px;
    }
    @media (max-width: 760px) {
      .topbar { align-items: flex-start; flex-wrap: wrap; padding: 11px 16px; }
      .topbar-brand { min-width: 0; }
      .topbar-nav { order: 3; flex: 1 1 100%; justify-content: flex-start; padding-left: 0; }
      .admin-nav { flex-wrap: wrap; min-width: 0; overflow: visible; }
      .nav-item { min-height: 36px; padding: 0 16px; font-size: 13px; }
      .nav-menu { left: 0; }
      .refresh-tools { width: 100%; justify-content: space-between; margin-left: 0; }
      main { padding: 8px; }
      .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .section-head { align-items: flex-start; flex-direction: column; }
      .table-search { align-items: stretch; flex-wrap: wrap; }
      .search-select-wrap { flex: 1 1 220px; width: auto; min-width: 0; }
      .search-select-wrap.country-search-wrap { flex: 1 1 140px; width: auto; min-width: 0; }
      .search-input { flex: 2 1 180px; width: auto; min-width: 0; }
      .modal-actions { align-items: stretch; flex-direction: column-reverse; }
      .modal-button { width: 100%; }
      .modal-form-grid { grid-template-columns: 1fr; }
      .google-auth-bind-body .settings-field { grid-template-columns: 1fr; }
      .ai-customer-service-reply-head,
      .ai-customer-service-logic-reply-row {
        grid-template-columns: 1fr;
      }
      .upstream-detail-grid { grid-template-columns: 1fr; }
      .detail-grid { grid-template-columns: 1fr; }
      .exception-notice-body { grid-template-columns: 1fr; }
      .monitor-upstream-grid { grid-template-columns: 1fr; }
      .monitor-upstream-section + .monitor-upstream-section {
        border-left: 0;
      }
      .table-footer { align-items: flex-start; flex-direction: column; }
      h1 { font-size: 20px; }
    }
  