@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Public+Sans:wght@300;400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --sidebar: #405189;
  --sidebar-text: #abb9e8;
  --sidebar-title: #838fb9;
  --sidebar-active: rgba(255, 255, 255, 0.12);
  --body-bg: #f3f3f9;
  --card-bg: #fff;
  --topbar-bg: #fff;
  --search-bg: #f3f3f9;
  --text: #495057;
  --heading: #343a40;
  --muted: #878a99;
  --border: #e9ebec;
  --primary: #405189;
  --success: #0ab39c;
  --info: #299cdb;
  --warning: #f7b84b;
  --danger: #f06548;
  --purple: #6559cc;
  --shadow: 0 1px 2px rgba(56, 65, 74, 0.08);
  --font-main: "Poppins", "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --sidebar: #222b45;
  --sidebar-text: #b7c1e6;
  --sidebar-title: #8c98c7;
  --sidebar-active: rgba(255, 255, 255, 0.1);
  --body-bg: #111827;
  --card-bg: #182235;
  --topbar-bg: #182235;
  --search-bg: #202b3f;
  --text: #cbd5e1;
  --heading: #f1f5f9;
  --muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.18);
  --primary: #7483d5;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  min-width: 1360px;
  margin: 0;
  background: var(--body-bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  transition: grid-template-columns 0.2s ease;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-text);
}

.sidebar-logo {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  color: #fff;
  text-decoration: none;
  transition: padding 0.2s ease;
}

.sidebar-logo img {
  display: block;
  width: 172px;
  max-width: 100%;
  height: 44px;
  object-fit: contain;
  object-position: left center;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px 18px;
  overflow-y: auto;
}

.nav-label {
  margin: 16px 12px 8px;
  color: var(--sidebar-title);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
}

.nav-link,
.nav-sub {
  text-decoration: none;
}

.nav-link {
  min-height: 44px;
  border-radius: 4px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: var(--sidebar-text);
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.nav-link b {
  min-width: 19px;
  height: 19px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  background: var(--success);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

.nav-sub {
  min-height: 32px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 5px 12px 5px 44px;
  color: rgba(203, 213, 247, 0.78);
  font-size: 13px;
  font-weight: 600;
}

.nav-sub:hover,
.nav-sub.active {
  color: #fff;
}

.nav-sub.nav-sub-collapsed {
  display: none;
}

.nav-icon,
.header-icon span,
.metric-soft-icon,
.search-icon,
.calendar-mark,
.calendar-caret {
  position: relative;
  display: inline-block;
}

.nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.88;
  background: currentColor;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.dashboard-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='8' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='15' width='7' height='6' rx='1.5'/%3E%3C/svg%3E");
}

.device-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2.5' width='10' height='19' rx='2.5'/%3E%3Cpath d='M10 18h4'/%3E%3Cpath d='M11 5h2'/%3E%3C/svg%3E");
}

.node-token-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='14' rx='2'/%3E%3Cpath d='M8 21h8'/%3E%3Cpath d='M12 18v3'/%3E%3Ccircle cx='9' cy='11' r='2'/%3E%3Cpath d='M11 11h5'/%3E%3Cpath d='M15 11v2'/%3E%3C/svg%3E");
}

.map-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6.5l6-3 6 3 6-3v14l-6 3-6-3-6 3z'/%3E%3Cpath d='M9 3.5v14'/%3E%3Cpath d='M15 6.5v14'/%3E%3C/svg%3E");
}

.wallet-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 7.5h15A2.5 2.5 0 0 1 21 10v8a2.5 2.5 0 0 1-2.5 2.5h-13A2.5 2.5 0 0 1 3 18V6a2.5 2.5 0 0 1 2.5-2.5H17'/%3E%3Cpath d='M16 13h5'/%3E%3Cpath d='M18.5 13.2v-.4'/%3E%3C/svg%3E");
}

.share-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='12' r='2.5'/%3E%3Ccircle cx='18' cy='6' r='2.5'/%3E%3Ccircle cx='18' cy='18' r='2.5'/%3E%3Cpath d='M8.2 10.8l7.6-3.6'/%3E%3Cpath d='M8.2 13.2l7.6 3.6'/%3E%3C/svg%3E");
}

.support-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 0 1 16 0'/%3E%3Cpath d='M4 12v4a2 2 0 0 0 2 2h2v-7H6a2 2 0 0 0-2 2'/%3E%3Cpath d='M20 12v4a2 2 0 0 1-2 2h-2v-7h2a2 2 0 0 1 2 2'/%3E%3Cpath d='M13 19h2a3 3 0 0 0 3-3'/%3E%3C/svg%3E");
}

.order-icon {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h2l2.2 10.2a2 2 0 0 0 2 1.6h6.9a2 2 0 0 0 1.9-1.4L21 8H7'/%3E%3Ccircle cx='10' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3C/svg%3E");
}

.nav-sub::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.86;
  -webkit-mask: var(--nav-icon) center / contain no-repeat;
  mask: var(--nav-icon) center / contain no-repeat;
}

.nav-sub[data-admin-view="dashboard"]::before {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l3-7 4 14 3-7h4'/%3E%3C/svg%3E");
}

.nav-sub[data-table-target="users"]::before {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3'/%3E%3Cpath d='M3.5 20a5.5 5.5 0 0 1 11 0'/%3E%3Cpath d='M16 11a3 3 0 0 0 0-6'/%3E%3Cpath d='M18 20a5 5 0 0 0-3-4.5'/%3E%3C/svg%3E");
}

.nav-sub[data-table-target="orders"]::before {
  --nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h10a2 2 0 0 1 2 2v16l-3-2-3 2-3-2-3 2-3-2V5a2 2 0 0 1 2-2'/%3E%3Cpath d='M8 8h8'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
}

.nav-caret {
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.16s ease;
}

.nav-link.nav-group-collapsed .nav-caret {
  transform: rotate(-45deg);
}

.sidebar-footer {
  height: 54px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 500;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar-logo {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .sidebar-logo img {
  display: none;
}

body.sidebar-collapsed .sidebar-logo::after {
  content: "AZ";
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}

body.sidebar-collapsed .sidebar-nav {
  padding: 14px 10px 18px;
}

body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-sub,
body.sidebar-collapsed .nav-link > span:not(.nav-icon),
body.sidebar-collapsed .nav-caret,
body.sidebar-collapsed .sidebar-footer span:not(.status-dot),
body.sidebar-collapsed .sidebar-footer small {
  display: none;
}

body.sidebar-collapsed .nav-link {
  position: relative;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0;
  padding: 0;
}

body.sidebar-collapsed .nav-icon {
  width: 20px;
  height: 20px;
}

body.sidebar-collapsed .nav-link b {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 9px;
}

body.sidebar-collapsed .sidebar-footer {
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 0;
}

body.sidebar-collapsed .sidebar-toggle {
  background: var(--search-bg);
  color: var(--primary);
}

.app-main {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: 70px minmax(0, 1fr);
}

.app-main[data-view="topology"],
.app-main[data-view="nodeActivation"],
.app-main[data-view="data"] {
  grid-template-columns: minmax(0, 1fr);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 25;
  grid-column: 1 / -1;
  height: 70px;
  display: grid;
  grid-template-columns: 44px minmax(220px, 360px) 1fr;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(56, 65, 74, 0.02);
}

.header-search {
  width: 320px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--search-bg);
}

.header-search:focus-within {
  border-color: rgba(64, 81, 137, 0.28);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.header-search input::placeholder {
  color: #9ca3af;
}

.search-icon {
  width: 13px;
  height: 13px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -2px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  background: var(--topbar-bg);
}

.header-icon,
.action-btn.square {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  overflow: hidden;
}

.header-icon:hover,
.header-menu.open > .header-icon,
.action-btn.square:hover {
  background: var(--search-bg);
  color: var(--primary);
}

#themeToggle {
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f3f6f9;
  color: #6b7280;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

#themeToggle:hover {
  background: #eef2ff;
  color: var(--primary);
}

body[data-theme="dark"] #themeToggle {
  border-color: rgba(148, 163, 184, 0.18);
  background: #172033;
  color: #f7c948;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 8px 22px rgba(0, 0, 0, 0.16);
}

body[data-theme="dark"] #themeToggle:hover {
  background: #1d2940;
  color: #ffd166;
}

.flag-button {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.line-icon,
.cart-icon,
.bell-icon,
.moon-icon,
.refresh-icon,
.calendar-mark,
.calendar-caret {
  width: 18px;
  height: 18px;
}

.line-icon,
.line-icon::before,
.line-icon::after {
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.line-icon::before,
.line-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
}

.line-icon::before {
  top: -6px;
}

.line-icon::after {
  top: 6px;
}

.cart-icon {
  width: 21px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.7'/%3E%3Ccircle cx='18' cy='20' r='1.7'/%3E%3Cpath d='M2.8 3.7h2.8l2.6 11.7a2.2 2.2 0 0 0 2.2 1.7h7.2a2.2 2.2 0 0 0 2.1-1.6l1.5-6.8H7.1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.7'/%3E%3Ccircle cx='18' cy='20' r='1.7'/%3E%3Cpath d='M2.8 3.7h2.8l2.6 11.7a2.2 2.2 0 0 0 2.2 1.7h7.2a2.2 2.2 0 0 0 2.1-1.6l1.5-6.8H7.1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bell-icon {
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8.2a6 6 0 0 0-12 0c0 7-3 7.8-3 7.8h18s-3-.8-3-7.8'/%3E%3Cpath d='M9.8 20a2.5 2.5 0 0 0 4.4 0'/%3E%3Cpath d='M12 2.3v1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8.2a6 6 0 0 0-12 0c0 7-3 7.8-3 7.8h18s-3-.8-3-7.8'/%3E%3Cpath d='M9.8 20a2.5 2.5 0 0 0 4.4 0'/%3E%3Cpath d='M12 2.3v1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.moon-icon {
  width: 20px;
  height: 20px;
  display: block;
  background: currentColor;
  border-radius: 0;
  box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21.2 14.8a8.3 8.3 0 0 1-11.9-10 8.7 8.7 0 1 0 11.9 10Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21.2 14.8a8.3 8.3 0 0 1-11.9-10 8.7 8.7 0 1 0 11.9 10Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

body[data-theme="dark"] .moon-icon {
  border: 0;
  background: currentColor;
  box-shadow: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4.4'/%3E%3Cpath d='M12 2.4v2.2M12 19.4v2.2M4.6 4.6l1.6 1.6M17.8 17.8l1.6 1.6M2.4 12h2.2M19.4 12h2.2M4.6 19.4l1.6-1.6M17.8 6.2l1.6-1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4.4'/%3E%3Cpath d='M12 2.4v2.2M12 19.4v2.2M4.6 4.6l1.6 1.6M17.8 17.8l1.6 1.6M2.4 12h2.2M19.4 12h2.2M4.6 19.4l1.6-1.6M17.8 6.2l1.6-1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.refresh-icon {
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon::after {
  content: "";
  position: absolute;
  right: 0;
  top: 1px;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.badge.info {
  background: var(--info);
}

.badge.danger {
  background: var(--danger);
}

.header-menu {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 47px;
  right: 0;
  z-index: 40;
  width: 340px;
  max-height: 430px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: none;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 5px 10px rgba(30, 32, 37, 0.12);
}

.header-menu.open .dropdown-panel,
.dropdown-panel[aria-hidden="false"] {
  display: block;
}

.dropdown-head {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.dropdown-head strong {
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

.dropdown-head span {
  color: var(--muted);
  font-size: 12px;
}

.dropdown-list {
  max-height: 338px;
  padding: 8px;
  overflow: auto;
}

.dropdown-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: 4px;
}

.dropdown-item:hover {
  background: var(--search-bg);
}

.dropdown-avatar,
.activity-dot,
.product-thumb {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}

.dropdown-avatar,
.activity-dot {
  background: linear-gradient(135deg, #405189 0%, #299cdb 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.product-thumb {
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
}

.dropdown-avatar {
  width: 34px;
  height: 34px;
}

.dropdown-avatar img,
img.dropdown-avatar,
img.activity-dot {
  display: block;
  object-fit: cover;
}

.dropdown-avatar.warn {
  background: linear-gradient(135deg, #f7b84b 0%, #f06548 100%);
  color: #fff;
}

.dropdown-avatar.danger {
  background: linear-gradient(135deg, #f06548 0%, #d9482f 100%);
  color: #fff;
}

.dropdown-item strong,
.activity-item strong,
.support-item strong,
.product-title strong {
  display: block;
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
}

.activity-item strong,
.support-item strong,
.product-title strong,
.product-title span {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-sidebar .activity-item strong,
.activity-sidebar .support-item strong {
  max-width: 145px;
}

.dropdown-item span,
.activity-item span,
.support-item span,
.product-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.dropdown-item .dropdown-avatar,
.activity-item .activity-dot,
.support-item .support-avatar {
  display: grid;
  place-items: center;
  margin-top: 0;
  color: #fff;
}

.dropdown-item small,
.activity-item small,
.support-item small {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.header-user {
  min-width: 150px;
  height: 70px;
  border: 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  column-gap: 10px;
  padding: 0 12px;
  background: var(--topbar-bg);
  color: var(--text);
  text-align: left;
}

.header-user:hover {
  background: var(--topbar-bg);
}

.header-user span {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7dd3fc, #5eead4);
  color: #083344;
  font-weight: 700;
}

.header-user strong {
  align-self: end;
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

.header-user small {
  align-self: start;
  color: var(--muted);
  font-size: 11px;
}

.page-content {
  grid-column: 1;
  min-width: 0;
  padding: 22px;
}

.view-section[hidden] {
  display: none !important;
}

.activity-sidebar {
  grid-column: 2;
  min-width: 0;
  border-left: 1px solid var(--border);
  background: var(--card-bg);
  padding: 20px 18px 22px;
  overflow: auto;
  align-self: stretch;
}

.app-main[data-view="topology"] .activity-sidebar,
.app-main[data-view="nodeActivation"] .activity-sidebar,
.app-main[data-view="data"] .activity-sidebar {
  display: none;
}

.page-title-row,
.card-head,
.activity-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-title-row {
  min-height: 54px;
  margin-bottom: 18px;
}

h1 {
  color: var(--heading);
  font-size: 15px;
  font-weight: 600;
}

.page-title-row p,
.card-head p,
.data-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

h2 {
  color: var(--heading);
  font-size: 14px;
  font-weight: 600;
}

h3 {
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.date-range-btn,
.action-btn,
.period-tabs button,
.soft-btn,
.view-switch button,
.tabbar button,
.quick-ranges button,
.calendar-head button,
.date-actions button {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  color: var(--text);
}

.date-range-btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 500;
}

.calendar-mark {
  border: 2px solid var(--success);
  border-radius: 3px;
}

.calendar-mark::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 4px;
  border-top: 2px solid var(--success);
}

.calendar-caret::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-1px, -2px);
}

.action-btn {
  height: 38px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 600;
}

.action-btn.primary {
  border-color: rgba(10, 179, 156, 0.22);
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
}

.date-popover {
  position: absolute;
  top: 46px;
  right: 0;
  z-index: 35;
  width: 340px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  box-shadow: 0 5px 10px rgba(30, 32, 37, 0.12);
  padding: 14px;
}

.date-popover[aria-hidden="true"] {
  display: none;
}

.quick-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-ranges button,
.calendar-head button,
.date-actions button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.quick-ranges button.active,
.date-actions button:last-child {
  border-color: rgba(10, 179, 156, 0.25);
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
}

.calendar-head,
.date-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.calendar-head strong {
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-top: 12px;
}

.calendar-grid b,
.calendar-day {
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

.calendar-day {
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.calendar-day:hover,
.calendar-day.selected-day {
  background: rgba(64, 81, 137, 0.12);
  color: var(--primary);
}

.calendar-day.muted-day {
  opacity: 0.38;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.card,
.metric-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.metric-card {
  position: relative;
  min-height: 116px;
  padding: 18px 18px 14px;
  overflow: hidden;
}

.metric-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.metric-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.metric-card small {
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
}

.metric-card small.down {
  color: var(--danger);
}

.metric-card strong {
  display: block;
  color: var(--heading);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}

.metric-card a {
  display: inline-block;
  margin-top: 16px;
  color: var(--primary);
  font-size: 12px;
}

.revenue-card strong {
  color: var(--warning);
}

.metric-card:nth-child(2) strong {
  color: var(--danger);
}

.metric-card:nth-child(3) strong,
.metric-card:nth-child(4) strong {
  color: var(--success);
}

.metric-soft-icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
}

.metric-soft-icon::before,
.metric-soft-icon::after {
  content: "";
  position: absolute;
}

.money-icon::before {
  inset: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.money-icon::after {
  top: 13px;
  left: 21px;
  width: 2px;
  height: 18px;
  background: currentColor;
}

.bag-icon::before {
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.bag-icon::after {
  left: 17px;
  top: 11px;
  width: 10px;
  height: 8px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.customer-icon::before {
  left: 15px;
  top: 10px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.customer-icon::after {
  left: 10px;
  right: 10px;
  bottom: 9px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.server-icon::before {
  inset: 12px 10px;
  border: 2px solid currentColor;
}

.server-icon::after {
  left: 10px;
  right: 10px;
  top: 21px;
  border-top: 2px solid currentColor;
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  padding: 16px;
}

.card-head.compact {
  align-items: center;
}

.card-head span,
.card-head a {
  color: var(--muted);
  font-size: 12px;
}

.period-tabs {
  display: flex;
  gap: 4px;
}

.period-tabs button {
  min-width: 28px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.period-tabs button.active {
  background: rgba(64, 81, 137, 0.11);
  color: var(--primary);
}

.soft-btn {
  height: 28px;
  padding: 0 10px;
  border: 0;
  background: rgba(64, 81, 137, 0.08);
  color: var(--primary);
  font-size: 11px;
  font-weight: 500;
}

.revenue-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 16px -16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(243, 246, 249, 0.52);
}

body[data-theme="dark"] .revenue-summary {
  background: rgba(255, 255, 255, 0.02);
}

.revenue-summary div {
  min-height: 62px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
}

.revenue-summary div:last-child {
  border-right: 0;
}

.revenue-summary strong {
  color: var(--heading);
  font-size: 14px;
  font-weight: 600;
}

.revenue-summary span {
  margin-top: -6px;
  color: var(--muted);
  font-size: 11px;
}

.chart-box {
  min-height: 250px;
  margin-top: 12px;
  overflow: visible;
}

.revenue-chart-stage {
  position: relative;
  min-height: 270px;
}

.revenue-chart svg,
.mini-chart-card svg {
  width: 100%;
  height: 100%;
  min-height: 250px;
  display: block;
}

.chart-grid-line {
  stroke: rgba(135, 138, 153, 0.15);
  stroke-width: 1;
}

.chart-axis-text,
.revenue-chart text {
  fill: var(--muted);
  font-size: 11px;
}

.revenue-bar {
  fill: #20c1ae;
  opacity: 0.95;
}

.revenue-area {
  fill: rgba(64, 81, 137, 0.08);
}

.orders-line {
  fill: none;
  stroke: #405189;
  stroke-width: 2.2;
}

.refunds-line {
  fill: none;
  stroke: #f06548;
  stroke-width: 2;
  stroke-dasharray: 7 7;
}

.refund-point {
  fill: #f06548;
  stroke: #fff;
  stroke-width: 2;
}

.revenue-hit {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.revenue-tooltip {
  position: absolute;
  z-index: 4;
  width: 168px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(56, 65, 74, 0.16);
  color: var(--text);
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.revenue-tooltip[aria-hidden="false"] {
  opacity: 1;
  transform: translateY(0);
}

.revenue-tooltip strong,
.revenue-tooltip span {
  display: block;
}

.revenue-tooltip strong {
  margin-bottom: 8px;
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
}

.revenue-tooltip span {
  margin-top: 7px;
  color: var(--heading);
}

.revenue-tooltip b {
  font-weight: 600;
}

.revenue-tooltip .dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
}

.revenue-tooltip .orders {
  background: #405189;
}

.revenue-tooltip .earnings {
  background: #20c1ae;
}

.revenue-tooltip .refunds {
  background: #f06548;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.location-map {
  position: relative;
  height: 240px;
  margin-top: 15px;
  border-radius: 3px;
  overflow: visible;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background:
    radial-gradient(circle at 71% 47%, rgba(10, 179, 156, 0.08), transparent 24%),
    #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

body[data-theme="dark"] .location-map {
  border-color: rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at 71% 47%, rgba(10, 179, 156, 0.14), transparent 24%),
    radial-gradient(circle at 45% 54%, rgba(96, 165, 250, 0.06), transparent 35%),
    #020617;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.world-map {
  position: absolute;
  inset: 6px 8px 4px;
  width: calc(100% - 16px);
  height: calc(100% - 10px);
  overflow: visible;
}

.world-real-map {
  transform-origin: center;
}

.world-land {
  fill: #c6cbd3;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}

.world-country-layer {
  opacity: 0.98;
}

.world-land.island {
  opacity: 0.95;
}

.map-line {
  stroke: rgba(64, 81, 137, 0.26);
  stroke-width: 1.4;
  stroke-dasharray: 3 4;
  vector-effect: non-scaling-stroke;
}

.map-line.active {
  stroke: rgba(10, 179, 156, 0.65);
}

body[data-theme="dark"] .world-land {
  fill: #707785;
  stroke: rgba(15, 23, 42, 0.72);
}

.map-light .map-glow {
  fill: transparent;
}

.map-light.active .map-glow {
  fill: url(#activeGlow);
  opacity: 0.92;
  animation: mapPulse 1.8s ease-in-out infinite;
}

.map-light.pending .map-glow {
  fill: rgba(64, 81, 137, 0.12);
}

.map-dot {
  fill: #405189;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.map-light.active .map-dot {
  fill: #0ab39c;
  stroke: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 0 8px rgba(10, 179, 156, 0.75));
}

@keyframes mapPulse {
  0%,
  100% {
    opacity: 0.46;
    transform: scale(0.86);
  }
  50% {
    opacity: 0.98;
    transform: scale(1.12);
  }
}

.map-pin {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--heading);
  font-size: 11px;
  font-weight: 600;
  transform: translate(0, -50%);
  white-space: nowrap;
  min-width: 0;
  max-width: 148px;
  padding: 2px 4px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.72);
}

.map-pin i {
  content: "";
  width: 10px;
  height: 10px;
  display: block;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(10, 179, 156, 0.16), 0 0 12px rgba(10, 179, 156, 0.7);
}

.map-pin.active i {
  animation: pinPulse 1.8s ease-in-out infinite;
}

.map-pin.pending i {
  background: #405189;
  box-shadow: 0 0 0 4px rgba(64, 81, 137, 0.14);
}

.map-pin em {
  display: none;
}

.map-pin b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="dark"] .map-pin {
  color: #f8fafc;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

@keyframes pinPulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(10, 179, 156, 0.14), 0 0 10px rgba(10, 179, 156, 0.55);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(10, 179, 156, 0.08), 0 0 18px rgba(10, 179, 156, 0.85);
  }
}

.map-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  min-width: 118px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  box-shadow: 0 8px 22px rgba(56, 65, 74, 0.16);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.map-tip strong,
.map-tip small {
  display: block;
}

.map-tip strong {
  color: var(--heading);
  font-size: 12px;
}

.map-tip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.map-pin:hover .map-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.location-list {
  margin-top: 12px;
}

.location-row {
  margin-top: 12px;
}

.location-row p {
  display: flex;
  justify-content: space-between;
  color: var(--text);
  font-size: 12px;
}

.progress {
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(64, 81, 137, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, #405189 0 4px, #53649f 4px 8px);
}

.progress.is-empty span {
  width: 100% !important;
  background: linear-gradient(90deg, rgba(135, 138, 153, 0.14), rgba(135, 138, 153, 0.08));
}

.commerce-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
}

.commerce-table {
  margin: 10px -16px -16px;
  overflow: auto;
}

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

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  background: rgba(243, 246, 249, 0.65);
}

td,
th {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

td {
  color: var(--text);
  font-size: 12px;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-id-cell {
  display: inline-flex;
  min-width: 78px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.product-thumb {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: rgba(64, 81, 137, 0.1);
  color: var(--primary);
}

.platform-logo {
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.platform-logo.azphone {
  background: linear-gradient(135deg, #405189 0%, #299cdb 100%);
}

.platform-logo.paypal {
  background: linear-gradient(135deg, #003087 0%, #009cde 100%);
}

.platform-logo.alipay {
  background: linear-gradient(135deg, #1677ff 0%, #00a1e9 100%);
  font-size: 9px;
}

.platform-logo.vietqr {
  background: linear-gradient(135deg, #0ab39c 0%, #22c55e 100%);
}

.platform-logo.card {
  background: linear-gradient(135deg, #6559cc 0%, #405189 100%);
  font-size: 9px;
}

.platform-logo.bank {
  background: linear-gradient(135deg, #f7b84b 0%, #f06548 100%);
}

.tag {
  min-height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
  font-size: 11px;
  font-weight: 500;
}

.tag.warn {
  background: rgba(247, 184, 75, 0.14);
  color: #d49328;
}

.tag.danger {
  background: rgba(240, 101, 72, 0.14);
  color: var(--danger);
}

.tag.muted {
  background: rgba(135, 138, 153, 0.12);
  color: var(--muted);
}

.tag.info {
  background: rgba(41, 156, 219, 0.12);
  color: var(--info);
}

.tag.bronze {
  background: rgba(247, 184, 75, 0.14);
  color: #d97706;
}

.admin-data table {
  min-width: 1180px;
}

.admin-data th {
  color: #8a96b5;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.admin-data td {
  color: var(--heading);
  font-size: 13px;
}

.admin-data .table-wrap {
  overflow: visible;
}

.user-data-tools {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.user-data-tools[hidden] {
  display: none !important;
}

.admin-data .table-wrap[hidden],
.payment-data-tools[hidden],
.payment-data-list[hidden] {
  display: none !important;
}

.user-stat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.user-stat-card {
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.user-stat-card span {
  display: block;
  color: #8a96b5;
  font-size: 12px;
}

.user-stat-card strong {
  display: block;
  margin-top: 12px;
  color: var(--heading);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.user-stat-card.teal strong {
  color: var(--success);
}

.user-stat-card.green strong {
  color: #22c55e;
}

.user-stat-card.blue strong {
  color: #3b6cff;
}

.user-stat-card.red strong {
  color: #ef4444;
}

.user-stat-card.orange strong {
  color: #f59e0b;
}

.user-stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
}

.user-stat-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--stat-icon) center / contain no-repeat;
  mask: var(--stat-icon) center / contain no-repeat;
}

.user-stat-icon.users {
  --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9.5' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.user-stat-icon.wallet {
  --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h15a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h13'/%3E%3Cpath d='M16 13h5'/%3E%3C/svg%3E");
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.user-stat-icon.active {
  --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3Cpath d='M12 3a9 9 0 1 1-6.36 2.64'/%3E%3C/svg%3E");
  background: rgba(59, 108, 255, 0.12);
  color: #3b6cff;
}

.user-stat-icon.locked {
  --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M5.7 5.7l12.6 12.6'/%3E%3C/svg%3E");
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.user-stat-icon.banned {
  --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m4.9 4.9 14.2 14.2'/%3E%3C/svg%3E");
  background: rgba(245, 158, 11, 0.13);
  color: #f59e0b;
}

.user-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-filter-chip {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0 13px;
  background: var(--card-bg);
  color: #8a96b5;
  font-size: 12px;
  font-weight: 600;
}

.user-filter-chip.active {
  border-color: var(--success);
  background: rgba(10, 179, 156, 0.1);
  color: var(--success);
}

.user-date-filter {
  position: relative;
  flex: 0 0 auto;
}

.user-date-filter .date-popover {
  top: 44px;
  right: 0;
}

.user-search-box {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: var(--card-bg);
}

.user-search-box .search-icon {
  flex: 0 0 auto;
}

.user-search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--heading);
  font-size: 13px;
}

.user-search-box input::placeholder {
  color: #8a96b5;
}

.payment-data-tools {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.payment-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payment-title-row > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.payment-title-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
}

.payment-title-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M7 15h3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M7 15h3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.payment-title-row h3 {
  margin: 0;
  color: var(--heading);
  font-size: 20px;
  line-height: 1.2;
}

.payment-title-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.payment-refresh-btn {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--card-bg);
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
}

.payment-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.payment-stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
}

.payment-filter-row {
  align-items: stretch;
}

.payment-filter-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px auto;
  gap: 10px;
  align-items: center;
  flex: 1;
  min-width: 520px;
}

.payment-search-box {
  min-width: 0;
}

.payment-gateway-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  background: var(--card-bg);
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
  outline: 0;
}

.payment-data-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payment-record-card {
  min-height: 96px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(360px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.payment-record-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.payment-record-main strong,
.payment-record-main span,
.payment-record-main small,
.payment-record-meta span,
.payment-record-meta small,
.payment-record-meta em {
  display: block;
}

.payment-record-main strong {
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
}

.payment-record-main span {
  margin-top: 3px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.payment-record-main small,
.payment-record-meta small,
.payment-record-meta em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.payment-record-meta span {
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

.payment-record-meta em {
  font-style: normal;
}

.payment-record-status {
  justify-self: end;
}

.payment-empty {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
}

.admin-user-cell,
.admin-email-cell {
  display: flex;
  min-width: 0;
}

.admin-user-cell {
  align-items: center;
  gap: 10px;
  min-width: 240px;
}

.admin-email-cell {
  flex-direction: column;
  gap: 2px;
  min-width: 250px;
}

.admin-user-avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ab39c 0%, #31c955 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.default-user-avatar {
  background: #eef2f7;
  color: #8a96b5;
  box-shadow: inset 0 0 0 1px #dfe3eb;
}

.default-user-avatar i {
  width: 58%;
  height: 58%;
  display: block;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm0 2c-4.42 0-8 2.24-8 5v1h16v-1c0-2.76-3.58-5-8-5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.admin-user-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.profile-avatar {
  width: 46px;
  height: 46px;
  font-size: 15px;
}

.admin-user-avatar img,
img.admin-user-avatar,
.profile-avatar img,
img.profile-avatar {
  object-fit: cover;
}

.admin-user-cell strong {
  display: block;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.admin-user-cell span,
.admin-email-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-email-cell strong {
  display: block;
  color: #60719e;
  font-size: 13px;
  font-weight: 500;
}

.money-cell {
  color: #00b050;
  font-size: 13px;
  font-weight: 700;
}

.money-cell.withdraw {
  color: var(--danger);
}

.user-device-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.user-device-eye {
  min-height: 32px;
  border: 1px solid rgba(10, 179, 156, 0.26);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  background: rgba(10, 179, 156, 0.1);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.user-device-eye i {
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.user-device-eye:hover {
  border-color: rgba(10, 179, 156, 0.5);
  background: rgba(10, 179, 156, 0.16);
}

.user-actions {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.user-action-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid #dfe3eb;
  border-radius: 8px;
  background: var(--card-bg);
  color: #8a96b5;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.user-actions.open .user-action-toggle,
.user-action-toggle:hover {
  border-color: rgba(64, 81, 137, 0.28);
  background: rgba(64, 81, 137, 0.08);
  color: var(--primary);
}

.user-action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 176px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  box-shadow: 0 14px 34px rgba(56, 65, 74, 0.18);
}

.user-action-menu[aria-hidden="true"] {
  display: none;
}

.user-action-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: transparent;
  color: var(--heading);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.user-action-menu button:hover {
  background: var(--search-bg);
}

.admin-action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.admin-action-icon.edit {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
  color: var(--primary);
}

.admin-action-icon.topup {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='12' rx='2'/%3E%3Cpath d='M7 10h4M17 12v4M15 14h4'/%3E%3C/svg%3E");
  color: #22c55e;
}

.admin-action-icon.withdraw {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7 6 6 4-4 8 8'/%3E%3Cpath d='M21 11v6h-6'/%3E%3C/svg%3E");
  color: #f59e0b;
}

.admin-action-icon.orders {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2 2h3l3 12a2 2 0 0 0 2 1.5h7.5a2 2 0 0 0 1.9-1.4L22 7H6'/%3E%3C/svg%3E");
  color: var(--success);
}

.admin-action-icon.flow {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3l4 4-4 4'/%3E%3Cpath d='M3 7h18'/%3E%3Cpath d='M7 21l-4-4 4-4'/%3E%3Cpath d='M21 17H3'/%3E%3C/svg%3E");
  color: #8b5cf6;
}

.admin-action-icon.lock,
.admin-action-icon.activate {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E");
  color: var(--warning);
}

.admin-action-icon.activate {
  color: var(--success);
}

.admin-action-icon.disable,
.admin-action-icon.ban {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M5.7 5.7l12.6 12.6'/%3E%3C/svg%3E");
  color: var(--danger);
}

.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.56);
}

.admin-modal {
  width: min(860px, calc(100vw - 56px));
  max-height: calc(100vh - 56px);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32);
}

.admin-modal-head,
.admin-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.admin-modal-head h3 {
  margin: 0;
  color: var(--heading);
  font-size: 17px;
  font-weight: 600;
}

.admin-modal-head p {
  margin: 3px 0 0;
  color: #8a96b5;
  font-size: 12px;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: var(--search-bg);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.admin-modal-body {
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding: 18px 20px;
}

.admin-modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.admin-modal-foot button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--card-bg);
  color: var(--heading);
  font-weight: 500;
}

.admin-modal-foot button.success {
  border-color: transparent;
  background: var(--success);
  color: #fff;
}

.admin-modal-foot button.warn {
  border-color: transparent;
  background: var(--warning);
  color: #fff;
}

.admin-modal-foot button.danger {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}

.admin-modal-foot .modal-link-btn {
  min-height: 36px;
  border: 1px solid rgba(10, 179, 156, 0.28);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: rgba(10, 179, 156, 0.1);
  color: var(--success);
  font-weight: 600;
  text-decoration: none;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--heading);
  font-size: 12px;
  font-weight: 600;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--search-bg);
  color: var(--heading);
}

.admin-form select {
  appearance: auto;
}

.admin-form textarea {
  min-height: 78px;
  resize: vertical;
  padding-top: 10px;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
}

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

.admin-form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-edit-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: rgba(243, 246, 249, 0.48);
}

.admin-edit-card h4 {
  margin: 0 0 12px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-form-note,
.admin-confirm-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-modal-table {
  overflow: auto;
}

.admin-modal-table table {
  min-width: 760px;
}

.admin-modal-table th {
  font-size: 12px;
}

.admin-modal-table td {
  color: var(--heading);
  font-size: 13px;
}

.admin-device-list {
  display: grid;
  gap: 10px;
}

.admin-device-card {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(230px, auto) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--search-bg);
}

.admin-device-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-device-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, #405189 0%, #299cdb 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.admin-device-main strong,
.device-preview-meta strong {
  display: block;
  color: var(--heading);
  font-size: 14px;
  font-weight: 700;
}

.admin-device-main span,
.admin-device-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-device-extra {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.device-preview-btn {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 14px;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.device-preview-btn:disabled {
  border-color: var(--border);
  background: var(--card-bg);
  color: var(--muted);
  cursor: not-allowed;
}

.admin-preview-backdrop {
  padding: 0;
  background: rgba(8, 11, 18, 0.58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.admin-preview-modal {
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-preview-modal .admin-modal-head,
.admin-preview-modal .admin-modal-foot {
  display: none;
}

.admin-preview-modal .admin-modal-body {
  height: 100vh;
  max-height: none;
  padding: 0;
  overflow: hidden;
}

.device-preview-wrap {
  display: grid;
  gap: 12px;
}

.customer-preview-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  background: #737982;
}

.customer-preview-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: rgba(15, 23, 42, 0.78);
  color: #e5edf8;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.customer-preview-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 48px));
  transform: translate(-50%, -50%);
  border-radius: 14px;
  padding: 16px 18px;
  background: rgba(15, 23, 42, 0.88);
  color: #e5edf8;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.customer-preview-status[hidden] {
  display: none;
}

.customer-preview-status.error {
  background: rgba(127, 29, 29, 0.92);
  color: #fff;
}

.device-preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.device-preview-meta span {
  color: var(--muted);
  font-size: 12px;
}

.device-preview-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #737982;
}

.order-code {
  color: var(--success);
}

.admin-user-profile {
  display: grid;
  gap: 18px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-main strong {
  display: block;
  color: var(--heading);
  font-size: 16px;
}

.profile-main span {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-profile dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.admin-user-profile dl div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--search-bg);
}

.admin-user-profile dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.admin-user-profile dd {
  margin: 4px 0 0;
  color: var(--heading);
  font-size: 13px;
  font-weight: 600;
}

body[data-theme="dark"] .admin-user-cell strong {
  color: var(--heading);
}

body[data-theme="dark"] .admin-email-cell strong,
body[data-theme="dark"] .admin-modal-head p {
  color: #a9b6d8;
}

.activity-block {
  margin-bottom: 24px;
}

.activity-block h2 {
  margin-bottom: 14px;
  font-size: 12px;
  text-transform: uppercase;
}

.activity-list,
.support-list {
  display: grid;
  gap: 12px;
}

.activity-item,
.support-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.activity-dot {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.activity-dot.warn {
  background: linear-gradient(135deg, #f7b84b 0%, #f06548 100%);
}

.activity-dot.danger,
.support-avatar.danger {
  background: linear-gradient(135deg, #f06548 0%, #d9482f 100%);
}

.support-avatar {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 6px 14px rgba(64, 81, 137, 0.14);
}

.activity-list .activity-item:not(:last-child),
.support-list .support-item:not(:last-child) {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}

.category-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.category-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 7px 0;
  font-size: 12px;
}

.category-list b {
  color: var(--muted);
  font-weight: 500;
}

.activity-title-row {
  align-items: center;
  margin-bottom: 12px;
}

.activity-title-row h2 {
  margin: 0;
}

.activity-title-row span {
  color: var(--muted);
  font-size: 11px;
}

.activity-sidebar .activity-block:not(#supportSection) {
  display: none;
}

.activity-sidebar #supportSection {
  margin-bottom: 0;
}

.activity-sidebar #supportSection .activity-title-row {
  margin-bottom: 16px;
}

.activity-sidebar #supportSection h2 {
  font-size: 14px;
  font-weight: 700;
}

.activity-sidebar #supportSection .activity-title-row span {
  font-size: 12px;
}

.activity-sidebar #supportList {
  gap: 14px;
}

.activity-sidebar .support-item {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
}

.activity-sidebar .support-avatar {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.activity-sidebar .support-item strong {
  max-width: none;
  font-size: 14px;
  font-weight: 700;
}

.activity-sidebar .support-item div span {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
}

.activity-sidebar .support-item small {
  font-size: 12px;
}

.topology-card,
.admin-data {
  margin-top: 0;
}

.app-main[data-view="topology"] .page-content {
  min-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}

.app-main[data-view="topology"] .topology-card {
  flex: 1;
  min-height: calc(100vh - 114px);
  display: flex;
  flex-direction: column;
}

.topology-card .card-head h2 {
  font-size: 16px;
}

.node-activation {
  margin-top: 0;
}

.node-token-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.92fr) minmax(420px, 1.08fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 18px;
}

.node-token-form,
.node-token-result {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 18px;
  box-shadow: var(--shadow);
}

.node-token-form {
  display: grid;
  gap: 14px;
}

.node-token-form label {
  display: grid;
  gap: 7px;
  color: var(--heading);
  font-size: 12px;
  font-weight: 700;
}

.node-field-hint,
.node-form-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.node-form-status {
  min-height: 16px;
}

.node-form-status:empty {
  display: none;
}

.node-token-form input,
.node-token-form select,
.node-token-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--search-bg);
  color: var(--heading);
}

.node-token-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.node-token-form textarea {
  min-height: 136px;
  padding-top: 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}

.node-token-form .action-btn {
  width: max-content;
}

.node-token-result {
  display: grid;
  gap: 14px;
}

.node-token-result[hidden] {
  display: none;
}

.node-token-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.node-token-result-head .soft-btn {
  min-height: 34px;
  padding: 0 14px;
  font-weight: 700;
}

.node-token-result strong {
  display: block;
  color: var(--heading);
  font-size: 15px;
}

.node-token-result span {
  color: var(--muted);
  font-size: 12px;
}

#activationTokenOutput {
  width: 100%;
  min-height: 110px;
  border: 1px solid rgba(10, 179, 156, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(10, 179, 156, 0.08);
  color: var(--heading);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.node-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.node-result-grid span {
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 12px;
  background: var(--search-bg);
}

.node-result-grid b {
  display: block;
  margin-top: 4px;
  color: var(--heading);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.node-token-history {
  margin-top: 20px;
}

.section-mini-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}

.section-mini-head span {
  color: var(--muted);
  font-size: 12px;
}

.node-token-list {
  display: grid;
  gap: 10px;
}

.node-token-card {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(260px, 0.9fr) auto auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.node-token-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.node-pc-icon {
  width: 72px;
  height: 58px;
  flex: 0 0 auto;
  position: relative;
  display: block;
}

.node-pc-icon::before {
  content: '';
  position: absolute;
  left: 3px;
  right: 3px;
  top: 0;
  height: 40px;
  border: 4px solid #334155;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0 28%, transparent 28% 100%),
    linear-gradient(135deg, #18b6b0 0%, #278bd2 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.14);
}

.node-pc-icon::after {
  content: '';
  position: absolute;
  left: 19px;
  right: 19px;
  top: 43px;
  height: 10px;
  border-radius: 2px 2px 0 0;
  background: #334155;
  box-shadow: 0 8px 0 -3px #334155;
}

.node-pc-icon i {
  position: absolute;
  left: 15px;
  top: 11px;
  z-index: 2;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f06548;
  box-shadow: 9px 0 #f7b84b, 18px 0 #0ab39c;
}

.node-token-main strong {
  display: block;
  color: var(--heading);
  font-size: 13px;
  font-weight: 700;
}

.node-token-main small,
.node-token-meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.node-token-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.node-token-actions button {
  min-height: 34px;
  border: 1px solid rgba(10, 179, 156, 0.28);
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(10, 179, 156, 0.1);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.node-token-actions button.danger {
  border-color: rgba(240, 101, 72, 0.28);
  background: rgba(240, 101, 72, 0.12);
  color: var(--danger);
}

.node-token-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.node-token-revoked-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  background: rgba(240, 101, 72, 0.12);
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

body[data-theme="dark"] .node-token-form,
body[data-theme="dark"] .node-token-result,
body[data-theme="dark"] .node-token-card {
  background: #182235;
}

body[data-theme="dark"] .node-pc-icon::before {
  border-color: #d7dde8;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0 28%, transparent 28% 100%),
    linear-gradient(135deg, #0ab39c 0%, #299cdb 100%);
}

body[data-theme="dark"] .node-pc-icon::after {
  background: #d7dde8;
  box-shadow: 0 8px 0 -3px #d7dde8;
}

body[data-theme="dark"] #activationTokenOutput {
  background: rgba(10, 179, 156, 0.13);
  color: #f1f5f9;
}

.topology-card .card-head p {
  font-size: 13px;
}

.legend-row,
.crumb-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  background: var(--success);
}

.status-dot.warning {
  background: var(--warning);
}

.status-dot.danger {
  background: var(--danger);
}

.status-dot.muted {
  background: #9ca3af;
}

.status-dot.hollow {
  border: 1px solid var(--muted);
  background: transparent;
}

.crumb-flow b {
  width: 28px;
  border-top: 1px dashed var(--muted);
  opacity: 0.5;
}

.crumb-flow span.active {
  color: var(--primary);
  font-weight: 600;
}

.view-switch,
.tabbar {
  display: flex;
  gap: 6px;
}

.view-switch button,
.tabbar button {
  min-height: 30px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 12px;
}

.view-switch button.selected,
.tabbar button.active {
  border-color: rgba(64, 81, 137, 0.2);
  background: rgba(64, 81, 137, 0.09);
  color: var(--primary);
}

.topology-layout {
  margin-top: 14px;
  flex: 1;
  min-height: 0;
  display: flex;
}

.topology {
  width: 100%;
  flex: 1;
  min-width: 0;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(240px, 1.1fr) minmax(160px, 0.75fr) minmax(310px, 1.55fr) minmax(210px, 1fr) minmax(360px, 2.25fr);
  gap: 12px;
  align-items: stretch;
  overflow-x: auto;
}

.column {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card-bg);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.column-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.column-head strong {
  color: var(--heading);
  font-size: 14px;
  line-height: 1.25;
}

.node {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  margin-bottom: 10px;
  padding: 10px;
  background: var(--card-bg);
  color: var(--text);
  text-align: left;
}

.node.active {
  border-color: rgba(10, 179, 156, 0.35);
  background: rgba(10, 179, 156, 0.08);
}

.node strong {
  color: var(--heading);
  font-size: 14px;
  line-height: 1.25;
}

.node small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.node i {
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 32px;
  min-height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(64, 81, 137, 0.1);
  color: var(--primary);
  font-style: normal;
  font-size: 12px;
}

.node:not(.country-node) {
  grid-template-columns: 44px minmax(0, 1fr);
}

.node:not(.country-node) i {
  grid-column: 1;
  grid-row: 1 / span 2;
  justify-self: center;
}

.node:not(.country-node) strong,
.node:not(.country-node) small {
  grid-column: 2;
}

.country-node {
  min-height: 74px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 10px;
}

.country-node .country-flag {
  grid-row: 1 / span 2;
  width: 48px;
  height: 34px;
  border: 1px solid rgba(64, 81, 137, 0.16);
  border-radius: 7px;
  display: block;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 14px rgba(64, 81, 137, 0.14);
}

.country-node .country-flag img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.country-node strong {
  white-space: nowrap;
}

.country-node small {
  font-weight: 500;
}

.country-node.coming-soon {
  grid-template-columns: 50px minmax(0, 1fr);
}

.country-node.coming-soon small {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(64, 81, 137, 0.08);
  color: var(--primary);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.version-column {
  gap: 10px;
}

.version-spec-card {
  border: 1px solid rgba(64, 81, 137, 0.14);
  border-radius: 6px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(64, 81, 137, 0.04), rgba(255, 255, 255, 0.95));
  box-shadow: 0 10px 24px rgba(64, 81, 137, 0.08);
}

.version-spec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.version-spec-head strong {
  color: var(--heading);
  font-size: 15px;
  font-weight: 700;
}

.version-spec-head span {
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(10, 179, 156, 0.12);
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.topology-detail-toggle {
  width: 100%;
  min-height: 32px;
  border: 1px solid rgba(64, 81, 137, 0.16);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(64, 81, 137, 0.06);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.topology-detail-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.topology-detail-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translateY(-1px);
}

.version-spec-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.box-model-line {
  margin-bottom: 10px;
  border: 1px solid rgba(10, 179, 156, 0.18);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(10, 179, 156, 0.06);
}

.box-model-line strong,
.box-model-line span {
  display: block;
}

.box-model-line strong {
  color: var(--heading);
  font-size: 13px;
  font-weight: 700;
}

.box-model-line span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.version-spec-details {
  margin-top: 10px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 8px;
}

.spec-grid span {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.spec-grid b {
  font-weight: 600;
}

.spec-icon {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(41, 156, 219, 0.35);
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: rgba(41, 156, 219, 0.08);
  color: var(--info);
}

.spec-icon::before,
.spec-icon::after {
  content: "";
  position: absolute;
  border-color: currentColor;
}

.cpu-icon::before,
.bit-icon::before {
  inset: 8px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.cpu-icon::after,
.bit-icon::after {
  inset: 5px;
  border: 1px dashed currentColor;
  border-radius: 4px;
  opacity: 0.55;
}

.android-icon::before {
  width: 14px;
  height: 11px;
  bottom: 7px;
  border: 2px solid currentColor;
  border-radius: 3px 3px 2px 2px;
}

.android-icon::after {
  top: 7px;
  width: 12px;
  height: 7px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.ram-icon::before,
.rom-icon::before {
  left: 7px;
  right: 7px;
  top: 8px;
  bottom: 8px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.ram-icon::after {
  left: 11px;
  right: 11px;
  top: 5px;
  bottom: 5px;
  border-left: 1px solid currentColor;
  border-right: 1px solid currentColor;
  opacity: 0.6;
}

.rom-icon::after {
  left: 11px;
  right: 11px;
  bottom: 6px;
  height: 3px;
  border-top: 2px solid currentColor;
}

.chip-icon::before {
  inset: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.chip-icon::after {
  right: 7px;
  top: 9px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(35deg);
}

#phoneList {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}

#phoneList[hidden] {
  display: none;
}

.machine-summary-card {
  border: 1px solid rgba(64, 81, 137, 0.14);
  border-radius: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(64, 81, 137, 0.04), rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 24px rgba(64, 81, 137, 0.06);
}

.machine-summary-card strong,
.machine-summary-card small {
  display: block;
}

.machine-summary-card strong {
  color: var(--heading);
  font-size: 14px;
  line-height: 1.25;
}

.machine-summary-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.machine-summary-card .topology-detail-toggle {
  width: auto;
}

.phone-row {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 10px;
}

.phone-row span {
  color: var(--heading);
  font-weight: 600;
  font-size: 14px;
}

.phone-row small,
.phone-row a {
  color: var(--muted);
  font-size: 12px;
}

.phone-row a {
  grid-column: 2;
  text-decoration: none;
}

.admin-data .card-head {
  align-items: center;
}

.table-wrap {
  margin: 14px -16px 0;
  overflow: auto;
}

.hint-row,
.empty-state,
.chart-empty {
  color: var(--muted);
  font-size: 12px;
}

.hint-row {
  margin-top: 12px;
}

.empty-state,
.chart-empty {
  padding: 16px;
  text-align: center;
}

body[data-theme="dark"] th {
  background: rgba(15, 23, 42, 0.82);
  color: #c7d2fe;
}

body[data-theme="dark"] td {
  color: #dbeafe;
}

body[data-theme="dark"] .admin-data th {
  color: #c7d2fe;
}

body[data-theme="dark"] .admin-data td,
body[data-theme="dark"] .admin-user-cell strong,
body[data-theme="dark"] .admin-email-cell strong,
body[data-theme="dark"] .payment-record-main strong,
body[data-theme="dark"] .payment-record-meta span,
body[data-theme="dark"] .machine-summary-card strong,
body[data-theme="dark"] .version-spec-head strong,
body[data-theme="dark"] .box-model-line strong {
  color: #f8fafc;
}

body[data-theme="dark"] .admin-email-cell span,
body[data-theme="dark"] .admin-user-cell span,
body[data-theme="dark"] .user-device-empty,
body[data-theme="dark"] .admin-device-main span,
body[data-theme="dark"] .admin-device-main small,
body[data-theme="dark"] .admin-device-extra,
body[data-theme="dark"] .device-preview-meta span,
body[data-theme="dark"] .payment-record-main small,
body[data-theme="dark"] .payment-record-meta small,
body[data-theme="dark"] .payment-record-meta em,
body[data-theme="dark"] .machine-summary-card small,
body[data-theme="dark"] .version-spec-card p,
body[data-theme="dark"] .box-model-line span,
body[data-theme="dark"] .node small,
body[data-theme="dark"] .column-head,
body[data-theme="dark"] .phone-row small,
body[data-theme="dark"] .phone-row a {
  color: #b6c3d9;
}

body[data-theme="dark"] .topology-card,
body[data-theme="dark"] .admin-data,
body[data-theme="dark"] .column,
body[data-theme="dark"] .user-stat-card,
body[data-theme="dark"] .admin-device-card,
body[data-theme="dark"] .payment-record-card,
body[data-theme="dark"] .payment-empty,
body[data-theme="dark"] .date-popover {
  border-color: rgba(148, 163, 184, 0.22);
  background: #182235;
}

body[data-theme="dark"] .user-device-eye {
  border-color: rgba(45, 212, 191, 0.34);
  background: rgba(20, 184, 166, 0.16);
  color: #5eead4;
}

body[data-theme="dark"] .device-preview-frame {
  border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme="dark"] .version-spec-card,
body[data-theme="dark"] .machine-summary-card {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(32, 43, 63, 0.98), rgba(24, 34, 53, 0.98));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .box-model-line {
  border-color: rgba(10, 179, 156, 0.36);
  background: rgba(10, 179, 156, 0.14);
}

body[data-theme="dark"] .topology-detail-toggle,
body[data-theme="dark"] .payment-gateway-select,
body[data-theme="dark"] .user-search-box,
body[data-theme="dark"] .user-filter-chip,
body[data-theme="dark"] .payment-refresh-btn,
body[data-theme="dark"] .date-range-btn,
body[data-theme="dark"] .quick-ranges button,
body[data-theme="dark"] .calendar-head button,
body[data-theme="dark"] .date-actions button {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.78);
  color: #dbeafe;
}

body[data-theme="dark"] .topology-detail-toggle,
body[data-theme="dark"] .user-filter-chip.active,
body[data-theme="dark"] .quick-ranges button.active,
body[data-theme="dark"] .date-actions button:last-child {
  border-color: rgba(10, 179, 156, 0.36);
  background: rgba(10, 179, 156, 0.15);
  color: #5eead4;
}

body[data-theme="dark"] .node {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(24, 34, 53, 0.86);
}

body[data-theme="dark"] .node.active {
  border-color: rgba(10, 179, 156, 0.42);
  background: rgba(10, 179, 156, 0.12);
}

body[data-theme="dark"] .country-node.coming-soon small {
  background: rgba(116, 131, 213, 0.16);
  color: #c7d2fe;
}

body[data-theme="dark"] .phone-row {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.3);
}

body[data-theme="dark"] .phone-row span,
body[data-theme="dark"] .column-head strong,
body[data-theme="dark"] .node strong,
body[data-theme="dark"] .payment-title-row h3,
body[data-theme="dark"] .calendar-head strong {
  color: #f8fafc;
}

body[data-theme="dark"] .payment-title-row p,
body[data-theme="dark"] .user-stat-card span,
body[data-theme="dark"] .calendar-grid b,
body[data-theme="dark"] .calendar-day {
  color: #aebbd1;
}

body[data-theme="dark"] .payment-stat-card small {
  color: #dbeafe;
}

body[data-theme="dark"] .calendar-day:hover,
body[data-theme="dark"] .calendar-day.selected-day {
  background: rgba(116, 131, 213, 0.24);
  color: #e0e7ff;
}

.header-icon:focus-visible,
.date-range-btn:focus-visible,
.action-btn:focus-visible,
.nav-link:focus-visible,
.nav-sub:focus-visible,
.tabbar button:focus-visible {
  outline: 2px solid rgba(10, 179, 156, 0.32);
  outline-offset: 2px;
}

@media (max-width: 1500px) {
  body {
    min-width: 1280px;
  }

  .app-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .app-main {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .analytics-grid,
  .commerce-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
