:root {
  --navy: #0b1d2d;
  --navy-soft: #10283b;
  --primary: #0f9d90;
  --primary-dark: #087b72;
  --primary-soft: #e7f8f5;
  --mint: #c9f5ed;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e2e9f1;
  --line-strong: #d4dee9;
  --text: #142235;
  --text-soft: #33465b;
  --muted: #718096;
  --success: #07875f;
  --warning: #bd7b08;
  --danger: #cf3f3f;
  --shadow-sm: 0 4px 18px rgba(19, 38, 63, 0.05);
  --shadow-md: 0 14px 38px rgba(19, 38, 63, 0.08);
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 20px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-weight: 450;
}
button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.block { display: block; margin-top: 4px; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
}
.muted { color: var(--muted); }

/* Layout */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: 232px;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(22, 184, 166, 0.12), transparent 28%),
    linear-gradient(180deg, var(--navy), #071522 92%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 4px 22px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #1cc9b8, #0b877d);
  box-shadow: 0 10px 25px rgba(15, 157, 144, 0.24);
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.brand strong {
  display: block;
  font-size: 17px;
  font-weight: 680;
  letter-spacing: -0.015em;
}
.brand small {
  display: block;
  margin-top: 1px;
  color: #a9bac8;
  font-size: 11.5px;
  font-weight: 500;
}
.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  padding: 0 12px;
  color: #bed0de;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.nav-item span {
  width: 20px;
  color: #93b4c7;
  font-size: 15px;
  text-align: center;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}
.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.105);
  box-shadow: inset 3px 0 0 #35d8c6;
}
.nav-item.active span { color: #66e7d8; }
.sidebar-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 6px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user strong {
  display: block;
  font-size: 12.5px;
  font-weight: 680;
}
.sidebar-user small {
  display: block;
  margin-top: 1px;
  color: #9fb1bf;
  font-size: 11px;
  font-weight: 450;
}
.avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #dff9f4;
  color: #0b776d;
  font-size: 12px;
  font-weight: 700;
}
.avatar.large { width: 56px; height: 56px; flex-basis: 56px; font-size: 20px; }

.main-content { min-height: 100vh; margin-left: 232px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 24px;
  background: rgba(244, 247, 251, 0.9);
  border-bottom: 1px solid rgba(217, 226, 236, 0.86);
  backdrop-filter: blur(14px);
}
.topbar h1 {
  margin: 1px 0 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 680;
  letter-spacing: -0.025em;
}
.eyebrow {
  margin: 0;
  color: #0aa99b;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}
.top-actions { display: flex; align-items: center; gap: 8px; }
.mobile-menu { display: none; }
.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text-soft);
  cursor: pointer;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d6e0ea;
  border-radius: 999px;
  color: #526275;
  background: rgba(255, 255, 255, 0.9);
  font-size: 11.5px;
  font-weight: 680;
}
.live-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f2a613;
  box-shadow: 0 0 0 4px rgba(242, 166, 19, 0.12);
}
.live-pill.connected {
  color: #087356;
  border-color: #a9ead6;
  background: #effcf7;
}
.live-pill.connected i {
  background: #14b982;
  box-shadow: 0 0 0 4px rgba(20, 185, 130, 0.12);
}

.page-view { display: none; padding: 24px; }
.page-view.active { display: block; animation: pageIn 0.22s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Overview */
.hero-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 126px;
  padding: 25px 28px;
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(110deg, #0b2d3b 0%, #0e5f5b 52%, #118c7f 100%);
  box-shadow: var(--shadow-md);
}
.hero-panel::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 68%);
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel h2 {
  margin: 6px 0 5px;
  font-size: 27px;
  line-height: 1.17;
  font-weight: 680;
  letter-spacing: -0.035em;
}
.hero-panel p:not(.eyebrow) {
  margin: 0;
  color: #d8f0ed;
  font-size: 13px;
  font-weight: 450;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 17px 0;
}
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -23px;
  top: -28px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(145deg, #e1faf6, #c9f5ed);
}
.stat-card span,
.stat-card small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 450;
}
.stat-card strong {
  display: block;
  margin: 7px 0 3px;
  color: #101e30;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 670;
  letter-spacing: -0.035em;
}
.dashboard-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 15px; }

/* Panels */
.panel {
  margin-bottom: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.panel-heading {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}
.panel-heading.wrap { flex-wrap: wrap; }
.panel-heading h3 {
  margin: 0 0 3px;
  color: #122033;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 660;
  letter-spacing: -0.016em;
}
.panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 450;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.text-btn:hover { text-decoration: underline; }
.compact-list { padding: 3px 18px; }
.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 12px 1px;
  border-bottom: 1px solid #edf2f6;
}
.compact-row:last-child { border-bottom: 0; }
.compact-row strong {
  display: block;
  color: #182639;
  font-size: 12.5px;
  font-weight: 670;
}
.compact-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 450;
}
.align-right { text-align: right; }
.money { color: var(--success) !important; font-weight: 620 !important; }

/* Buttons and forms */
.btn {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.46; cursor: not-allowed; transform: none; }
.btn.primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 6px 16px rgba(15, 157, 144, 0.16);
}
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { color: #34465a; background: #edf2f7; }
.btn.ghost:hover { background: #e4ebf2; }
.btn.danger-soft { color: #b52e2e; background: #fee9e9; }
.btn.secondary { color: #26374a; border-color: var(--line); background: #fff; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 11px; }
.btn.wide { width: 100%; }

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(6, minmax(128px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 17px 19px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field span {
  color: #405167;
  font-size: 10.5px;
  font-weight: 680;
}
.field input,
.field select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: #fff;
  padding: 0 11px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 450;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input::placeholder { color: #9aa7b6; }
.field input:focus,
.field select:focus {
  border-color: #36b8ac;
  box-shadow: 0 0 0 3px rgba(15, 157, 144, 0.1);
}
.filter-actions { display: flex; gap: 7px; }
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.form-message { min-height: 19px; margin: 0; color: #bb2f2f; font-size: 12px; }

/* Tables */
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 960px; border-collapse: collapse; }
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
  font-weight: 450;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #68798c;
  background: #f8fafc;
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 680;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: #f9fcfc; }
tbody td strong { font-weight: 610; }
.notification-cell { max-width: 440px; color: #4a5d71; line-height: 1.45; }
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 680;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.status-badge.success { color: #08704f; background: #dff8eb; }
.status-badge.warning { color: #8b5d08; background: #fff1c9; }
.status-badge.muted { color: #56677a; background: #e9eef4; }
.status-badge.danger { color: #a82d2d; background: #fee6e6; }
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 58px;
  padding: 11px 17px;
}
.pagination span { min-width: 118px; color: var(--muted); text-align: center; font-size: 11.5px; }
.empty-state { padding: 31px 18px; color: var(--muted); text-align: center; font-size: 12.5px; }

/* Cards and settings */
.card-list { padding: 14px 18px; }
.item-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}
.item-card:hover { border-color: #cfdbe6; box-shadow: 0 7px 20px rgba(19, 38, 63, 0.05); }
.item-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 12px;
  color: #08786f;
  background: #e4f8f5;
  font-size: 12px;
  font-weight: 680;
}
.item-icon.dana { color: #0876a8; background: #e5f4fb; }
.item-main { min-width: 0; flex: 1; }
.item-title { display: flex; align-items: center; gap: 8px; }
.item-title strong { font-weight: 620; }
.item-main p { margin: 4px 0; color: #4c5f73; font-size: 12px; }
.item-main small { color: var(--muted); font-size: 10.5px; }
.item-actions,
.row-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.profile-box { display: flex; align-items: center; gap: 15px; padding: 22px; }
.profile-box h3 { margin: 0; font-size: 16px; font-weight: 620; }
.profile-box p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
#passwordForm { padding: 20px; }

/* Modal and feedback */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 15, 26, 0.61);
  backdrop-filter: blur(5px);
}
.modal {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 19px;
  background: #fff;
  padding: 25px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.25);
}
.modal h2 { margin: 4px 0 6px; font-size: 21px; font-weight: 650; }
.modal h3 { font-weight: 620; }
.modal-close {
  position: absolute;
  right: 13px;
  top: 11px;
  width: 33px;
  height: 33px;
  border: 0;
  border-radius: 50%;
  color: #405065;
  background: #eef2f6;
  font-size: 21px;
  cursor: pointer;
}
.token-box { display: flex; align-items: center; gap: 9px; margin: 18px 0; }
.token-box code {
  flex: 1;
  overflow-wrap: anywhere;
  padding: 14px;
  border-radius: 11px;
  color: #61e3d4;
  background: #101b2b;
  font-size: 11.5px;
}
.warning-box { margin-bottom: 14px; padding: 12px; border-radius: 10px; color: #91500c; background: #fff5df; font-size: 12px; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  max-width: 380px;
  padding: 12px 15px;
  border-radius: 11px;
  color: #fff;
  background: #142235;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s;
  font-size: 12.5px;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #9c2929; }
.mini-link {
  display: block;
  margin-top: 5px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.mini-link:hover { text-decoration: underline; }

/* Login */
.login-page { min-height: 100vh; background: linear-gradient(135deg, #071522, #0c625c); }
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 68px;
  max-width: 1160px;
  margin: auto;
  padding: 48px;
}
.login-brand { color: #fff; }
.login-brand .brand-mark { width: 58px; height: 58px; margin-bottom: 22px; font-size: 18px; }
.login-brand h1 {
  max-width: 670px;
  margin: 8px 0 15px;
  font-size: 45px;
  line-height: 1.08;
  font-weight: 680;
  letter-spacing: -0.045em;
}
.login-brand > p:not(.eyebrow) { max-width: 600px; color: #cae8e4; font-size: 16px; line-height: 1.65; }
.login-points { display: flex; flex-direction: column; gap: 9px; margin-top: 25px; color: #d9f2ef; font-size: 13px; }
.login-card { border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 22px; background: #fff; padding: 31px; box-shadow: 0 28px 90px rgba(0, 0, 0, 0.23); }
.login-card h2 { margin: 6px 0; font-size: 22px; font-weight: 650; }
.login-card .stack-form { margin-top: 22px; }

/* Responsive */
@media (max-width: 1280px) {
  .filters { grid-template-columns: repeat(4, minmax(145px, 1fr)); }
  .field.grow { grid-column: span 2; }
  .filter-actions { grid-column: span 2; }
}
@media (max-width: 1020px) {
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
  .login-shell { gap: 35px; padding: 35px; }
  .login-brand h1 { font-size: 38px; }
}
@media (max-width: 760px) {
  .sidebar {
    width: 238px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 45px rgba(0, 0, 0, 0.2);
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { min-height: 64px; padding: 10px 14px; }
  .mobile-menu { display: inline-flex; }
  .topbar > div:first-of-type { flex: 1; }
  .topbar h1 { font-size: 19px; }
  .top-actions .btn.ghost, .live-pill { display: none; }
  .page-view { padding: 14px; }
  .hero-panel { min-height: auto; align-items: flex-start; flex-direction: column; padding: 22px; }
  .hero-panel h2 { font-size: 24px; }
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .stat-card { min-height: 94px; }
  .filters { grid-template-columns: 1fr; }
  .field.grow, .filter-actions { grid-column: auto; }
  .filter-actions .btn { flex: 1; }
  .item-card { align-items: flex-start; flex-wrap: wrap; }
  .item-actions { width: 100%; }
  .panel-heading { align-items: flex-start; }
  .pagination { justify-content: center; flex-wrap: wrap; }
  .login-shell { display: block; padding: 18px; }
  .login-brand { display: none; }
  .login-card { margin: 8vh auto 0; padding: 24px; }
  .token-box { flex-direction: column; align-items: stretch; }
}


/* Token status dashboard */
.status-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 17px;
}
.status-summary-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.status-summary-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -28px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  opacity: 0.72;
}
.status-summary-card.online::after { background: #c9f6e4; }
.status-summary-card.idle::after { background: #ffe9b8; }
.status-summary-card.active::after { background: #ccefeb; }
.status-summary-card.never::after { background: #e4eaf1; }
.status-summary-card span,
.status-summary-card small {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 520;
}
.status-summary-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 8px 0 4px;
  color: #101e30;
  font-size: 27px;
  line-height: 1.1;
  font-weight: 720;
  letter-spacing: -0.035em;
}
.status-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}
.field.compact { min-width: 220px; }
.field.compact select { height: 38px; }
.status-info {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 18px 4px;
  padding: 10px 12px;
  border: 1px solid #dceae7;
  border-radius: 11px;
  color: #526579;
  background: #f5fbfa;
  font-size: 11.5px;
  font-weight: 520;
}
.status-info i {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 157, 144, 0.1);
}
.token-status-table { min-width: 1180px; }
.device-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #17273a;
  font-weight: 650;
}
.activity-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #9aa7b5;
}
.activity-dot.online {
  background: #17b982;
  box-shadow: 0 0 0 4px rgba(23, 185, 130, 0.11);
}
.activity-dot.idle {
  background: #eca823;
  box-shadow: 0 0 0 4px rgba(236, 168, 35, 0.11);
}
.activity-dot.never { background: #9aa7b5; }
.activity-dot.disabled { background: #d44b4b; }

@media (max-width: 1020px) {
  .status-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .status-summary-grid { grid-template-columns: 1fr; gap: 10px; }
  .status-summary-card { min-height: 98px; }
  .status-toolbar { width: 100%; align-items: stretch; flex-direction: column; }
  .field.compact { min-width: 0; }
  .status-toolbar .btn { width: 100%; }
}

/* KangPay Continuous Robot v1.4.0 */
.robot-top-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:18px}.robot-status-card{background:#fff;border:1px solid var(--line,#dce4ee);border-radius:18px;padding:20px;box-shadow:0 10px 30px rgba(15,35,55,.06)}.robot-status-card span{display:block;font-size:12px;font-weight:700;color:#64748b;margin-bottom:8px}.robot-status-card strong{display:block;font-size:23px;font-weight:750;letter-spacing:-.02em;color:#102033}.robot-status-card small{display:block;margin-top:6px;color:#7b8798;font-weight:500}.robot-state-text.success{color:#07866f}.robot-state-text.warning{color:#c27800}.robot-state-text.danger{color:#c73535}.robot-state-text.muted{color:#64748b}.robot-control-panel{margin-bottom:18px}.robot-actions{display:flex;align-items:end;gap:10px;flex-wrap:wrap}.robot-alert{margin:0 20px 20px;padding:13px 15px;border-radius:12px;background:#eef4f8;color:#526071;font-weight:600}.robot-alert.success{background:#e9fbf4;color:#087a63}.robot-alert.error{background:#fff0f0;color:#b72e2e}.robot-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(340px,.75fr);gap:18px;margin-bottom:18px}.form-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.check-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check-grid label{display:flex;align-items:center;gap:9px;padding:12px;border:1px solid #dbe4ed;border-radius:12px;font-weight:650;color:#344154}.advanced-box{border:1px solid #dbe4ed;border-radius:12px;background:#f8fafc}.advanced-box summary{cursor:pointer;padding:13px 15px;font-weight:700;color:#425066}.advanced-box .inner{padding:0 15px 15px}.mapping-form{display:flex;align-items:end;gap:10px;padding:0 20px 18px}.mapping-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:13px 15px;border:1px solid #e1e8ef;border-radius:13px;background:#fff}.mapping-row strong,.mapping-row small{display:block}.mapping-row small{margin-top:4px;color:#718096}.robot-log{max-height:360px;overflow:auto;padding:0 20px 20px}.robot-log-row{display:grid;grid-template-columns:155px minmax(0,1fr) 150px;gap:14px;align-items:center;padding:11px 12px;border-bottom:1px solid #e8edf2}.robot-log-row span,.robot-log-row small{font-size:12px;color:#7a8797}.robot-log-row strong{font-weight:650;color:#233044}.robot-log-row.success{border-left:3px solid #16a085}.robot-log-row.warning{border-left:3px solid #e7a31a}.robot-log-row.error{border-left:3px solid #df4d4d}.btn.success{background:#0f9b82;color:#fff}.btn.danger{background:#d63f3f;color:#fff}.btn.small{padding:7px 10px;font-size:12px;border-radius:9px}.block{display:block;margin-top:4px}body,button,input,select{font-weight:500}.nav-item,.btn,.panel-heading h3,table th,.field>span{font-weight:650}.compact-row strong,table td strong{font-weight:650}
@media(max-width:1100px){.robot-top-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.robot-layout{grid-template-columns:1fr}.form-three{grid-template-columns:1fr 1fr}.robot-log-row{grid-template-columns:130px minmax(0,1fr)}}
@media(max-width:700px){.robot-top-grid,.form-two,.form-three,.check-grid{grid-template-columns:1fr}.robot-actions,.mapping-form{align-items:stretch;flex-direction:column}.robot-actions .btn,.mapping-form .btn{width:100%}.robot-log-row{grid-template-columns:1fr;gap:3px}}


.robot-live-warning{margin:0 18px 14px;padding:12px 14px;border:1px solid #fecaca;border-radius:12px;background:#fff1f2;color:#9f1239;font-size:13px;line-height:1.5}.robot-live-warning strong{font-weight:900}.status-badge.warning{background:#fff7ed;color:#c2410c;border-color:#fed7aa}

/* KangPay CAPTCHA Relay + Test Run v1.4.2 */
.robot-auth-test-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-bottom:18px}.captcha-relay{padding:0 20px 20px}.captcha-preview-wrap{min-height:94px;display:flex;align-items:center;justify-content:center;padding:14px;border:1px dashed #cfd9e5;border-radius:14px;background:#f8fafc}.captcha-preview{display:block;max-width:100%;max-height:120px;object-fit:contain;border-radius:8px;image-rendering:auto}.captcha-meta{display:flex;flex-direction:column;gap:4px;margin:13px 0}.captcha-meta strong{color:#203046}.captcha-meta small{color:#6b7788}.captcha-form{display:flex;align-items:end;gap:10px}.captcha-form .grow{flex:1}.test-run-panel{overflow:hidden}.test-run-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.45fr) auto;gap:10px;align-items:end;padding:0 20px 20px}.test-run-result{margin:0 20px 20px;padding:12px 14px;border:1px solid #dbe4ed;border-radius:12px;background:#f8fafc;color:#526071;font-weight:650;line-height:1.45}.test-run-result.success{border-color:#b7ead8;background:#ecfbf5;color:#087a63}.test-run-result.warning{border-color:#f6dca8;background:#fff9ed;color:#9a6500}.test-run-result.error{border-color:#f2c2c2;background:#fff1f1;color:#b72e2e}
@media(max-width:1100px){.robot-auth-test-grid{grid-template-columns:1fr}.test-run-form{grid-template-columns:1fr 1fr}.test-run-form .btn{grid-column:1/-1}}
@media(max-width:700px){.captcha-form,.test-run-form{display:flex;flex-direction:column;align-items:stretch}.captcha-form .btn,.test-run-form .btn{width:100%}}

/* KangPay Browser Bridge v1.5.0 */
.bridge-setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.bridge-step-box{padding:18px}.bridge-steps{margin:16px 0 0;padding-left:22px;color:#536174}.bridge-steps li{margin:7px 0}.bridge-steps code{background:#edf2f7;border-radius:6px;padding:2px 6px}.token-prefix-box{display:flex;align-items:center;justify-content:space-between;padding:14px;border:1px solid #d9e3ef;border-radius:12px;background:#f8fbfe}.token-prefix-box span{font-size:12px;color:#6a788e}.token-prefix-box strong{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.bridge-token-result{padding:14px;border-radius:12px;background:#ecfdf7;border:1px solid #9ee8d6}.bridge-token-result small{display:block;margin-top:8px;color:#49665f}.bridge-browser-status{display:grid;gap:12px;padding:18px}.bridge-browser-status>div{padding:13px;border:1px solid #dce5ef;border-radius:12px;background:#f8fbfe}.bridge-browser-status span{display:block;font-size:11px;color:#718096;margin-bottom:5px;text-transform:uppercase;letter-spacing:.06em}.bridge-browser-status strong{display:block;word-break:break-all}.success-text{color:#0b8d7f}.warning-text{color:#b7791f}.test-run-result.success{background:#e8fbf6;border-color:#a6eadc;color:#08796d}.test-run-result.warning{background:#fff8e7;border-color:#f0d28a;color:#8a5a00}.test-run-result.danger{background:#fff0f0;border-color:#f3b0b0;color:#9b1c1c}@media(max-width:1000px){.bridge-setup-grid{grid-template-columns:1fr}}@media(max-width:680px){.bridge-setup-grid{gap:12px}.bridge-step-box{padding:14px}}
