:root {
  --bg: #eef2f4;
  --surface: #ffffff;
  --surface-soft: #f7f9fa;
  --ink: #15202e;
  --muted: #687586;
  --line: #dce4e8;
  --line-strong: #c9d4da;
  --sidebar: #111a22;
  --sidebar-soft: #1a2630;
  --accent: #0aa77a;
  --accent-dark: #087c60;
  --accent-soft: #e2f6ef;
  --blue: #3277db;
  --blue-soft: #eaf1fc;
  --amber: #bf7a0b;
  --amber-soft: #fff3d7;
  --red: #c74545;
  --red-soft: #fdeaea;
  --violet: #7158c8;
  --violet-soft: #f0edfb;
  --shadow: 0 12px 30px rgba(28, 42, 52, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.45;
}

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

button {
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(400px, 0.65fr);
  background: var(--surface);
}

.login-visual {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 56px;
  background-color: #17313a;
  background-image: url("/app/assets/panda-cloud-login.png");
  background-position: center;
  background-size: cover;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 24, 31, 0.42);
}

.login-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  color: #fff;
}

.eyebrow,
.form-step,
.drawer-kicker,
.section-kicker {
  color: #71e3bf;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-visual h1 {
  max-width: 620px;
  margin: 14px 0;
  font-size: 44px;
  line-height: 1.14;
  letter-spacing: 0;
}

.login-visual p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 17px;
}

.login-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.login-proof span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(9, 28, 32, 0.54);
  font-size: 13px;
  font-weight: 700;
}

.login-panel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 52px clamp(36px, 5vw, 82px);
  background: #fbfcfd;
}

.login-brand,
.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand {
  margin-bottom: 54px;
}

.login-brand img,
.brand-block img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}

.login-brand strong,
.brand-block strong {
  display: block;
  font-size: 18px;
}

.login-brand span,
.brand-block span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.login-form {
  width: 100%;
  max-width: 440px;
}

.form-heading {
  margin-bottom: 28px;
}

.form-heading h2 {
  margin: 7px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.form-heading p,
.login-security {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.login-form label,
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.login-form label > span,
.field > span,
.field-label {
  color: #334254;
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

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

textarea {
  min-height: 104px;
  resize: vertical;
  padding: 10px 11px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 167, 122, 0.12);
}

.primary-btn,
.secondary-btn,
.danger-btn,
.warning-btn,
.text-btn,
.table-btn,
.icon-btn {
  border: 0;
  cursor: pointer;
}

.primary-btn,
.secondary-btn,
.danger-btn,
.warning-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 7px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.primary-btn {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 7px 18px rgba(10, 167, 122, 0.18);
}

.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  color: #304052;
  border: 1px solid var(--line-strong);
  background: #fff;
}

.secondary-btn:hover {
  border-color: #94a6af;
  background: #f7f9fa;
}

.danger-btn {
  color: #fff;
  background: var(--red);
}

.warning-btn {
  color: #fff;
  background: var(--amber);
}

.full {
  width: 100%;
  min-height: 46px;
}

.text-btn {
  display: block;
  margin: 14px auto 0;
  color: var(--accent-dark);
  background: transparent;
  font-weight: 700;
}

.form-error,
.modal-error {
  min-height: 20px;
  margin: 2px 0 9px;
  color: var(--red);
  font-size: 13px;
  font-weight: 650;
}

.login-security {
  max-width: 440px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  line-height: 1.7;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 242px minmax(0, 1fr);
}

.sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 18px 14px 14px;
  color: #e7eef2;
  background: var(--sidebar);
}

.brand-block {
  min-height: 58px;
  padding: 0 7px 17px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block img {
  width: 40px;
  height: 40px;
}

.brand-block strong {
  color: #fff;
  font-size: 16px;
}

.brand-block span {
  color: #8fa0aa;
}

.sidebar-close {
  display: none !important;
  margin-left: auto;
}

.side-nav {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  margin-top: 12px;
  padding-right: 2px;
  overflow-y: auto;
}

.nav-group-label {
  margin: 13px 9px 5px;
  color: #6f838e;
  font-size: 11px;
  font-weight: 800;
}

.nav-item {
  width: 100%;
  min-height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  color: #adbbc3;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: var(--sidebar-soft);
}

.nav-item.active {
  color: #fff;
  background: #17664f;
}

.nav-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #b9e9d9;
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
}

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

.nav-icon-layout-dashboard { --nav-icon: url("/app/assets/icons/layout-dashboard.svg"); }
.nav-icon-users { --nav-icon: url("/app/assets/icons/users.svg"); }
.nav-icon-server { --nav-icon: url("/app/assets/icons/server.svg"); }
.nav-icon-receipt-text { --nav-icon: url("/app/assets/icons/receipt-text.svg"); }
.nav-icon-wallet { --nav-icon: url("/app/assets/icons/wallet.svg"); }
.nav-icon-list-checks { --nav-icon: url("/app/assets/icons/list-checks.svg"); }
.nav-icon-shield-alert { --nav-icon: url("/app/assets/icons/shield-alert.svg"); }
.nav-icon-headphones { --nav-icon: url("/app/assets/icons/headphones.svg"); }
.nav-icon-messages-square { --nav-icon: url("/app/assets/icons/messages-square.svg"); }
.nav-icon-megaphone { --nav-icon: url("/app/assets/icons/megaphone.svg"); }
.nav-icon-bell { --nav-icon: url("/app/assets/icons/bell.svg"); }
.nav-icon-settings { --nav-icon: url("/app/assets/icons/settings.svg"); }
.nav-icon-scroll-text { --nav-icon: url("/app/assets/icons/scroll-text.svg"); }

.nav-item.active .nav-icon {
  color: #0f5944;
  background: #c7f2e3;
}

.sidebar-identity-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
}

.operator-profile-btn {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 2px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.operator-profile-btn:hover,
.operator-profile-btn:focus-visible {
  background: rgba(106, 224, 187, 0.1);
  outline: none;
}

.operator-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(106, 224, 187, 0.45);
  border-radius: 8px;
  color: #073c2f;
  background-color: #eaf8f3;
  font-size: 13px;
  font-weight: 850;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.operator-meta,
.operator-meta strong,
.operator-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-product-name {
  margin-bottom: 2px;
  color: #8fa0aa;
  font-size: 10px;
  font-weight: 750;
}

.operator-meta strong {
  color: #fff;
  font-size: 13px;
}

.operator-meta > span {
  margin-top: 2px;
  color: #8498a3;
  font-size: 11px;
}

.sidebar-identity-actions {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
}

.sidebar-identity-actions .icon-btn {
  width: 28px;
  height: 28px;
  color: #9fb1ba;
  font-size: 17px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: #4d5d6d;
  background: transparent;
  font-size: 20px;
}

.icon-btn:hover {
  background: rgba(108, 126, 139, 0.12);
}

.sidebar .icon-btn {
  color: #a9bbc4;
}

.main-area {
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  min-height: 78px;
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

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

.topbar h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0;
}

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

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

.notification-trigger {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
}

.notification-bell {
  width: 17px;
  height: 17px;
  display: block;
  background: currentColor;
  -webkit-mask: url("/app/assets/icons/bell.svg") center / contain no-repeat;
  mask: url("/app/assets/icons/bell.svg") center / contain no-repeat;
}

.notification-badge {
  min-width: 18px;
  height: 18px;
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 9px;
  color: #fff;
  background: var(--red);
  font-size: 9px;
  font-weight: 850;
}

.global-search {
  width: 230px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.global-search span {
  color: #788796;
  font-size: 18px;
}

.global-search input {
  min-height: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.global-search input:focus {
  box-shadow: none;
}

.live-state {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.live-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 167, 122, 0.12);
}

.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.last-updated time {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.menu-btn {
  display: none;
}

.page-state {
  min-height: 0;
}

.page-state.loading {
  height: 3px;
  position: fixed;
  top: 0;
  right: 0;
  left: 242px;
  z-index: 80;
  overflow: hidden;
  background: #ccebe1;
}

.page-state.loading::after {
  content: "";
  width: 35%;
  height: 100%;
  position: absolute;
  left: 0;
  background: var(--accent);
  animation: loading-slide 1s ease-in-out infinite;
}

@keyframes loading-slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(390%); }
}

.page-content {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px 24px 42px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.overview-query {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
  padding: 15px;
}

.overview-query > div:first-child strong,
.overview-query > div:first-child p {
  display: block;
}

.overview-query > div:first-child strong {
  margin-top: 4px;
  font-size: 18px;
}

.overview-query > div:first-child p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.overview-query-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.overview-query-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.overview-query-controls input,
.overview-query-controls select {
  min-width: 150px;
}

.overview-query-actions {
  display: flex;
  gap: 8px;
}

.overview-activity {
  margin-top: 0;
}

.metric-card {
  min-height: 112px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.sortable-metric {
  position: relative;
  cursor: grab;
  transition: border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.sortable-metric:hover,
.sortable-metric:focus-visible {
  border-color: #91cdbb;
  box-shadow: 0 7px 18px rgba(24, 51, 62, 0.08);
  outline: none;
}

.sortable-metric.dragging {
  cursor: grabbing;
  opacity: 0.52;
}

.metric-order-controls {
  position: absolute;
  right: 9px;
  bottom: 7px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 120ms ease;
}

.sortable-metric:hover .metric-order-controls,
.sortable-metric:focus-within .metric-order-controls {
  opacity: 1;
}

.metric-order-controls .icon-btn {
  width: 25px;
  height: 25px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.metric-order-controls .icon-btn:disabled {
  opacity: 0.32;
}

.metric-card.blue { border-top-color: var(--blue); }
.metric-card.amber { border-top-color: var(--amber); }
.metric-card.red { border-top-color: var(--red); }
.metric-card.violet { border-top-color: var(--violet); }

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 25px;
  letter-spacing: 0;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: #71808e;
  font-size: 11px;
}

.token-rate-settings {
  position: absolute;
  right: 10px;
  top: 47px;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.token-rate-settings-icon {
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("/app/assets/icons/settings.svg") center / contain no-repeat;
  mask: url("/app/assets/icons/settings.svg") center / contain no-repeat;
}

.metric-mark {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 850;
}

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

.metric-icon-users { --metric-icon: url("/app/assets/icons/users.svg"); }
.metric-icon-monitor { --metric-icon: url("/app/assets/icons/monitor.svg"); }
.metric-icon-wallet { --metric-icon: url("/app/assets/icons/wallet.svg"); }
.metric-icon-shield-alert { --metric-icon: url("/app/assets/icons/shield-alert.svg"); }
.metric-icon-server { --metric-icon: url("/app/assets/icons/server.svg"); }
.metric-icon-receipt-text { --metric-icon: url("/app/assets/icons/receipt-text.svg"); }
.metric-icon-megaphone { --metric-icon: url("/app/assets/icons/megaphone.svg"); }
.metric-icon-bell { --metric-icon: url("/app/assets/icons/bell.svg"); }
.metric-icon-list-checks { --metric-icon: url("/app/assets/icons/list-checks.svg"); }
.metric-icon-settings { --metric-icon: url("/app/assets/icons/settings.svg"); }

.metric-card.blue .metric-mark { color: var(--blue); background: var(--blue-soft); }
.metric-card.amber .metric-mark { color: var(--amber); background: var(--amber-soft); }
.metric-card.red .metric-mark { color: var(--red); background: var(--red-soft); }
.metric-card.violet .metric-mark { color: var(--violet); background: var(--violet-soft); }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 15px;
}

.stack {
  display: grid;
  gap: 15px;
  align-content: start;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.section-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
}

.panel-head p,
.section-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-body {
  padding: 15px;
}

.financial-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 1px;
  background: var(--line);
}

.financial-cell {
  min-height: 86px;
  padding: 14px;
  background: #fff;
}

.financial-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.financial-cell strong {
  display: block;
  margin-top: 7px;
  font-size: 19px;
}

.chart-bars {
  height: 175px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 15px 7px 2px;
}

.chart-column {
  min-width: 0;
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.chart-bar-track {
  width: min(34px, 80%);
  height: 118px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 5px 5px 2px 2px;
  background: #edf2f4;
}

.chart-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 5px 5px 0 0;
  background: var(--accent);
}

.chart-column:nth-child(even) .chart-bar {
  background: var(--blue);
}

.chart-column small {
  max-width: 70px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-column strong {
  font-size: 11px;
}

.alert-list,
.activity-list,
.summary-list,
.detail-list {
  display: grid;
}

.alert-row,
.activity-row,
.summary-row,
.detail-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.alert-row:last-child,
.activity-row:last-child,
.summary-row:last-child,
.detail-row:last-child {
  border-bottom: 0;
}

.alert-row > div,
.activity-row > div,
.detail-row > div {
  min-width: 0;
}

.alert-row strong,
.activity-row strong,
.detail-row strong {
  display: block;
  font-size: 13px;
}

.alert-row span,
.activity-row span,
.detail-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.severity-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--amber);
}

.severity-dot.high,
.severity-dot.critical {
  background: var(--red);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}

.section-actions,
.toolbar,
.filter-row,
.inline-actions,
.pager,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.resource-view-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e7edef;
}

.resource-view-tab {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: #607080;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.resource-view-tab:hover {
  color: #243443;
  background: rgba(255, 255, 255, 0.65);
}

.resource-view-tab.active {
  color: #0a7659;
  background: #fff;
  box-shadow: 0 1px 3px rgba(24, 43, 52, 0.1);
}

.resource-tab-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
  -webkit-mask: var(--resource-tab-icon) center / contain no-repeat;
  mask: var(--resource-tab-icon) center / contain no-repeat;
}

.resource-tab-icon.cloud {
  --resource-tab-icon: url("/app/assets/icons/server.svg");
}

.resource-tab-icon.terminal {
  --resource-tab-icon: url("/app/assets/icons/monitor.svg");
}

.resource-tab-icon.marketplace {
  --resource-tab-icon: url("/app/assets/icons/wallet.svg");
}

.resource-metrics {
  margin-bottom: 12px;
}

.cloud-orders-panel table {
  min-width: 980px;
}

.cloud-device-cell-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cloud-inline-detail {
  margin-top: 7px;
}

.cloud-order-mobile-list {
  display: none;
}

.cloud-order-mobile {
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

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

.cloud-mobile-head > div:first-child,
.cloud-mobile-foot > div {
  min-width: 0;
}

.cloud-mobile-head strong,
.cloud-mobile-head span,
.cloud-mobile-foot strong,
.cloud-mobile-foot span,
.cloud-mobile-foot small {
  display: block;
}

.cloud-mobile-head strong {
  color: var(--ink);
  font-size: 14px;
}

.cloud-mobile-head span,
.cloud-mobile-foot span,
.cloud-mobile-foot small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.cloud-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 13px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.cloud-mobile-grid > div {
  min-width: 0;
  padding: 10px;
  background: #f8fafb;
}

.cloud-mobile-grid span,
.cloud-mobile-grid strong,
.cloud-mobile-grid small {
  display: block;
  overflow-wrap: anywhere;
}

.cloud-mobile-grid span {
  color: var(--muted);
  font-size: 10px;
}

.cloud-mobile-grid strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 11px;
}

.cloud-mobile-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.cloud-mobile-foot {
  align-items: center;
}

.payment-amount {
  margin-top: 6px;
}

.user-access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding: 13px 15px;
  border-left: 3px solid #83909b;
  background: #f8fafb;
}

.user-access-banner.active {
  border-left-color: var(--green);
  background: #eef9f5;
}

.user-access-banner strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.user-access-banner p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.access-capabilities {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.access-capabilities span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.access-capabilities span.enabled {
  border-color: #a9dfcc;
  color: #08775a;
  background: #e0f5ed;
}

.user-ip {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.filter-row input {
  width: 230px;
}

.filter-row select {
  width: auto;
  min-width: 130px;
}

.data-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  min-height: 45px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #657483;
  background: #f6f8f9;
  font-size: 11px;
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fbfa;
}

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

.cell-main {
  display: block;
  color: var(--ink);
  font-weight: 750;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.task-title-cell {
  min-width: 210px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.task-cover-thumb,
.task-cover-placeholder {
  width: 64px;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.task-cover-thumb {
  object-fit: cover;
  background: var(--surface-soft);
}

.task-cover-placeholder {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #edf7f4, #dceee9);
}

.task-cover-placeholder::before,
.task-cover-placeholder::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(10, 167, 122, 0.28);
}

.content-title-cell {
  min-width: 210px;
}

.content-title-line {
  display: flex;
  align-items: center;
  gap: 7px;
}

.priority-chip {
  min-height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.priority-chip.important {
  border-color: #ecd39b;
  color: #8b5b05;
  background: #fff7df;
}

.priority-chip.emergency {
  border-color: #efbbbb;
  color: #b42323;
  background: #fff0f0;
}

.content-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.content-preview-head {
  min-height: 116px;
  display: grid;
  align-content: end;
  gap: 7px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(9, 32, 40, 0.97), rgba(9, 108, 88, 0.9)),
    url("/app/assets/panda-cloud-login.png") center / cover;
}

.content-preview-head.emergency {
  background:
    linear-gradient(120deg, rgba(70, 17, 25, 0.97), rgba(180, 45, 54, 0.88)),
    url("/app/assets/panda-cloud-login.png") center / cover;
}

.content-preview-head span {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 4px;
  color: #d9fff2;
  background: rgba(255, 255, 255, 0.12);
  font-size: 9px;
  font-weight: 800;
}

.content-preview-head h3 {
  margin: 0;
  font-size: 21px;
}

.content-preview-body {
  padding: 15px 18px 18px;
}

.content-preview-body p {
  margin: 0;
  color: #425466;
  line-height: 1.75;
  white-space: pre-wrap;
}

.content-preview-cta {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  padding: 0 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
}

.version-list {
  display: grid;
  gap: 8px;
}

.version-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.version-row:last-child {
  border-bottom: 0;
}

.version-number {
  width: 38px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 850;
}

.notification-list {
  display: grid;
}

.notification-item {
  min-height: 92px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.unread {
  box-shadow: inset 3px 0 0 var(--accent);
  background: #fbfffd;
}

.notification-category {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent-dark);
  background: var(--accent-soft);
}

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

.notification-category.approval { --notification-icon: url("/app/assets/icons/list-checks.svg"); }
.notification-category.withdrawal { --notification-icon: url("/app/assets/icons/wallet.svg"); }
.notification-category.risk { --notification-icon: url("/app/assets/icons/shield-alert.svg"); }
.notification-category.device { --notification-icon: url("/app/assets/icons/server.svg"); }
.notification-category.task { --notification-icon: url("/app/assets/icons/receipt-text.svg"); }
.notification-category.content { --notification-icon: url("/app/assets/icons/megaphone.svg"); }
.notification-category.compliance { --notification-icon: url("/app/assets/icons/scroll-text.svg"); }

.notification-category.critical,
.notification-category.high {
  color: var(--red);
  background: var(--red-soft);
}

.notification-category.medium {
  color: var(--amber);
  background: var(--amber-soft);
}

.notification-copy {
  min-width: 0;
}

.notification-copy strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.notification-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.notification-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: #778797;
  font-size: 9px;
}

.notification-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--accent);
}

.task-cover-placeholder::before {
  width: 17px;
  height: 17px;
  top: 7px;
  right: 9px;
}

.task-cover-placeholder::after {
  width: 52px;
  height: 30px;
  left: 5px;
  bottom: -19px;
  border-radius: 50% 50% 0 0;
  background: rgba(16, 58, 65, 0.18);
}

.status-badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 5px;
  color: #526272;
  background: #edf1f3;
  font-size: 10px;
  font-weight: 800;
}

.status-badge.ok,
.status-badge.active,
.status-badge.online,
.status-badge.completed,
.status-badge.published,
.status-badge.approved,
.status-badge.settled,
.status-badge.cloud_active,
.status-badge.purchase {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.status-badge.warn,
.status-badge.pending,
.status-badge.under_review,
.status-badge.processing,
.status-badge.scheduled,
.status-badge.investigating,
.status-badge.estimated,
.status-badge.provisioning,
.status-badge.rental {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-badge.danger,
.status-badge.blocked,
.status-badge.suspended,
.status-badge.rejected,
.status-badge.failed,
.status-badge.critical,
.status-badge.high,
.status-badge.emergency_stopped,
.status-badge.terminated,
.status-badge.refunded {
  color: var(--red);
  background: var(--red-soft);
}

.status-badge.info,
.status-badge.registered,
.status-badge.draft,
.status-badge.received,
.status-badge.pending_approval {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-badge.expired,
.status-badge.cancelled {
  color: #677684;
  background: #e9eef0;
}

.status-badge.violet,
.status-badge.token {
  color: var(--violet);
  background: var(--violet-soft);
}

.table-btn {
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #344555;
  background: #fff;
  font-size: 10px;
  font-weight: 750;
}

.table-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-soft);
}

.table-btn.danger {
  border-color: #f0c8c8;
  color: var(--red);
}

.table-btn.warning {
  border-color: #eed7a9;
  color: var(--amber);
}

.pager {
  min-height: 50px;
  justify-content: flex-end;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.pager span {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  min-height: 190px;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: #435263;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 15px;
}

.ledger-device-panel {
  margin: 14px 0;
}

.ledger-device-panel .panel-body {
  padding: 0;
}

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

.rule-row,
.setting-row,
.role-row {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.rule-row span,
.setting-row span,
.role-row span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.rule-row strong,
.setting-row strong,
.role-row strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.setting-row label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.setting-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.settings-form {
  display: grid;
  gap: 10px;
}

.settings-form .field {
  margin: 0;
}

.system-stack {
  display: grid;
  gap: 15px;
}

.system-access-gate {
  width: min(680px, calc(100% - 28px));
  margin: clamp(28px, 8vh, 90px) auto;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid #bfd8d1;
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(21, 47, 57, .10);
  text-align: center;
}

.system-access-icon {
  display: inline-block;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--accent-soft) url("assets/icons/shield-alert.svg") center / 26px no-repeat;
}

.system-access-gate h2 { margin: 7px 0 9px; font-size: 26px; }
.system-access-gate p { max-width: 560px; margin: 0 auto 20px; color: var(--muted); line-height: 1.7; }
.system-access-gate .primary-btn { min-width: 220px; }
.system-access-error { color: var(--red) !important; }

.system-access-notes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.system-access-notes span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
}

.system-security-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #24414b;
  border-radius: 7px;
  overflow: hidden;
  background: #10212a;
  color: #fff;
}

.system-security-strip > div {
  min-width: 0;
  padding: 15px 17px;
  border-right: 1px solid rgba(255,255,255,.10);
}

.system-security-strip > div:last-child { border-right: 0; }
.system-security-strip span,
.system-security-strip strong,
.system-security-strip small { display: block; }
.system-security-strip span { color: #8bd9c7; font-size: 11px; }
.system-security-strip strong { margin: 4px 0 5px; font-size: 15px; }
.system-security-strip small { color: #afc0c7; line-height: 1.45; }

@media (max-width: 900px) {
  .system-security-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-security-strip > div:nth-child(2) { border-right: 0; }
  .system-security-strip > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.10); }
}

@media (max-width: 520px) {
  .system-security-strip { grid-template-columns: 1fr; }
  .system-security-strip > div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.10); }
  .system-security-strip > div:last-child { border-bottom: 0; }
}

.readiness-panel {
  overflow: hidden;
}

.readiness-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.readiness-summary > div {
  min-width: 0;
  padding: 13px 16px;
  background: #fff;
}

.readiness-summary span,
.readiness-summary strong {
  display: block;
}

.readiness-summary span {
  color: var(--muted);
  font-size: 11px;
}

.readiness-summary strong {
  margin-top: 3px;
  font-size: 20px;
}

.readiness-summary .attention strong {
  color: var(--amber);
}

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

.readiness-check {
  min-width: 0;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.readiness-check > i {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.readiness-check.warning > i {
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-soft);
}

.readiness-check.blocker > i {
  background: var(--red);
  box-shadow: 0 0 0 4px var(--red-soft);
}

.readiness-check strong,
.readiness-check p {
  display: block;
  margin: 0;
}

.readiness-check strong {
  font-size: 13px;
}

.readiness-check p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.contract-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}

.contract-strip strong,
.contract-strip span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
}

.contract-strip strong {
  color: var(--accent-dark);
  border-color: #b8e4d6;
  background: var(--accent-soft);
}

.detail-drawer {
  width: min(520px, 94vw);
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 40px rgba(20, 34, 44, 0.13);
  transform: translateX(105%);
  transition: transform 200ms ease;
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

.drawer-body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 17px;
}

.drawer-section {
  margin-bottom: 22px;
}

.drawer-section h3 {
  margin: 0 0 9px;
  font-size: 13px;
}

.drawer-action-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #b9e3d4;
  border-radius: 7px;
  background: #eef9f5;
}

.drawer-action-panel > div:first-child span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.drawer-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.network-identity {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #101b23;
  color: #fff;
}

.network-identity > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.network-identity span,
.network-identity p {
  color: #aebbc4;
  font-size: 10px;
}

.network-identity p {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  overflow-wrap: anywhere;
}

.detail-value {
  display: grid;
  justify-items: end;
  gap: 4px;
}

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

.key-value {
  min-height: 60px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.key-value span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.key-value strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.drawer-scrim,
.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
  background: rgba(11, 20, 27, 0.35);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.drawer-scrim.open,
.sidebar-scrim.open {
  visibility: visible;
  opacity: 1;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 20, 27, 0.48);
}

.modal-dialog {
  width: min(540px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.modal-head {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 17px;
}

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

.modal-actions {
  justify-content: flex-end;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
}

.modal-error {
  min-height: 0;
  margin: 0;
  padding: 0 15px;
}

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

.form-grid .field {
  margin: 0;
}

.field.full-width {
  grid-column: 1 / -1;
}

.field-help {
  color: var(--muted);
  font-size: 10px;
}

.image-file-input {
  min-height: 46px;
  padding: 5px;
  color: var(--muted);
  cursor: pointer;
}

.image-file-input::file-selector-button {
  min-height: 34px;
  margin-right: 10px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  color: #fff;
  background: var(--accent-dark);
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.image-file-preview {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.image-file-preview[hidden] {
  display: none;
}

.image-file-preview img {
  width: 148px;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 5px;
  background: #dce8e5;
}

.image-file-preview strong,
.image-file-preview span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-file-preview strong {
  color: var(--ink);
  font-size: 12px;
}

.image-file-preview span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 160;
  display: grid;
  gap: 8px;
}

.risk-alert-stack {
  width: min(390px, calc(100vw - 28px));
  position: fixed;
  z-index: 170;
  top: 70px;
  right: 16px;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.risk-alert-popup {
  --alert-color: #d17d00;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 11px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--alert-color) 38%, #dfe6e9);
  border-left: 4px solid var(--alert-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(17, 32, 42, 0.22);
  pointer-events: auto;
  animation: risk-alert-enter 220ms ease-out;
}

.risk-alert-popup.critical { --alert-color: #d83a3a; }
.risk-alert-popup.high { --alert-color: #dd7b00; }
.risk-alert-popup.medium { --alert-color: #3279e8; }
.risk-alert-popup.low { --alert-color: #0ca77b; }

.risk-alert-symbol {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: var(--alert-color);
  background: color-mix(in srgb, var(--alert-color) 12%, white);
}

.risk-alert-symbol::before {
  width: 19px;
  height: 19px;
  display: block;
  margin: 8px;
  content: "";
  background: currentColor;
  mask: url("/app/assets/icons/shield-alert.svg") center / contain no-repeat;
  -webkit-mask: url("/app/assets/icons/shield-alert.svg") center / contain no-repeat;
}

.risk-alert-popup > div:nth-child(2) { min-width: 0; }
.risk-alert-popup strong { display: block; margin-top: 2px; font-size: 13px; }
.risk-alert-popup p { margin: 4px 0; color: #52616d; font-size: 11px; line-height: 1.5; }
.risk-alert-popup small { color: #87929b; font-size: 10px; }
.risk-alert-level { color: var(--alert-color); font-size: 10px; font-weight: 850; }
.risk-alert-actions { display: flex; align-items: flex-start; gap: 4px; }
.risk-alert-actions button { padding: 4px 6px; border: 0; color: #4d5e69; background: transparent; font-size: 11px; cursor: pointer; }
.risk-alert-actions button:first-child { color: var(--alert-color); font-weight: 800; }

.risk-command-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  padding: 18px 20px;
  border-radius: 8px;
  color: #f4fffb;
  background: linear-gradient(110deg, #10212a, #12383c 68%, #0a725a);
}

.risk-command-panel h2 { margin: 3px 0 5px; font-size: 20px; }
.risk-command-panel p { margin: 0; color: #bed0cf; font-size: 12px; }
.risk-command-panel .section-kicker { color: #6be2bd; }
.risk-command-summary { min-width: 170px; display: grid; text-align: right; }
.risk-command-summary strong { font-size: 31px; }
.risk-command-summary span { font-size: 12px; font-weight: 750; }
.risk-command-summary small { margin-top: 4px; color: #a9c4c1; }

.risk-rule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.risk-rule-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.risk-rule-card:hover { border-color: #8acbb8; box-shadow: 0 7px 18px rgba(24, 51, 62, 0.08); }
.risk-rule-card.has-alert { border-color: #efc17d; background: #fffdf8; }
.risk-rule-card strong, .risk-rule-card small { display: block; }
.risk-rule-card strong { font-size: 12px; }
.risk-rule-card small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.35; }
.risk-rule-card b { color: #75828c; font-size: 18px; }
.risk-rule-card.has-alert b { color: #c66d00; }
.risk-rule-icon { width: 32px; height: 32px; border-radius: 7px; color: #0b8b69; background: #e5f7f1; }
.risk-rule-icon::before { width: 16px; height: 16px; display: block; margin: 8px; content: ""; background: currentColor; mask: var(--risk-icon) center / contain no-repeat; -webkit-mask: var(--risk-icon) center / contain no-repeat; }
.risk-rule-icon.ip, .risk-rule-icon.data { --risk-icon: url("/app/assets/icons/server.svg"); }
.risk-rule-icon.payout, .risk-rule-icon.withdrawal { --risk-icon: url("/app/assets/icons/wallet.svg"); }
.risk-rule-icon.phone { --risk-icon: url("/app/assets/icons/users.svg"); }
.risk-metrics .metric-card { min-height: 94px; }

.review-hero {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid #193943;
  border-radius: 8px;
  color: #f4fbfa;
  background: linear-gradient(112deg, #12212b 0%, #18333b 62%, #145f50 100%);
}

.review-hero h2 { margin: 3px 0 5px; font-size: 20px; }
.review-hero p { max-width: 760px; margin: 0; color: #bfd0d1; font-size: 12px; line-height: 1.6; }
.review-hero .section-kicker { color: #67ddb7; }
.review-hero-total { min-width: 142px; display: grid; justify-items: end; }
.review-hero-total strong { font-size: 32px; line-height: 1; }
.review-hero-total span { margin-top: 6px; color: #c6d9d7; font-size: 11px; font-weight: 750; }
.review-metrics .metric-card { min-height: 94px; }

.review-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.review-tab {
  min-width: 0;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.review-tab:hover { border-color: #87c9b6; box-shadow: 0 6px 16px rgba(24, 51, 62, 0.07); }
.review-tab.active { border-color: #0ca77b; background: #effaf6; box-shadow: inset 3px 0 #0ca77b; }
.review-tab strong, .review-tab small { display: block; }
.review-tab strong { font-size: 13px; }
.review-tab small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.review-tab-icon {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  color: #087c60;
  background: #dff4ed;
}

.review-tab-icon::before {
  width: 19px;
  height: 19px;
  display: block;
  margin: 9px;
  content: "";
  background: currentColor;
  mask: var(--review-icon) center / contain no-repeat;
  -webkit-mask: var(--review-icon) center / contain no-repeat;
}

.review-tab-icon.identity { --review-icon: url("/app/assets/icons/users.svg"); }
.review-tab-icon.payout { --review-icon: url("/app/assets/icons/wallet.svg"); }
.review-data-panel .panel-head { border-bottom: 1px solid var(--line); }

@keyframes risk-alert-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .risk-rule-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .risk-command-panel { align-items: flex-start; flex-direction: column; }
  .risk-command-summary { min-width: 0; text-align: left; }
  .risk-rule-grid { grid-template-columns: 1fr; }
  .risk-alert-stack { z-index: 34; top: 62px; right: 10px; }
  .review-hero { align-items: flex-start; flex-direction: column; }
  .review-hero-total { min-width: 0; justify-items: start; }
  .review-tabs { grid-template-columns: 1fr; }
}

.toast {
  width: min(360px, calc(100vw - 36px));
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  color: #fff;
  background: #17242d;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  animation: toast-in 180ms ease;
}

.toast.error {
  border-left-color: #ff7777;
}

@keyframes toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.code-block {
  max-height: 260px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  color: #d6e5eb;
  background: #16222b;
  font: 11px/1.6 Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.positive {
  color: var(--accent-dark);
}

.negative {
  color: var(--red);
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

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

  .global-search {
    width: 190px;
  }

  .readiness-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 34px 24px;
  }

  .login-brand {
    margin-bottom: 38px;
  }

  .admin-shell {
    display: block;
  }

  .sidebar {
    width: 260px;
    position: fixed;
    left: 0;
    transform: translateX(-105%);
    transition: transform 190ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close,
  .menu-btn {
    display: inline-grid !important;
  }

  .sidebar-scrim {
    z-index: 35;
  }

  .topbar {
    min-height: 70px;
    padding: 10px 14px;
  }

  .topbar-actions .live-state,
  .topbar-actions .secondary-btn,
  .global-search {
    display: none;
  }

  .last-updated-label {
    display: none;
  }

  .last-updated {
    font-size: 10px;
  }

  .page-state.loading {
    left: 0;
  }

  .page-content {
    padding: 15px 14px 34px;
  }

  .cloud-orders-panel .table-wrap {
    display: none;
  }

  .cloud-order-mobile-list {
    display: block;
  }
}

@media (max-width: 620px) {
  .login-brand img {
    width: 42px;
    height: 42px;
  }

  .form-heading h2 {
    font-size: 24px;
  }

  .topbar h1 {
    font-size: 18px;
  }

  .topbar p {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .overview-query {
    align-items: stretch;
    flex-direction: column;
  }

  .overview-query-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .overview-query-controls input,
  .overview-query-controls select {
    width: 100%;
    min-width: 0;
  }

  .overview-query-actions {
    grid-column: 1 / -1;
  }

  .overview-query-actions button {
    flex: 1;
  }

  .metric-card {
    min-height: 104px;
    padding: 12px;
  }

  .sortable-metric {
    padding-bottom: 40px;
  }

  .metric-order-controls {
    opacity: 1;
  }

  .metric-card strong {
    font-size: 20px;
  }

  .financial-strip {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .resource-view-bar {
    width: 100%;
  }

  .resource-view-tab {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
  }

  .user-access-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .access-capabilities {
    width: 100%;
  }

  .access-capabilities span {
    flex: 1;
    text-align: center;
  }

  .filter-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .filter-row input {
    width: 100%;
    grid-column: 1 / -1;
  }

  .filter-row select {
    width: 100%;
    min-width: 0;
  }

  .toolbar > .section-actions {
    width: 100%;
  }

  .toolbar > .section-actions > button {
    flex: 1;
  }

  .rules-grid,
  .settings-grid,
  .roles-grid,
  .form-grid,
  .key-value-grid {
    grid-template-columns: 1fr;
  }

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

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

  .field.full-width {
    grid-column: auto;
  }

  .image-file-preview {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .image-file-preview img {
    width: 112px;
  }

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

  .notification-item .inline-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .notification-category {
    width: 32px;
    height: 32px;
  }

  .version-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .version-row > time {
    grid-column: 2;
  }

  .chart-bars {
    gap: 5px;
  }

  .detail-drawer {
    width: 100%;
  }
}

.support-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  min-height: 620px;
  overflow: hidden;
}

.support-metrics .metric-card {
  min-height: 88px;
}

.support-metrics .metric-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.support-queue {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #f7faf9;
  overflow-y: auto;
}

.support-queue-head,
.support-thread-head,
.support-conversation-line,
.support-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.support-queue-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 15px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.support-queue-head span,
.support-conversation time,
.support-conversation small,
.support-thread-head span,
.support-message-meta time {
  color: var(--muted);
  font-size: 11px;
}

.support-conversation {
  width: 100%;
  display: grid;
  gap: 7px;
  padding: 14px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.support-conversation:hover,
.support-conversation.active {
  background: #eaf7f3;
}

.support-conversation.active {
  box-shadow: inset 3px 0 var(--brand);
}

.support-conversation-preview {
  overflow: hidden;
  color: #536274;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-conversation b {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-size: 10px;
}

.support-thread {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  background: #fff;
}

.support-client-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfc;
}

.support-client-context article {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid #dbe7e3;
  border-radius: 6px;
  background: #fff;
}

.support-client-context small,
.support-client-context strong,
.support-client-context p {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.support-client-context small { color: var(--muted); font-size: 10px; }
.support-client-context strong { margin-top: 2px; font-size: 12px; }
.support-client-context p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.support-context-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #087d60;
  background: #e6f7f1;
}

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

.support-context-network { --support-context-icon: url("/app/assets/icons/server.svg"); }
.support-context-device { --support-context-icon: url("/app/assets/icons/monitor.svg"); }

.support-client-context details {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: var(--muted);
  font-size: 10px;
}

.support-client-context summary { cursor: pointer; color: #536b63; }
.support-client-context details p { margin: 6px 0; }
.support-client-context code { overflow-wrap: anywhere; color: #263b34; }

.support-thread-head {
  min-height: 68px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.support-thread-head > div:first-child {
  display: grid;
  gap: 3px;
}

.support-state {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f6f1;
  color: #087c60;
  font-size: 11px;
  font-weight: 700;
}

.support-state.closed { background: #eef1f4; color: #697786; }
.support-state.pending { background: #fff4dc; color: #8b5a00; }

.support-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
  background: #f5f8f7;
}

.support-message {
  align-self: flex-start;
  width: min(72%, 620px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.support-message.admin {
  align-self: flex-end;
  border-color: #b8e6d9;
  background: #e9f8f3;
}

.support-message p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.support-composer textarea { resize: vertical; }
.support-composer .primary-btn { align-self: end; }

.audit-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
  padding: 18px 20px;
  border: 1px solid #173943;
  border-radius: 8px;
  color: #effdf9;
  background:
    linear-gradient(110deg, rgba(8, 25, 34, 0.98), rgba(18, 55, 61, 0.95)),
    url("/app/assets/panda-cloud-logo.png") right 4% center / 110px no-repeat;
}

.audit-hero h2 { margin: 3px 0 6px; font-size: 21px; }
.audit-hero p { max-width: 760px; margin: 0; color: #b9d1cf; font-size: 12px; line-height: 1.7; }
.audit-hero .section-kicker { color: #55dfbd; }

.audit-integrity {
  min-width: 220px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 9px;
  row-gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(106, 224, 194, 0.25);
  border-radius: 7px;
  background: rgba(5, 18, 24, 0.52);
}

.audit-integrity-dot {
  grid-row: 1 / 3;
  align-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #36d6ae;
  box-shadow: 0 0 0 5px rgba(54, 214, 174, 0.12);
}

.audit-integrity strong { font-size: 12px; }
.audit-integrity small { color: #9cb7b5; font-size: 10px; }
.audit-metrics .metric-card { min-height: 94px; }

.audit-module-chip,
.audit-severity {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.audit-module-chip { color: #176b5b; background: #e5f4ef; }
.audit-module-chip.finance { color: #805c05; background: #fff2cf; }
.audit-module-chip.resource { color: #245fc1; background: #e8f0ff; }
.audit-module-chip.risk { color: #a33030; background: #fde9e9; }
.audit-module-chip.security { color: #6243b2; background: #eee9ff; }
.audit-module-chip.operations { color: #096b82; background: #e4f5f8; }

.audit-severity { margin-right: 6px; }
.audit-severity.low { color: #417064; background: #e8f4f0; }
.audit-severity.medium { color: #885d00; background: #fff0ca; }
.audit-severity.high { color: #a44813; background: #ffe9d8; }
.audit-severity.critical { color: #a92f38; background: #fde4e6; }

.compact-date {
  min-width: 150px;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.compact-date input { min-height: 34px; }

@media (max-width: 980px) {
  .audit-hero { align-items: flex-start; }
  .audit-integrity { min-width: 190px; }
}

@media (max-width: 760px) {
  .audit-hero { flex-direction: column; gap: 14px; padding: 16px; }
  .audit-integrity { width: 100%; min-width: 0; }
  .audit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-date { min-width: 0; width: 100%; }
  .support-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support-metrics .metric-card { min-height: 78px; padding: 11px 12px; }
  .support-workspace { grid-template-columns: 1fr; min-height: 720px; }
  .support-queue { max-height: 250px; border-right: 0; border-bottom: 1px solid var(--line); }
  .support-message { width: 88%; }
  .support-client-context { grid-template-columns: 1fr; padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sales-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid #cbd9dd;
  border-radius: 6px;
  background: #fff;
  color: #607079;
  cursor: pointer;
  white-space: nowrap;
  margin-top: 8px;
}

.sales-switch-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: #b7c4c9;
  transition: background 160ms ease;
}

.sales-switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 29, 37, 0.28);
  transition: transform 160ms ease;
}

.sales-switch.is-on {
  border-color: #83d8c2;
  color: #087a60;
  background: #effaf6;
}

.sales-switch.is-on .sales-switch-track { background: #0caf83; }
.sales-switch.is-on .sales-switch-track span { transform: translateX(14px); }
.sales-switch:focus-visible { outline: 2px solid #2378d5; outline-offset: 2px; }

.marketplace-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.bulk-select-all input,
.row-select {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

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

.marketplace-bulk-bar .section-actions { margin-left: auto; }
.marketplace-bulk-bar .secondary-btn.success { color: #087a60; border-color: #83d8c2; }
.marketplace-bulk-bar .secondary-btn.warning { color: var(--amber); border-color: #eed7a9; }
.selection-cell { width: 56px; text-align: center; }

@media (max-width: 720px) {
  .marketplace-bulk-bar { align-items: stretch; flex-direction: column; }
  .marketplace-bulk-bar .section-actions { width: 100%; margin-left: 0; }
  .marketplace-bulk-bar .section-actions button { flex: 1; }
}
