* {
  box-sizing: border-box;
}

.onboarding-wizard-panel {
  margin-bottom: 18px;
}

.wizard-step-focus {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-subtle);
}

.wizard-step-focus > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.wizard-step-focus strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.wizard-step-focus p {
  margin: 4px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.docs-tools {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.copy-doc-endpoint {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-subtle);
  text-align: left;
  cursor: pointer;
}

.copy-doc-endpoint.copied {
  border-color: color-mix(in srgb, var(--green) 45%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.import-template-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-subtle);
}

.import-template-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.import-warning {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--yellow) 35%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--yellow) 10%, var(--surface));
}

.import-warning p {
  margin: 4px 0 0;
  color: var(--muted);
}

@media (max-width: 820px) {
  .docs-tools,
  .import-template-panel {
    grid-template-columns: 1fr;
    display: grid;
  }

  .wizard-actions {
    display: grid;
  }
}

:root {
  --canvas: #f4f6f8;
  --sidebar: #0f172a;
  --sidebar-soft: #172033;
  --sidebar-active: #1e293b;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --surface-subtle: #f8fafc;
  --surface-strong: #eef2f7;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --ink: #111827;
  --ink-soft: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --accent: #0d9488;
  --accent-hover: #0f766e;
  --accent-soft: #ecfdf5;
  --accent-ink: #0f3f3a;
  --violet: #4f46e5;
  --red-bg: #fef2f2;
  --red-fg: #b91c1c;
  --blue-bg: #eef2ff;
  --blue-fg: #4338ca;
  --green-bg: #ecfdf5;
  --green-fg: #047857;
  --yellow-bg: #fffbeb;
  --yellow-fg: #b45309;
  --gray-bg: #f3f4f6;
  --gray-fg: #4b5563;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 16px 38px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
  color: var(--ink-soft);
  background:
    radial-gradient(circle at 82% 0%, rgba(13, 148, 136, 0.11), transparent 330px),
    radial-gradient(circle at 34% -8%, rgba(79, 70, 229, 0.08), transparent 290px),
    linear-gradient(180deg, #fbfcfd 0, var(--canvas) 340px);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  cursor: pointer;
}

button[hidden] {
  display: none !important;
}

aside {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-width: 0;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 220px),
    var(--sidebar);
  color: #dbeafe;
}

.sidebar {
  isolation: isolate;
}

.brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 6px 8px 20px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, #14b8a6, #4f46e5);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.22);
}

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

h1 {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.brand p {
  margin-top: 2px;
  color: #93a4bd;
  font-size: 12px;
}

nav {
  overflow: auto;
  padding: 4px 2px 14px;
  scrollbar-width: thin;
}

.nav-section {
  position: relative;
  padding: 10px 2px 12px;
  margin: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  background: transparent;
}

.nav-section:last-child {
  border-bottom: 0;
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 6px 7px;
  padding: 4px 4px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 880;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-label::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

aside button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 10px;
  padding: 9px 10px;
  margin: 3px 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 680;
  text-align: left;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  width: calc(100% - 14px);
  margin-left: 14px;
  padding-left: 18px;
  color: #b9c4d2;
  font-size: 13px;
  font-weight: 650;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  transform: translateY(-50%);
}

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

.nav-item.active {
  background: rgba(20, 184, 166, 0.12);
  color: #dffcf7;
  box-shadow: inset 3px 0 0 #14b8a6;
}

.nav-badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.22);
}

.nav-item.active::before {
  background: #14b8a6;
}

.logout-button {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

main {
  min-width: 0;
  padding: 24px 30px 44px;
}

.main-content {
  overflow: hidden;
}

#content,
.panel,
.card,
.grid > *,
.page-head > * {
  min-width: 0;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: -24px -30px 26px;
  padding: 14px 30px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.74);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82));
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.045);
}

.toolbar-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.toolbar-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.95), rgba(79, 70, 229, 0.88));
  color: #fff;
  font-size: 15px;
  font-weight: 880;
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.2);
}

.toolbar-title {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.toolbar-title span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.toolbar-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  font-weight: 860;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cms-version {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0;
  vertical-align: middle;
}

.session-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-sm);
}

.notification-center-button {
  position: relative;
  min-height: 42px;
  white-space: nowrap;
}

.notification-count {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.connection-pill {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.connection-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-pill {
  color: var(--gray-fg);
  background: var(--gray-bg);
  border-color: var(--border);
}

.connection-pill.is-connected {
  color: var(--green-fg);
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green-fg) 22%, var(--border));
}

.connection-pill.is-disconnected {
  color: var(--yellow-fg);
  background: var(--yellow-bg);
  border-color: color-mix(in srgb, var(--yellow-fg) 24%, var(--border));
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

#adminInfo {
  display: inline-flex;
  min-width: 0;
  max-width: 250px;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  position: relative;
  min-width: 0;
}

.user-menu-toggle {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.user-menu-toggle:hover,
.user-menu-toggle[aria-expanded="true"] {
  border-color: rgba(20, 184, 166, 0.36);
  background: #f8fffd;
}

.user-menu-caret {
  color: var(--muted);
  font-size: 12px;
  transition: transform 160ms ease;
}

.user-menu-toggle[aria-expanded="true"] .user-menu-caret {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 190px;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.user-menu-dropdown[hidden] {
  display: none;
}

.user-menu-dropdown button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  text-align: left;
}

.user-menu-dropdown button:hover {
  background: var(--surface-subtle);
}

.admin-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

#adminInfo.is-logged-in .admin-avatar {
  background: linear-gradient(135deg, var(--accent), #14b8a6);
}

.admin-meta {
  display: grid;
  min-width: 0;
  gap: 0;
  line-height: 1;
}

.admin-meta strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  text-overflow: ellipsis;
}

.admin-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.toolbar-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.toolbar-actions .btn {
  min-height: 40px;
  border-radius: 13px;
}

.global-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: min(460px, 100%);
}

.global-search input {
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.search-result-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.search-result-kind {
  min-width: 92px;
  text-align: center;
}

.search-result-item p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.order-timeline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 8px;
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: #94a3b8;
}

.timeline-green::before {
  background: #16a34a;
}

.timeline-yellow::before {
  background: #d97706;
}

.timeline-blue::before {
  background: var(--accent);
}

.timeline-item time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.timeline-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.permission-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.permission-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.permission-group h3 {
  color: var(--ink);
  font-size: 13px;
  font-weight: 840;
}

.import-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.action-center {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.action-center-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.action-center-item {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--ink);
  text-align: left;
}

.action-center-item.needs-action {
  border-color: rgba(217, 119, 6, 0.34);
  background: #fffbeb;
}

.action-center-item span {
  color: var(--muted);
  font-size: 12px;
}

.action-center-item strong {
  font-size: 22px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 100%;
  margin-bottom: 20px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.page-head > .btn,
.page-head > button,
.panel-head > .btn,
.panel-head > button {
  margin-left: auto;
}

.page-title {
  color: var(--ink);
  font-size: 21px;
  font-weight: 820;
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: 18px;
  margin-bottom: 18px;
}

.notice-panel {
  display: grid;
  gap: 6px;
  border-left: 4px solid var(--accent);
}

.notice-panel strong {
  color: var(--ink);
  font-size: 14px;
}

.notice-panel p {
  color: var(--muted);
}

.notice-panel.danger-soft {
  border-color: var(--yellow-fg);
  background: linear-gradient(135deg, #fffaf0, #fff);
}

.license-info-panel {
  overflow: hidden;
}

.license-info-layout {
  display: grid;
  gap: 14px;
}

.license-plan-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 72%, #fff));
}

.license-kicker,
.license-info-tile span,
.license-usage-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.license-plan-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 880;
  line-height: 1;
}

.license-plan-card p {
  max-width: 720px;
  overflow: hidden;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-info-grid,
.license-usage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.license-info-tile,
.license-usage-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-subtle);
}

.license-info-tile strong {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-info-tile small,
.license-usage-card p {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.license-info-tile.tone-green,
.license-usage-card.tone-green {
  border-color: color-mix(in srgb, var(--green-fg) 18%, var(--border));
  background: linear-gradient(135deg, var(--green-bg), #fff);
}

.license-info-tile.tone-yellow,
.license-usage-card.tone-yellow {
  border-color: color-mix(in srgb, var(--yellow-fg) 26%, var(--border));
  background: linear-gradient(135deg, var(--yellow-bg), #fff);
}

.license-info-tile.tone-blue {
  border-color: color-mix(in srgb, var(--blue-fg) 18%, var(--border));
  background: linear-gradient(135deg, var(--blue-bg), #fff);
}

.license-usage-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 860;
}

.license-usage-card strong small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.license-usage-meter {
  height: 9px;
  overflow: hidden;
  margin-top: 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 65%, #fff);
}

.license-usage-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #14b8a6);
}

.license-usage-card.tone-yellow .license-usage-meter i {
  background: linear-gradient(90deg, var(--yellow-fg), #f59e0b);
}

.license-usage-card.tone-red .license-usage-meter i {
  background: linear-gradient(90deg, var(--red-fg), #ef4444);
}

.license-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.license-feature {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.license-feature strong,
.license-feature small {
  display: block;
}

.license-feature strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.license-feature small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.license-feature.is-enabled {
  border-color: color-mix(in srgb, var(--green-fg) 18%, var(--border));
  background: linear-gradient(135deg, var(--green-bg), #fff);
}

.license-feature.is-disabled {
  opacity: 0.82;
}

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

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 14%, rgba(20, 184, 166, 0.2), transparent 250px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.93));
  box-shadow: var(--shadow-md);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  color: var(--ink);
  font-size: 32px;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.dashboard-hero p {
  max-width: 680px;
  margin-top: 8px;
  color: var(--muted);
}

.setup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: center;
  min-height: 0;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background:
    radial-gradient(circle at 86% 18%, rgba(13, 148, 136, 0.16), transparent 250px),
    linear-gradient(135deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-md);
}

.setup-hero.needs-work {
  background:
    radial-gradient(circle at 88% 16%, rgba(245, 158, 11, 0.16), transparent 250px),
    linear-gradient(135deg, #ffffff, #fffbeb);
}

.setup-hero-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-self: center;
}

.setup-hero-main h2 {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.setup-hero-main p {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
}

.setup-hero-card {
  display: grid;
  min-width: 0;
  align-self: center;
  align-content: center;
  gap: 9px;
  padding: 16px;
  height: auto;
  max-height: none;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.setup-hero-card > span,
.setup-hero-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.setup-hero-card strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 21px;
  font-weight: 850;
}

.shop-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.shop-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.setup-metrics {
  margin-bottom: 18px;
}

.setup-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.owner-handover-panel {
  margin-bottom: 18px;
}

.owner-handover-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.handover-item {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-subtle);
}

.handover-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.handover-item strong {
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.handover-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.setup-panel {
  margin-bottom: 0;
  overflow: hidden;
}

.setup-panel-wide {
  grid-column: 1 / -1;
}

.compact-fields {
  padding: 12px 0 0;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--violet));
}

.setup-timeline {
  position: relative;
  padding: 18px;
}

.setup-timeline .onboarding-step {
  position: relative;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-actions select {
  width: min(190px, 100%);
}

.hero-revenue-card {
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 18px;
  border: 1px solid rgba(13, 148, 136, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(79, 70, 229, 0.08)),
    rgba(255, 255, 255, 0.72);
}

.hero-revenue-card span,
.hero-revenue-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.hero-revenue-card strong {
  color: var(--ink);
  font-size: 27px;
  font-weight: 880;
  letter-spacing: -0.025em;
}

.dashboard-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.dashboard-grid-main.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-chart-panel,
.ops-health-card {
  min-height: 310px;
}

.ops-health-list {
  display: grid;
  gap: 10px;
}

.ops-health-item,
.insight-list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.ops-health-item:last-child,
.insight-list p:last-child {
  border-bottom: 0;
}

.ops-health-item strong,
.insight-list strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.insight-list span {
  color: var(--muted);
  font-weight: 720;
}

.ops-error-note {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-subtle);
}

.ops-error-note span,
.ops-error-note small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
}

.ops-error-note strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.ops-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(255, 255, 255, 0.96) 50%, rgba(255, 251, 235, 0.72));
  box-shadow: var(--shadow-md);
}

.ops-command-main h3 {
  margin-top: 7px;
  color: var(--ink);
  font-size: 25px;
  font-weight: 880;
  letter-spacing: -0.025em;
}

.ops-command-main p {
  max-width: 700px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

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

.ops-command-metrics div {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
}

.ops-command-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ops-command-metrics strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 880;
}

.ops-alert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-alert-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.055);
}

.ops-alert-card.has-alerts.severity-critical,
.ops-alert-card.has-alerts.severity-high {
  border-color: rgba(248, 113, 113, 0.36);
  background: linear-gradient(180deg, #fff, #fff7f7);
}

.ops-alert-card.has-alerts.severity-medium {
  border-color: rgba(245, 158, 11, 0.32);
  background: linear-gradient(180deg, #fff, #fffbeb);
}

.ops-alert-card.is-clear {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.ops-alert-head,
.ops-alert-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ops-alert-head h3 {
  margin-top: 5px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.ops-alert-head p,
.ops-alert-foot span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ops-alert-head > strong {
  display: inline-flex;
  min-width: 44px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 15px;
  font-weight: 880;
}

.has-alerts .ops-alert-head > strong {
  background: #fee2e2;
  color: #991b1b;
}

.ops-severity {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.severity-critical .ops-severity,
.severity-high .ops-severity {
  background: #fee2e2;
  color: #991b1b;
}

.severity-medium .ops-severity {
  background: #fef3c7;
  color: #92400e;
}

.ops-alert-table {
  margin: 0;
  border-radius: 14px;
  box-shadow: none;
}

.ops-alert-table table {
  min-width: 520px;
}

.ops-alert-foot {
  align-items: center;
}

.ops-alert-foot .btn {
  flex: 0 0 auto;
}

.restore-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(254, 202, 202, 0.9);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 247, 0.95));
  box-shadow: var(--shadow-md);
}

.restore-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.restore-danger-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 840;
  white-space: nowrap;
}

.restore-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.restore-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.restore-step-index {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.restore-step h4,
.restore-result-card h4 {
  color: var(--ink);
  font-size: 15px;
  font-weight: 860;
}

.restore-step p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.restore-step label {
  display: grid;
  gap: 6px;
}

.file-drop {
  padding: 13px;
  border: 1px dashed rgba(148, 163, 184, 0.9);
  border-radius: 14px;
  background: var(--surface-subtle);
  cursor: pointer;
}

.file-drop input {
  width: 100%;
}

.file-drop span {
  color: var(--ink);
  font-weight: 820;
}

.file-drop small {
  color: var(--muted);
  font-weight: 720;
  overflow-wrap: anywhere;
}

.restore-sensitive-line {
  margin-top: 10px;
}

.restore-final-step {
  border-color: rgba(254, 202, 202, 0.92);
}

.restore-result-card {
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  background: #fff;
}

.restore-result-card pre {
  max-height: 320px;
  margin-top: 10px;
  overflow: auto;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.modal.detail-modal {
  width: min(1180px, 100%);
  max-width: min(1180px, calc(100vw - 36px));
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.86), rgba(255, 255, 255, 0.96) 58%, rgba(239, 246, 255, 0.76));
}

.detail-head .page-title {
  margin-top: 5px;
}

.detail-head .actions {
  flex: 0 0 auto;
}

.detail-metrics {
  margin-top: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.detail-chart-panel {
  margin-top: 14px;
}

.detail-table-card {
  min-width: 0;
}

.detail-table-card .table-wrap {
  margin-top: 0;
  box-shadow: none;
}

.detail-table-card table {
  min-width: 560px;
}

.metric {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  padding: 17px;
  border-color: rgba(229, 231, 235, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 250, 250, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-md);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--violet));
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.metric-value {
  margin-top: 10px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.metric-icon {
  float: right;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  font-size: 17px;
}

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

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

.list-overview-card {
  display: grid;
  min-width: 0;
  min-height: 92px;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.045);
}

.list-overview-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 830;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.list-overview-card strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 880;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.list-overview-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.overview-blue {
  border-color: rgba(59, 130, 246, 0.2);
  background: linear-gradient(180deg, #fff, #eff6ff);
}

.overview-green {
  border-color: rgba(20, 184, 166, 0.22);
  background: linear-gradient(180deg, #fff, #f0fdfa);
}

.overview-yellow {
  border-color: rgba(245, 158, 11, 0.26);
  background: linear-gradient(180deg, #fff, #fffbeb);
}

.overview-red {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(180deg, #fff, #fff1f2);
}

.page-section {
  margin-top: 14px;
}

.form-grid {
  align-items: start;
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field > .page-subtitle,
.form-field > span:first-child {
  margin: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 830;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.actions-dense {
  padding: 6px;
  border: 1px solid rgba(226, 232, 240, 0.76);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.72);
}

.actions-dense .btn,
.actions-dense button,
.actions-dense a {
  min-height: 34px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px auto;
  gap: 10px;
  align-items: end;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
}

.filter-bar {
  position: relative;
  align-items: center;
  padding: 13px;
  border-color: rgba(226, 232, 240, 0.96);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
}

.filter-bar::before {
  content: "Bộ lọc";
  position: absolute;
  top: -9px;
  left: 14px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-bar input,
.filter-bar select {
  min-height: 40px;
  border-color: #dbe2ea;
  background-color: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.filter-bar input::placeholder {
  color: #94a3b8;
}

.filter-bar input[id*="Search"] {
  padding-left: 36px;
  background-image:
    radial-gradient(circle at 15px 18px, transparent 0 4px, #94a3b8 4px 5px, transparent 5px),
    linear-gradient(45deg, transparent 0 50%, #94a3b8 50% 62%, transparent 62%);
  background-position: 0 0, 23px 24px;
  background-size: 34px 40px, 8px 8px;
  background-repeat: no-repeat;
}

.filter-action {
  min-height: 40px;
  border-radius: 12px;
}

.head-actions {
  align-items: center;
  justify-content: flex-end;
  padding: 4px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.62);
}

.report-filters {
  grid-template-columns: 180px 180px repeat(4, auto);
}

.payment-filters {
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(140px, 180px)) repeat(2, minmax(130px, 160px)) minmax(220px, auto) auto;
}

.order-filters {
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 190px) repeat(2, minmax(130px, 160px)) minmax(240px, auto) repeat(2, auto);
}

.filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.filter-presets .btn {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.report-grid,
.report-visual-grid {
  align-items: start;
}

.report-lens-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-lens-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96));
  color: inherit;
  text-align: left;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.report-lens-card:hover {
  border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.report-lens-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.report-lens-card strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 880;
  letter-spacing: -0.02em;
}

.report-lens-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-card,
.report-chart-card {
  overflow: hidden;
}

.report-visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.report-chart-card {
  min-height: 290px;
}

.api-doc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.api-doc-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.api-doc-card p {
  margin: 10px 0;
  color: var(--muted);
}

.api-doc-card pre {
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: #111827;
  color: #edf2f1;
  white-space: pre-wrap;
  word-break: break-word;
}

.docs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(79, 70, 229, 0.07)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.docs-hero h3 {
  margin-top: 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.18;
}

.docs-hero p {
  margin-top: 9px;
  max-width: 760px;
  color: var(--ink-soft);
  font-weight: 620;
}

.docs-endpoints {
  display: grid;
  gap: 10px;
}

.docs-endpoints a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  text-decoration: none;
}

.docs-endpoints a:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  box-shadow: var(--shadow-sm);
}

.docs-endpoints span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.docs-endpoints code {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.quality-card {
  min-width: 0;
}

.quality-card .table-wrap {
  margin-top: 10px;
  max-height: 360px;
}

.go-live-list,
.onboarding-flow {
  display: grid;
  gap: 10px;
}

.shop-owner-quickstart {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.owner-action-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 250, 252, 0.92)),
    var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.owner-action-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
  box-shadow: var(--shadow);
}

.owner-action-card > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-weight: 900;
}

.owner-action-card strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 880;
}

.owner-action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.owner-action-card small {
  color: var(--accent);
  font-weight: 800;
}

.owner-action-card.is-done {
  border-color: color-mix(in srgb, var(--green) 34%, var(--border));
  background:
    linear-gradient(180deg, rgba(236, 253, 245, 0.72), rgba(255, 255, 255, 0.95)),
    var(--surface);
}

.owner-action-card.is-done > span {
  background: var(--green);
  color: #fff;
}

.go-live-item,
.onboarding-step {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 14px;
  text-align: left;
}

.go-live-item strong,
.onboarding-step strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.go-live-item p,
.go-live-item small,
.onboarding-step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.go-live-item.is-ok,
.onboarding-step.is-done {
  border-color: color-mix(in srgb, var(--green) 30%, var(--border));
  background: color-mix(in srgb, var(--green) 7%, var(--surface));
}

.go-live-item.needs-work {
  border-color: color-mix(in srgb, var(--yellow) 35%, var(--border));
  background: color-mix(in srgb, var(--yellow) 9%, var(--surface));
}

.go-live-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.btn-xs {
  min-height: 30px;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 11px;
  white-space: nowrap;
}

.onboarding-step {
  cursor: pointer;
  align-items: center;
}

.onboarding-step > span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
}

.onboarding-step.is-done > span {
  background: var(--green);
  color: white;
}

.onboarding-step > div {
  flex: 1;
}

.docs-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.docs-card-blue {
  border-top: 3px solid var(--violet);
}

.docs-card-green {
  border-top: 3px solid var(--accent);
}

.docs-card-yellow {
  border-top: 3px solid #f59e0b;
}

.docs-card-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.docs-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--surface-subtle);
  font-size: 20px;
}

.docs-card h3 {
  color: var(--ink);
  font-size: 16px;
  font-weight: 860;
}

.docs-card-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.docs-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.docs-list li {
  color: var(--ink-soft);
  font-weight: 620;
}

.docs-list code {
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 12px;
}

.link-button {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-hover);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: normal;
}

.link-button:hover {
  color: var(--accent);
}

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

.settings-summary-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96)),
    var(--surface);
  box-shadow: var(--shadow-md);
}

.settings-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-summary-card strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin: 0 0 16px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.settings-tab {
  display: grid;
  min-width: 0;
  gap: 2px;
  justify-items: start;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.settings-tab span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 850;
}

.settings-tab small {
  overflow: hidden;
  max-width: 100%;
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-tab:hover {
  background: var(--surface-subtle);
  color: var(--ink);
}

.settings-tab.active {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: linear-gradient(180deg, #fff, var(--accent-soft));
  color: var(--accent-ink);
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.1);
}

.settings-tab.active span {
  color: var(--accent-ink);
}

.settings-tools {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-search {
  display: grid;
  gap: 6px;
}

.settings-search span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.settings-tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.settings-layout.is-searching .settings-card[hidden] {
  display: block !important;
}

.settings-search-hidden {
  display: none !important;
}

.settings-validation {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-validation-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-weight: 840;
}

.settings-validation-list {
  display: grid;
  gap: 9px;
}

.settings-validation-item {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
}

.settings-validation-item.error {
  border-color: #fecaca;
  background: var(--red-bg);
}

.settings-validation-item.warning {
  border-color: #fde68a;
  background: var(--yellow-bg);
}

.settings-validation-item.ok {
  border-color: #bbf7d0;
  background: var(--green-bg);
}

.settings-validation-item strong {
  color: var(--ink);
}

.settings-validation-item p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-weight: 700;
}

.settings-validation-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.settings-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.settings-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.96)),
    var(--surface);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.055);
}

.settings-card[hidden],
[data-settings-extra][hidden] {
  display: none !important;
}

.settings-card:has(.bot-text-grid) {
  grid-column: 1 / -1;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px 14px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.settings-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
}

.settings-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-meta {
  flex: 0 0 auto;
  max-width: 160px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 17px;
}

.settings-fields label,
.setting-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.settings-fields .setting-field:has(input[type="password"]),
.settings-fields .setting-field:has(input[id$="Key"]),
.settings-fields .setting-field:has(input[id$="Token"]),
.settings-fields .setting-field:has(input[id$="Secret"]),
.settings-fields .setting-field:has(input[id$="Url"]),
.settings-fields .setting-field:has(input[id$="Domain"]),
.settings-fields .setting-field:has(input[id="usdtAddress"]) {
  grid-column: 1 / -1;
}

.setting-label,
.settings-fields .page-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.settings-fields small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.bot-setup-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
  min-width: 0;
}

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

.bot-setup-status > div,
.bot-setup-url {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 94%, var(--accent-soft));
}

.bot-setup-status span,
.bot-setup-url span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.bot-setup-status strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-setup-status small {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bot-setup-url code {
  display: block;
  overflow: auto;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
}

.onboarding-bot-card {
  margin-top: 16px;
}

.onboarding-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 10px;
}

.setting-toggle {
  grid-column: span 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-subtle);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.setting-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.setting-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.16);
  transition: background 0.16s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.24);
  transition: transform 0.16s ease;
}

.setting-toggle input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--accent), #14b8a6);
}

.setting-toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.toggle-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.toggle-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.toggle-state {
  min-width: 42px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--gray-fg);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.toggle-state::before {
  content: attr(data-off);
}

.setting-toggle input:checked ~ .toggle-state {
  background: var(--green-bg);
  color: var(--green-fg);
}

.setting-toggle input:checked ~ .toggle-state::before {
  content: attr(data-on);
}

.integration-test {
  align-self: end;
  min-height: 40px;
}

.activity-feed {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.activity-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--surface-subtle);
  font-size: 18px;
}

.activity-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.activity-title strong {
  color: var(--ink);
  font-weight: 820;
}

.activity-title span {
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--gray-fg);
  font-size: 11px;
  font-weight: 760;
}

.activity-item p {
  margin-top: 4px;
  color: var(--ink-soft);
  font-weight: 700;
}

.activity-item pre,
.modal-code {
  overflow: auto;
  max-height: 420px;
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 10px;
  background: #111827;
  color: #e5eef8;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-item time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.settings-fields input {
  min-height: 42px;
  background: #fff;
}

.settings-fields textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.settings-fields textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-color: var(--accent);
}

.setting-field-wide {
  grid-column: 1 / -1;
}

.bot-text-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bot-text-grid section {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-subtle);
}

.bot-text-grid h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 880;
}

.bot-button-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bot-button-grid section {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.bot-button-grid h4 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
}

.bot-button-grid .setting-field {
  grid-template-columns: 1fr;
  gap: 6px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}

.bot-button-grid .setting-field .setting-label {
  align-self: start;
  line-height: 1.25;
}

.bot-button-grid .setting-field input {
  min-height: 36px;
}

.bot-button-grid .setting-field small {
  margin-top: -1px;
  line-height: 1.3;
}

.telegram-preview {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #d8ecd2;
}

.telegram-preview span {
  color: #31533a;
  font-size: 12px;
  font-weight: 840;
}

.telegram-preview div {
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: #fff;
  color: #111827;
  white-space: pre-wrap;
  box-shadow: var(--shadow-sm);
}

.settings-raw {
  margin-top: 18px;
}

.settings-raw summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.report-chart {
  min-height: 190px;
}

.chart-bars {
  display: flex;
  min-height: 168px;
  align-items: end;
  gap: 9px;
  overflow-x: auto;
  padding: 18px 2px 2px;
}

.chart-bar-item {
  display: grid;
  min-width: 46px;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.chart-bar {
  width: 30px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #2dd4bf, var(--accent));
}

.donut-layout {
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 16px;
}

.donut {
  position: relative;
  display: grid;
  width: 152px;
  height: 152px;
  place-items: center;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: inherit;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.donut span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  color: var(--ink);
  font-weight: 800;
}

.donut small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legend,
.hbar-list {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.legend-row,
.hbar-row {
  display: grid;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.legend-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

button.legend-row,
button.hbar-row {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 7px;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

button.legend-row:hover,
button.hbar-row:hover,
.drill-table-row:hover {
  background: var(--surface-subtle);
}

.legend-row strong {
  font-variant-numeric: tabular-nums;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: middle;
}

.hbar-row {
  grid-template-columns: minmax(110px, 0.8fr) minmax(120px, 1.5fr) auto;
}

.hbar-label {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hbar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.hbar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2dd4bf, var(--accent));
}

.hbar-muted {
  background: linear-gradient(90deg, #fbbf24, var(--yellow-fg));
}

.dual-bars {
  display: grid;
  grid-template-columns: repeat(14, minmax(28px, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}

.dual-bar-item {
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.dual-bar-columns {
  display: flex;
  height: 128px;
  align-items: end;
  gap: 3px;
}

.dual-bar {
  display: block;
  width: 8px;
  border-radius: 4px 4px 1px 1px;
}

.dual-bar.first,
.legend-dot.first {
  background: var(--blue-fg);
}

.dual-bar.second,
.legend-dot.second {
  background: var(--red-fg);
}

.dual-legend {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.field,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input,
select {
  min-height: 42px;
}

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;
}

input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, #fff);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

textarea {
  min-height: 220px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.btn,
.action,
.actions a,
.actions button,
.modal-actions button,
button.secondary,
button.danger,
.toolbar button,
td button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 9px 13px;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(13, 148, 136, 0.16);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:hover,
.action:hover,
.actions a:hover,
.actions button:hover,
.modal-actions button:hover,
button.secondary:hover,
button.danger:hover,
.toolbar button:hover,
td button:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.2);
}

.btn:active,
.actions button:active,
button.secondary:active,
button.danger:active,
td button:active {
  transform: translateY(1px);
}

.btn-secondary,
button.secondary,
.actions .btn-secondary,
td button.secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
button.secondary:hover,
.actions .btn-secondary:hover,
td button.secondary:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border-strong));
  background: var(--surface-alt);
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(17, 24, 39, 0.07);
}

.btn-danger,
button.danger,
.btn.danger,
td button.danger {
  border-color: #fecaca;
  background: var(--red-bg);
  color: var(--red-fg);
}

.btn-danger:hover,
button.danger:hover,
.btn.danger:hover,
td button.danger:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
  box-shadow: 0 6px 14px rgba(185, 28, 28, 0.12);
}

td button {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: none;
}

td button + button,
td button + .btn,
td .btn + button {
  margin-left: 6px;
}

td:has(button) {
  white-space: nowrap;
}

.row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.row-actions .table-action {
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  box-shadow: none;
}

.row-actions .table-action:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.row-actions .action-edit {
  color: var(--accent);
}

.row-actions .action-edit:hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}

.row-actions .action-stock {
  color: var(--blue-fg);
}

.row-actions .action-stock:hover {
  background: var(--blue-bg);
  border-color: color-mix(in srgb, var(--blue-fg) 20%, transparent);
}

.row-actions .action-copy {
  color: var(--gray-fg);
}

.row-actions .action-copy:hover {
  background: var(--gray-bg);
  border-color: var(--border);
}

.row-actions .action-hide {
  color: var(--yellow-fg);
}

.row-actions .action-hide:hover {
  background: var(--yellow-bg);
  border-color: color-mix(in srgb, var(--yellow-fg) 20%, transparent);
}

.row-actions .action-show {
  color: var(--green-fg);
}

.row-actions .action-show:hover {
  background: var(--green-bg);
  border-color: color-mix(in srgb, var(--green-fg) 20%, transparent);
}

td .table-action {
  min-height: 31px;
  margin: 2px 3px 2px 0;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  box-shadow: var(--shadow-sm);
}

td .table-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 14px rgba(17, 24, 39, 0.08);
}

td .table-action.action-edit {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
  background: var(--accent-soft);
  color: var(--accent);
}

td .table-action.action-stock {
  border-color: color-mix(in srgb, var(--blue-fg) 20%, var(--border));
  background: var(--blue-bg);
  color: var(--blue-fg);
}

td .table-action.action-copy {
  border-color: var(--border);
  background: var(--gray-bg);
  color: var(--gray-fg);
}

td .table-action.action-hide {
  border-color: color-mix(in srgb, var(--yellow-fg) 22%, var(--border));
  background: var(--yellow-bg);
  color: var(--yellow-fg);
}

td .table-action.action-show {
  border-color: color-mix(in srgb, var(--green-fg) 22%, var(--border));
  background: var(--green-bg);
  color: var(--green-fg);
}

.filters .btn,
.filters button {
  min-height: 38px;
}

.modal-actions {
  align-items: center;
}

.modal-actions .btn,
.modal-actions button {
  min-width: 108px;
}

.product-id {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--gray-fg);
  font-size: 12px;
  font-weight: 820;
}

.product-main-cell strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.table-wrap,
.data-table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 18px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.mobile-table-hint {
  display: none;
}

table,
.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  color: #64748b;
  font-size: 11px;
  font-weight: 840;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 -1px 0 rgba(226, 232, 240, 0.78);
}

.sortable-th {
  position: relative;
  cursor: pointer;
  user-select: none;
  transition: color 0.18s ease, background 0.18s ease;
}

.sortable-th::after {
  content: "↕";
  display: inline-block;
  margin-left: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  opacity: 0.72;
}

.sortable-th:hover {
  color: var(--ink);
  background: #eef6ff;
}

.sortable-th:hover::after {
  color: var(--accent);
  opacity: 1;
}

.sortable-th[data-sort-dir="asc"]::after {
  content: "↑";
  color: var(--accent);
  opacity: 1;
}

.sortable-th[data-sort-dir="desc"]::after {
  content: "↓";
  color: var(--accent);
  opacity: 1;
}

.sortable-th[data-sort-dir] {
  color: var(--ink);
}

.list-sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 10px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
}

.list-sort-bar > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.list-sort-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.list-sort-bar select {
  min-height: 36px;
  min-width: 180px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 760;
}

.sort-dir-group {
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid rgba(203, 213, 225, 0.75);
  border-radius: 999px;
  background: #f8fafc;
}

.sort-dir-button {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.sort-dir-button.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.09);
}

#content [data-list-key] th:not(:has(input)):not(:last-child) {
  cursor: pointer;
  user-select: none;
}

#content [data-list-key] th:not(:has(input)):not(:last-child)::after {
  content: "↕";
  display: inline-block;
  margin-left: 5px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  opacity: 0.72;
}

#content [data-list-key] th:not(:has(input)):not(:last-child):hover {
  color: var(--ink);
  background: #eef6ff;
}

#content [data-list-key] th:not(:has(input)):not(:last-child):hover::after {
  color: var(--accent);
  opacity: 1;
}

#content [data-list-key] th[data-sort-dir="asc"]::after {
  content: "↑";
  color: var(--accent);
  opacity: 1;
}

#content [data-list-key] th[data-sort-dir="desc"]::after {
  content: "↓";
  color: var(--accent);
  opacity: 1;
}

td {
  padding: 14px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.76);
  color: var(--ink-soft);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.42);
}

tbody tr:nth-child(even):hover {
  background: #f3f7fb;
}

.numeric-cell {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  white-space: nowrap;
}

.status-cell {
  white-space: nowrap;
}

.code-cell code {
  display: inline-block;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.dashboard-recent {
  overflow: visible;
}

.dashboard-recent .table-wrap {
  width: 100%;
  overflow-x: auto;
}

.dashboard-recent table.dashboard-table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.dashboard-recent td,
.dashboard-recent th {
  white-space: normal;
  overflow-wrap: anywhere;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.pagination-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-summary strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.page-size-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.page-size-control select {
  min-width: 84px;
  height: 36px;
  padding: 0 32px 0 12px;
  border-radius: 12px;
}

.pager-button {
  min-height: 36px;
  padding: 0 12px;
}

.page-indicator {
  min-width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.dashboard-recent code,
.dashboard-recent .badge {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.mono,
code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

code {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 8px;
  color: #1e293b;
  background: #f8fafc;
  padding: 2px 5px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  min-height: 22px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.72;
}

.badge-green { background: var(--green-bg); color: var(--green-fg); }
.badge-red { background: var(--red-bg); color: var(--red-fg); }
.badge-blue { background: var(--blue-bg); color: var(--blue-fg); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow-fg); }
.badge-gray { background: var(--gray-bg); color: var(--gray-fg); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(6px);
}

.modal {
  width: min(760px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.modal.wide-modal {
  width: min(1080px, 100%);
}

.modal.notification-center-modal {
  width: min(1040px, 100%);
}

.notification-center-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.notification-center-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-subtle);
}

.notification-center-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.notification-center-summary strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.notification-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.notification-center-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.notification-center-card.has-alerts {
  border-color: rgba(245, 158, 11, 0.34);
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.98));
}

.notification-center-card.severity-critical,
.notification-center-card.severity-high {
  border-color: rgba(239, 68, 68, 0.32);
}

.notification-center-card h3 {
  margin: 8px 0 4px;
  font-size: 15px;
}

.notification-center-card p,
.notification-center-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.notification-center-card small {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.notification-center-card-actions {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: end;
}

.notification-center-card-actions strong {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-weight: 900;
}

.drilldown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

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

.drilldown-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-subtle);
}

.drilldown-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.drilldown-metric strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 840;
  text-overflow: ellipsis;
}

.modal.login-modal {
  width: min(920px, 100%);
  padding: 0;
  overflow: hidden;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1fr);
  min-height: 520px;
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.16), transparent 260px),
    linear-gradient(160deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.98)),
    var(--sidebar);
  color: #dbeafe;
}

.login-hero h2 {
  color: #fff;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.login-hero p {
  margin-top: 10px;
  color: #b6c4d8;
}

.login-logo {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #14b8a6, #4f46e5);
  color: #fff;
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.28);
}

.login-points {
  display: grid;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.login-points span {
  display: flex;
  gap: 8px;
  align-items: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

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

.login-form .page-title {
  font-size: 24px;
}

.login-form input {
  min-height: 42px;
}

.form-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.form-error {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red-fg);
  font-size: 13px;
  font-weight: 650;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.checkbox-line input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--accent);
}

.data-table input[type="checkbox"],
.table-wrap input[type="checkbox"][data-check-all],
.table-wrap input[type="checkbox"][data-select-product],
.table-wrap input[type="checkbox"][data-select-ticket] {
  display: inline-grid;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--accent);
  justify-self: center;
}

th:has(input[type="checkbox"]),
td:has(input[type="checkbox"][data-select-product]),
td:has(input[type="checkbox"][data-select-ticket]) {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.empty {
  display: grid;
  min-height: 118px;
  place-items: center;
  padding: 30px;
  border: 1px dashed rgba(148, 163, 184, 0.5);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
  color: var(--muted);
  font-weight: 760;
  text-align: center;
}

td.empty {
  display: table-cell;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 236px minmax(0, 1fr);
  }

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

  .toolbar {
    align-items: flex-start;
  }

  #adminInfo {
    max-width: 180px;
  }
}

@media (max-width: 820px) {
  body {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  .setup-hero,
  .setup-form-grid,
  .owner-handover-grid,
  .shop-owner-quickstart {
    grid-template-columns: 1fr;
  }

  .setup-hero {
    padding: 18px;
  }

  .setup-hero-main h2 {
    font-size: 25px;
  }

  aside {
    position: sticky;
    top: 0;
    z-index: 9;
    height: auto;
    padding: 9px 10px 7px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .brand {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 4px;
    padding: 0 2px 9px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
  }

  .brand h1 {
    font-size: 14px;
  }

  .brand p {
    display: none;
  }

  nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 2px;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .nav-section {
    display: flex;
    flex: 0 0 auto;
    gap: 5px;
    padding: 0 8px 0 0;
    margin: 0;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: transparent;
  }

  .nav-section:last-child {
    border-right: 0;
  }

  aside button {
    flex: 0 0 auto;
    width: auto;
    min-height: 32px;
    padding: 7px 10px;
    margin: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
  }

  .nav-item {
    width: auto;
    margin-left: 0;
    padding-left: 10px;
    color: #cbd5e1;
    font-size: 12.5px;
  }

  .nav-item::before {
    display: none;
  }

  .nav-item.active {
    box-shadow: none;
    background: rgba(20, 184, 166, 0.22);
    color: #fff;
  }

  .nav-label {
    display: none;
  }

  .logout-button {
    display: none;
  }

  main {
    padding: 8px 10px 24px;
  }

  .toolbar {
    position: static;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    margin: -8px -10px 10px;
    padding: 8px 10px 9px;
    gap: 8px;
  }

  .toolbar-title-wrap {
    flex: 1 1 180px;
    gap: 9px;
  }

  .toolbar-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 13px;
  }

  .toolbar-title {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }

  .toolbar-title strong {
    display: block;
    max-width: 170px;
    font-size: 13px;
  }

  .toolbar-title span {
    font-size: 10px;
  }

  .global-search {
    flex: 1 1 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    order: 3;
  }

  .global-search input {
    height: 38px;
  }

  .notification-center-button {
    flex: 1 1 100%;
    order: 4;
    width: 100%;
    justify-content: center;
  }

  .session-panel {
    display: grid;
    flex: 1 1 100%;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .connection-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 34px;
    max-width: none;
    padding: 5px 8px;
    border-radius: 12px;
    min-width: 0;
  }

  .user-menu {
    min-width: 0;
  }

  .user-menu-toggle {
    width: 100%;
    min-height: 36px;
    justify-content: space-between;
    border-radius: 12px;
  }

  .user-menu-dropdown {
    right: 0;
    left: auto;
    min-width: min(220px, calc(100vw - 28px));
  }

  #adminInfo {
    max-width: none;
  }

  .admin-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .admin-meta small {
    display: none;
  }

  .admin-meta strong,
  .connection-pill span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .search-result-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .search-result-kind {
    min-width: 0;
    justify-self: start;
  }

  .order-timeline {
    gap: 8px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .permission-groups {
    grid-template-columns: 1fr;
  }

  .import-preview-grid {
    grid-template-columns: 1fr;
  }

  .action-center,
  .action-center-grid {
    grid-template-columns: 1fr;
  }

  #openLogin,
  #changePassword {
    min-height: 34px;
    padding: 6px 10px;
    width: 100%;
    border-radius: 12px;
  }

  .page-head,
  .panel-head,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head .actions,
  .panel-head .actions,
  .section-head .actions {
    width: 100%;
  }

  .page-head > div[style*="display:flex"],
  .panel-head > div[style*="display:flex"],
  .section-head > div[style*="display:flex"] {
    display: grid !important;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .page-head button,
  .page-head .btn,
  .page-head select {
    margin-left: 0;
    width: 100%;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
  }

  .pagination-summary {
    justify-content: space-between;
  }

  .pagination-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .page-size-control {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
    white-space: normal;
  }

  .page-size-control select {
    width: 120px;
    min-width: 120px;
  }

  .page-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 38px;
  }

  .pager-button {
    width: 100%;
    min-height: 38px;
  }

  .page-title {
    font-size: 18px;
  }

  .panel {
    padding: 14px;
    border-radius: 12px;
  }

  .grid,
  .list-overview-grid,
  .filters,
  .report-filters,
  .report-visual-grid,
  .report-lens-grid,
  .dashboard-hero,
  .dashboard-grid-main,
  .dashboard-grid-main.compact,
  .api-doc-grid,
  .docs-hero,
  .docs-grid,
  .quality-grid,
  .bot-text-grid,
  .bot-button-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .list-overview-grid {
    gap: 9px;
    margin: 0 0 14px;
  }

  .list-overview-card {
    min-height: 76px;
    padding: 12px;
    border-radius: 14px;
  }

  .list-overview-card strong {
    font-size: 19px;
  }

  .actions-dense {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .form-grid,
  .form-field {
    min-width: 0;
  }

  .dashboard-hero {
    padding: 16px;
    border-radius: 17px;
    overflow: hidden;
  }

  .dashboard-hero h2 {
    font-size: 25px;
    overflow-wrap: anywhere;
  }

  .dashboard-hero p,
  .hero-revenue-card,
  .hero-revenue-card strong,
  .report-lens-card,
  .report-lens-card strong,
  .report-lens-card small {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .hero-actions,
  .hero-actions select,
  .hero-actions .btn {
    width: 100%;
  }

  .hero-revenue-card strong {
    font-size: 22px;
  }

  .dashboard-chart-panel,
  .ops-health-card {
    min-height: auto;
  }

  .ops-command-panel,
  .ops-alert-grid,
  .restore-steps {
    grid-template-columns: 1fr;
  }

  .ops-command-panel,
  .restore-panel {
    padding: 14px;
    border-radius: 17px;
  }

  .ops-command-main h3 {
    font-size: 21px;
  }

  .ops-command-metrics {
    grid-template-columns: 1fr;
  }

  .ops-command-metrics div {
    min-height: 72px;
  }

  .ops-alert-card {
    padding: 13px;
    border-radius: 15px;
  }

  .ops-alert-head,
  .ops-alert-foot,
  .restore-panel-head {
    display: grid;
    gap: 10px;
  }

  .ops-alert-head > strong {
    justify-self: start;
  }

  .ops-alert-foot .btn {
    width: 100%;
  }

  .restore-danger-badge {
    justify-self: start;
    white-space: normal;
  }

  .restore-step {
    grid-template-columns: 1fr;
  }

  .restore-step-index {
    width: 26px;
    height: 26px;
  }

  .file-drop {
    padding: 11px;
  }

  .restore-result-card pre {
    max-height: 260px;
  }

  .modal.detail-modal {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
  }

  .modal.notification-center-modal {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
  }

  .notification-center-summary,
  .notification-center-grid,
  .notification-center-card {
    grid-template-columns: 1fr;
  }

  .notification-center-card-actions {
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: stretch;
  }

  .notification-center-card-actions .btn {
    width: 100%;
  }

  .detail-head,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-head {
    display: grid;
    padding: 13px;
    border-radius: 15px;
  }

  .detail-head .actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .detail-table-card table {
    min-width: 0;
  }

  .report-lens-card {
    padding: 14px;
  }

  .drilldown-head {
    display: grid;
  }

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

  .settings-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .settings-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin-right: -4px;
    margin-left: -4px;
    padding: 6px 4px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scroll-snap-type: x proximity;
  }

  .settings-tab {
    flex: 0 0 172px;
    scroll-snap-align: start;
    border-color: var(--border);
    background: #fff;
  }

  .settings-tab small {
    white-space: normal;
  }

  .settings-tools {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .settings-tool-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-tool-actions .btn {
    width: 100%;
  }

  .settings-summary-card {
    padding: 12px;
    border-radius: 12px;
  }

  .settings-card {
    border-radius: 13px;
  }

  .settings-card-head {
    display: grid;
    gap: 9px;
    padding: 13px;
  }

  .settings-meta {
    max-width: 100%;
    justify-self: start;
  }

  .settings-fields {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px;
  }

  .bot-setup-status {
    grid-template-columns: 1fr;
  }

  .docs-hero {
    padding: 16px;
    border-radius: 16px;
  }

  .docs-hero h3 {
    font-size: 21px;
  }

  .docs-card {
    padding: 14px;
    border-radius: 14px;
  }

  .docs-card-head {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .docs-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .docs-list {
    padding-left: 18px;
  }

  .bot-text-grid section {
    padding: 12px;
  }

  .bot-button-grid section {
    padding: 10px;
  }

  .setting-toggle {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 68px;
    padding: 11px;
  }

  .setting-toggle .toggle-state {
    grid-column: 2;
    justify-self: start;
  }

  .integration-test {
    width: 100%;
  }

  .activity-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .activity-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .activity-item time {
    grid-column: 2;
    white-space: normal;
  }

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

  .license-feature-grid {
    grid-template-columns: 1fr;
  }

  .license-plan-card {
    display: grid;
  }

  .license-info-grid,
  .license-usage-grid {
    grid-template-columns: 1fr;
  }

  .license-feature {
    flex-direction: column;
    gap: 10px;
  }

  .metric {
    min-height: 94px;
    padding: 13px 13px 13px 15px;
  }

  .metric-value {
    font-size: 21px;
  }

  .actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .actions > *,
  .filters > *,
  .report-filters > * {
    width: 100%;
  }

  .filter-bar {
    padding: 14px 12px 12px;
    border-radius: 15px;
  }

  .filter-bar::before {
    left: 12px;
  }

  .head-actions {
    display: grid !important;
    width: 100%;
    grid-template-columns: 1fr;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .report-chart-card,
  .card,
  .panel {
    max-width: 100%;
  }

  .table-wrap {
    margin-inline: -2px;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .mobile-table-hint {
    display: none;
  }

  .list-sort-bar {
    display: grid;
    gap: 8px;
    margin: 10px 0;
    padding: 10px;
    border-radius: 14px;
  }

  .list-sort-bar > div {
    width: 100%;
    justify-content: space-between;
  }

  .list-sort-bar select {
    min-width: 0;
    width: min(210px, 62vw);
  }

  .sort-dir-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .sort-dir-button {
    width: 100%;
  }

  #content .table-wrap table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  #content .table-wrap thead,
  #content .table-wrap colgroup {
    display: none;
  }

  #content .table-wrap tbody {
    display: grid;
    gap: 10px;
  }

  #content .table-wrap tr {
    display: grid;
    gap: 9px;
    padding: 13px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 15px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
  }

  #content .table-wrap td {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
    padding: 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  #content .table-wrap td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 10px;
    font-weight: 840;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  #content .table-wrap td:only-child,
  #content .table-wrap td[colspan] {
    display: block;
  }

  #content .table-wrap td:only-child::before,
  #content .table-wrap td[colspan]::before {
    display: none;
  }

  #content .table-wrap td button,
  #content .table-wrap td .btn {
    width: 100%;
    margin-top: 4px;
    margin-left: 0;
    white-space: normal;
  }

  #content .table-wrap td .row-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0;
  }

  #content .table-wrap td .row-actions .table-action {
    width: 100%;
    min-height: 34px;
    margin: 0;
  }

  #content .table-wrap td > .table-action {
    width: 100%;
    min-height: 34px;
    margin: 3px 0;
  }

  #content .table-wrap td.action-cell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #content .table-wrap td.action-cell::before {
    display: block;
    grid-column: 1 / -1;
  }

  #content .table-wrap td.action-cell .table-action {
    width: 100%;
    min-height: 36px;
    margin: 0;
  }

  #content .table-wrap .badge {
    justify-self: start;
  }

  #content .table-wrap .code-cell code,
  #content .table-wrap code {
    max-width: 100%;
    white-space: normal;
  }

  #content .products-table-wrap tr.product-table-row {
    position: relative;
    gap: 10px;
    padding: 14px;
  }

  #content .products-table-wrap tr.product-table-row td:nth-child(2) {
    position: absolute;
    top: 12px;
    right: 12px;
    display: block;
  }

  #content .products-table-wrap tr.product-table-row td:nth-child(2)::before {
    display: none;
  }

  #content .products-table-wrap .product-main-cell {
    padding-right: 52px;
  }

  #content .products-table-wrap .product-main-cell strong {
    display: block;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  #content .products-table-wrap td:nth-child(4),
  #content .products-table-wrap td:nth-child(5),
  #content .products-table-wrap td:nth-child(6),
  #content .products-table-wrap td:nth-child(7),
  #content .products-table-wrap td:nth-child(8),
  #content .products-table-wrap td:nth-child(9) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 11px;
    background: var(--surface-subtle);
  }

  #content .products-table-wrap td:nth-child(4)::before,
  #content .products-table-wrap td:nth-child(5)::before,
  #content .products-table-wrap td:nth-child(6)::before,
  #content .products-table-wrap td:nth-child(7)::before,
  #content .products-table-wrap td:nth-child(8)::before,
  #content .products-table-wrap td:nth-child(9)::before {
    flex: 0 0 auto;
  }

  #content .products-table-wrap td.action-cell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 4px;
  }

  #content .products-table-wrap td.action-cell .table-action {
    min-height: 38px;
  }

  .modal.order-detail-modal {
    padding: 12px;
  }

  .modal.order-detail-modal > .page-title {
    padding: 2px 2px 8px;
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .modal.order-detail-modal .metric-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px !important;
  }

  .modal.order-detail-modal .metric {
    min-height: auto;
    padding: 11px 12px;
  }

  .modal.order-detail-modal .grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal.order-detail-modal .panel {
    padding: 12px;
    margin-bottom: 10px;
  }

  .modal.order-detail-modal .table-wrap tr {
    padding: 11px;
    gap: 7px;
  }

  .modal.order-detail-modal .table-wrap td {
    gap: 3px;
  }

  .modal.order-detail-modal pre,
  .modal.order-detail-modal code {
    white-space: pre-wrap;
    word-break: break-word;
  }

  #content .table-wrap td select,
  #content .table-wrap td input {
    min-width: 0;
  }

  .modal .table-wrap {
    margin-inline: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .modal .table-wrap table {
    display: block;
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .modal .table-wrap thead,
  .modal .table-wrap colgroup {
    display: none;
  }

  .modal .table-wrap tbody {
    display: grid;
    gap: 9px;
  }

  .modal .table-wrap tr {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .modal .table-wrap td {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
    padding: 0;
    border-bottom: 0;
    overflow-wrap: anywhere;
  }

  .modal .table-wrap td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 10px;
    font-weight: 840;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .modal .table-wrap td:only-child,
  .modal .table-wrap td[colspan] {
    display: block;
  }

  .modal .table-wrap td:only-child::before,
  .modal .table-wrap td[colspan]::before {
    display: none;
  }

  .modal .table-wrap code,
  .modal .table-wrap pre {
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .dashboard-recent table.dashboard-table {
    display: block;
    min-width: 0;
  }

  .dashboard-recent tr {
    table-layout: auto;
  }

  .hbar-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 9px;
    white-space: normal;
  }

  .hbar-label {
    white-space: normal;
  }

  .hbar-row strong,
  .legend-row strong {
    justify-self: start;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .legend-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 9px;
  }

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

  .modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
    padding: 15px;
  }

  .modal.login-modal {
    border-radius: 16px;
  }

  .login-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .login-hero {
    padding: 20px;
  }

  .login-hero h2 {
    font-size: 22px;
  }

  .login-points {
    display: none;
  }

  .login-form {
    padding: 20px;
  }

  .login-form .page-title {
    font-size: 22px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn,
  .modal-actions button {
    width: 100%;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }
}

@media (max-width: 520px) {
  .toolbar {
    margin-bottom: 8px;
  }

  .grid,
  .report-grid,
  .report-visual-grid {
    gap: 10px;
  }

  .metric-grid,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .metric-label {
    font-size: 11px;
  }

  .session-panel {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    grid-template-columns: 1fr;
  }

  .dual-bars {
    overflow-x: auto;
    grid-template-columns: repeat(14, 32px);
    padding-bottom: 4px;
  }

  .drilldown-grid,
  .settings-summary {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .panel,
  .card {
    border-radius: 14px;
  }

  .report-lens-card strong,
  .hero-revenue-card strong {
    font-size: 20px;
  }
}
