:root {
  --bg: #f5f7f6;
  --panel: #ffffff;
  --panel-soft: #fbfcfb;
  --ink: #101814;
  --muted: #66736c;
  --line: #dfe7e2;
  --line-strong: #c8d2cc;
  --green: #16a34a;
  --green-dark: #0f6b34;
  --amber: #b7791f;
  --red: #b42318;
  --blue: #2563eb;
  --sidebar: #101814;
  --sidebar-soft: #18231d;
  --sidebar-muted: #9caaa2;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 278px;
  height: 100vh;
  overflow-y: auto;
  background: var(--sidebar);
  color: white;
  padding: 18px 14px;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 8px 18px;
}

.admin-auth-card .brand {
  border-bottom-color: var(--line);
  padding-inline: 0;
}

.brand-logo {
  display: block;
  width: 128px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.sidebar .brand-logo {
  width: 136px;
  max-width: 100%;
}

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

.brand-title {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--sidebar-muted);
  font-size: 12px;
  font-weight: 650;
}

.nav-group {
  margin-top: 18px;
}

.nav-label {
  margin: 0 8px 8px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border-radius: 9px;
  padding: 9px 10px;
  color: var(--sidebar-muted);
  font-size: 14px;
  font-weight: 720;
}

.nav-link:hover {
  background: var(--sidebar-soft);
  color: white;
}

.nav-link.is-active {
  background: rgba(22, 163, 74, 0.18);
  color: white;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.main {
  min-width: 0;
  margin-left: 278px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  padding: 14px 22px;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.top-title {
  min-width: 0;
}

.top-title p {
  margin: 0;
}

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

.top-title .name {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 820;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  max-width: 34vw;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 9px 11px;
}

.search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.admin-account-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 3px 8px 3px 3px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(16, 24, 20, 0.05);
}

.admin-account-button:hover {
  border-color: rgba(22, 163, 74, 0.35);
  background: #f8fbf9;
}

.admin-account-button[aria-expanded="true"] {
  border-color: rgba(22, 163, 74, 0.42);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.admin-account-caret {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.admin-account-menu {
  position: absolute;
  z-index: 72;
  width: min(330px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(16, 24, 20, 0.18);
  backdrop-filter: blur(18px);
}

.admin-account-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
}

.admin-account-head strong,
.admin-account-head span,
.admin-account-head em {
  display: block;
  min-width: 0;
}

.admin-account-head strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-head span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-account-head em {
  margin-top: 5px;
  color: var(--green-dark);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-account-list {
  display: grid;
  gap: 2px;
  padding: 7px;
}

.admin-account-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.admin-account-item:hover {
  background: #f1f8f3;
}

.admin-account-item i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--green-dark);
}

.admin-account-item svg {
  width: 17px;
  height: 17px;
}

.admin-account-item strong,
.admin-account-item em {
  display: block;
}

.admin-account-item strong {
  font-size: 13px;
  font-weight: 850;
}

.admin-account-item em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.admin-account-item.is-danger i {
  background: #fef2f2;
  color: var(--red);
}

.admin-account-item.is-danger strong {
  color: var(--red);
}

.admin-account-item.is-danger:hover {
  background: #fef2f2;
}

.notification-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.notification-button:hover {
  color: var(--green-dark);
  border-color: rgba(22, 163, 74, 0.35);
}

.notification-button svg {
  width: 18px;
  height: 18px;
}

.notification-button [data-admin-notification-count] {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.admin-notification-menu {
  position: absolute;
  z-index: 70;
  width: min(390px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(16, 24, 20, 0.18);
  backdrop-filter: blur(18px);
}

.admin-notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 15px;
}

.admin-notification-head strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
}

.admin-notification-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.admin-notification-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-notification-head a,
.admin-notification-head button {
  border: 0;
  background: transparent;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.admin-notification-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  padding: 6px;
}

.admin-notification-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 11px 10px;
  text-align: left;
  cursor: pointer;
}

.admin-notification-item:hover {
  background: var(--panel-soft);
}

.admin-notification-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.admin-notification-item em,
.admin-notification-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.admin-notification-item small {
  color: #334155;
}

.admin-notification-dot {
  margin-top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.admin-notification-dot.is-new {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.admin-notification-empty {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.api-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.api-status.live {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green-dark);
}

.api-status.fallback {
  background: rgba(183, 121, 31, 0.13);
  color: var(--amber);
}

.content {
  padding: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.page-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-search,
.filter-bar select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(360px, 100%);
  padding: 0 11px;
}

.filter-search input,
.filter-bar select {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.filter-search input {
  width: 100%;
  min-width: 0;
}

.filter-bar select {
  border: 1px solid var(--line);
  padding: 0 11px;
}

.empty-state {
  display: none;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  margin-top: 12px;
  padding: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 760;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.btn.danger {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(180, 35, 24, 0.08);
  color: var(--red);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn.is-loading {
  pointer-events: none;
  white-space: nowrap;
}

.btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.pagination .btn {
  min-width: 38px;
}

.button-spinner {
  width: 1em;
  height: 1em;
  flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: button-spin 0.72s linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.grid {
  display: grid;
  gap: 14px;
}

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

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

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

.card,
.section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(16, 24, 20, 0.04);
}

.card {
  padding: 18px;
}

.metric-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.metric-value {
  margin: 10px 0 0;
  font-size: 25px;
  font-weight: 860;
  letter-spacing: 0;
}

.metric-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.section {
  margin-top: 16px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 17px 18px;
}

.section-header h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.section-body {
  padding: 18px;
}

.table-wrap {
  overflow-x: auto;
}

.deposit-method-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(241, 248, 244, 0.75));
  padding: 14px;
}

.deposit-method-toolbar strong,
.deposit-method-toolbar span {
  display: block;
}

.deposit-method-toolbar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.deposit-category-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(25, 183, 47, 0.18);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 248, 244, 0.82));
  padding: 14px;
}

.deposit-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.deposit-category-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.deposit-category-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.deposit-category-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.deposit-category-card {
  position: relative;
  display: flex;
  min-height: 118px;
  min-width: 0;
  overflow: hidden;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px;
}

.deposit-category-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
}

.deposit-category-card.is-enabled {
  border-color: rgba(22, 163, 74, 0.45);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(220, 252, 231, 0.86));
  box-shadow: 0 14px 28px rgba(22, 163, 74, 0.08);
}

.deposit-category-card.is-enabled::before {
  background: var(--green);
}

.deposit-category-card.is-disabled {
  border-color: rgba(180, 35, 24, 0.42);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(254, 226, 226, 0.9));
  box-shadow: 0 14px 28px rgba(180, 35, 24, 0.08);
}

.deposit-category-card.is-disabled::before {
  background: var(--red);
}

.deposit-category-card strong,
.deposit-category-card span {
  display: block;
}

.deposit-category-card > div:first-child span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.deposit-category-card.is-enabled > div:first-child strong {
  color: var(--green-dark);
}

.deposit-category-card.is-disabled > div:first-child strong {
  color: var(--red);
}

.deposit-category-status {
  display: grid;
  flex: none;
  justify-items: end;
  gap: 10px;
}

.deposit-category-card.is-enabled .deposit-category-status {
  color: var(--green-dark);
}

.deposit-category-card.is-disabled .deposit-category-status {
  color: var(--red);
}

.deposit-category-status .btn {
  min-width: 92px;
}

.modal-wide {
  width: min(1040px, calc(100vw - 28px));
}

.withdrawal-field-builder {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.builder-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.builder-head strong,
.builder-head span {
  display: block;
}

.builder-head strong {
  font-size: 14px;
}

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

.withdrawal-field-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 0.8fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 10px;
}

.checkbox-row {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.deposit-destination-preview {
  display: inline-block;
  max-width: 24ch;
  overflow: hidden;
  color: var(--ink);
  font-weight: 720;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.badge.success {
  background: rgba(22, 163, 74, 0.12);
  color: var(--green-dark);
}

.badge.warning {
  background: rgba(183, 121, 31, 0.13);
  color: var(--amber);
}

.badge.danger {
  background: rgba(180, 35, 24, 0.1);
  color: var(--red);
}

.badge.info {
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue);
}

.queue-list {
  display: grid;
  gap: 12px;
}

.queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 14px;
}

.queue-item h3 {
  margin: 0;
  font-size: 14px;
}

.queue-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.detail {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 13px;
}

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

.detail strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
}

.dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.timeline-item h3 {
  margin: 0;
  font-size: 14px;
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.workflow-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 14px;
}

.workflow-step span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.workflow-step strong {
  display: block;
  margin-top: 10px;
  font-size: 13px;
}

.workflow-step.is-done {
  border-color: rgba(22, 163, 74, 0.28);
  background: rgba(22, 163, 74, 0.06);
}

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

.checklist,
.note-list,
.restriction-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 12px;
}

.check-item strong,
.note strong {
  display: block;
  font-size: 14px;
}

.check-item p,
.note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.note,
.restriction {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 12px;
}

.restriction {
  color: var(--red);
  font-size: 13px;
  font-weight: 760;
}

.review-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(16, 24, 20, 0.04);
  padding: 18px;
}

.review-panel h2 {
  margin: 0;
  font-size: 17px;
}

.review-panel p {
  margin: 6px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.review-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-panel textarea {
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 12px;
  outline: 0;
  text-transform: none;
}

.review-panel .override-check,
.modal-body .modal-check {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.review-panel .override-check input,
.modal-body .modal-check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--green);
}

.modal-fieldset {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 13px;
}

.modal-fieldset > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

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

.btn.is-confirmed {
  border-color: var(--green);
  background: rgba(22, 163, 74, 0.1);
  color: var(--green-dark);
}

.decision-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--muted);
  margin-bottom: 14px;
  padding: 10px;
  font-size: 13px;
}

.modal-root {
  position: relative;
  z-index: 80;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 20, 0.42);
  padding: 18px;
}

.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border-radius: 12px;
  background: white;
  box-shadow: 0 24px 80px rgba(16, 24, 20, 0.28);
}

.modal.modal-wide {
  width: min(1040px, calc(100vw - 28px));
}

.modal.modal-proof-wide {
  width: min(1320px, calc(100vw - 28px));
}

.payout-editor-modal .modal-body {
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.045), rgba(255, 255, 255, 0) 220px),
    white;
}

.payout-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 14px;
  margin-bottom: 16px;
}

.payout-editor-card {
  display: grid;
  align-content: start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(16, 24, 20, 0.06);
  padding: 14px;
}

.payout-editor-card.is-main {
  background: linear-gradient(180deg, #ffffff, #f8fbf8);
}

.payout-editor-card > span,
.payout-fixed-card span {
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payout-fixed-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.1), rgba(246, 251, 247, 0.96));
  padding: 14px;
}

.payout-fixed-card strong,
.payout-fixed-card p {
  display: block;
}

.payout-fixed-card strong {
  margin-top: 5px;
  font-size: 15px;
  font-weight: 900;
}

.payout-fixed-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.payout-fixed-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payout-fixed-pills em {
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  background: white;
  color: var(--green-dark);
  padding: 7px 10px;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.payout-field-builder {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(16, 24, 20, 0.05);
  padding: 14px;
}

.payout-field-builder .builder-head {
  border-top: 0;
  padding-top: 0;
}

.payout-field-row {
  position: relative;
  grid-template-columns: minmax(120px, 0.9fr) minmax(150px, 1.1fr) minmax(110px, 0.7fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(160px, 1.15fr) auto auto;
  background: linear-gradient(180deg, #ffffff, #f8faf8);
  box-shadow: inset 4px 0 0 rgba(22, 163, 74, 0.45);
}

.payout-field-row::before {
  content: "Custom";
  align-self: center;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.1);
  color: var(--green-dark);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.payout-field-empty {
  display: grid;
  gap: 5px;
  border: 1px dashed rgba(22, 163, 74, 0.32);
  border-radius: 12px;
  background: rgba(22, 163, 74, 0.045);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.payout-field-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.modal-head {
  border-bottom: 1px solid var(--line);
}

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

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.modal-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.modal-body label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
  text-transform: none;
}

.modal-body textarea {
  min-height: 96px;
  resize: vertical;
}

.product-editor-modal,
.allocation-editor-modal {
  width: min(980px, calc(100vw - 28px));
}

.modal-guidance {
  margin: 0;
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  background: rgba(22, 163, 74, 0.07);
  color: var(--muted);
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.55;
}

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

.field-optional {
  color: var(--muted-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
}

.product-copy {
  margin: 8px 0 0;
  line-height: 1.65;
}

.product-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(22, 163, 74, 0.72));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.product-banner img,
.product-banner-fallback {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.product-banner-fallback {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 24%, rgba(250, 204, 21, 0.32), transparent 34%),
    radial-gradient(circle at 78% 22%, rgba(34, 197, 94, 0.34), transparent 28%),
    linear-gradient(135deg, #0f172a, #14532d 58%, #713f12);
  color: rgba(255, 255, 255, 0.22);
  font-size: 64px;
  font-weight: 950;
}

.product-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.42) 48%, rgba(2, 6, 23, 0.72)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.7));
  z-index: 1;
}

.product-banner-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 72%, rgba(250, 204, 21, 0.22), transparent 22%),
    radial-gradient(circle at 88% 22%, rgba(34, 197, 94, 0.24), transparent 30%);
  z-index: 2;
  pointer-events: none;
}

.product-banner-overlay {
  position: absolute;
  inset: auto 16px 14px 16px;
  z-index: 3;
  display: grid;
  max-width: min(78%, 620px);
  gap: 6px;
  color: #fff;
}

.product-banner-overlay em {
  width: max-content;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.44);
  color: rgba(209, 250, 229, 0.92);
  padding: 5px 9px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.product-banner-overlay strong {
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.03;
}

.product-banner-overlay small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-banner-assets {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-banner-thumb {
  width: min(260px, 100%);
  min-height: 96px;
}

.product-banner-thumb .product-banner-overlay {
  max-width: calc(100% - 24px);
  inset: auto 12px 10px 12px;
}

.product-banner-thumb .product-banner-overlay em,
.product-banner-thumb .product-banner-assets {
  display: none;
}

.product-banner-thumb .product-banner-overlay strong {
  font-size: 14px;
}

.product-banner-client {
  min-height: 320px;
  aspect-ratio: 16 / 9;
}

.product-banner-mobile {
  min-height: 320px;
  aspect-ratio: 9 / 16;
}

.product-banner-client .product-banner-overlay {
  inset: auto 28px 28px 28px;
}

.product-banner-mobile .product-banner-overlay {
  inset: auto 18px 22px 18px;
  max-width: calc(100% - 36px);
}

.product-banner-client .product-banner-overlay strong {
  font-size: clamp(30px, 5vw, 54px);
}

.product-banner-mobile .product-banner-overlay strong {
  font-size: 25px;
}

.product-banner-client .product-banner-overlay small,
.product-banner-mobile .product-banner-overlay small {
  color: #fde68a;
  font-size: 14px;
}

.product-banner-client .product-banner-assets,
.product-banner-mobile .product-banner-assets {
  font-size: 12px;
}

.product-banner-hero {
  min-height: 220px;
  margin: 0 0 18px;
}

.product-banner-hero .product-banner-overlay {
  inset: auto 24px 22px 24px;
}

.product-banner-hero .product-banner-overlay strong {
  font-size: clamp(24px, 4vw, 42px);
}

.product-banner-hero .product-banner-overlay small {
  font-size: 13px;
}

.product-banner-field {
  margin-top: 12px;
}

.product-banner-controls {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1.3fr);
  gap: 12px;
  margin-top: 12px;
}

.product-banner-direct {
  display: grid;
  gap: 12px;
}

.product-banner-editor-preview {
  margin: 12px 0 0;
}

.product-banner-live-preview {
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.05), rgba(22, 163, 74, 0.05)),
    var(--panel);
  padding: 16px;
  box-shadow: var(--shadow);
}

.product-banner-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.product-banner-preview-head strong,
.product-banner-preview-head span,
.product-banner-preview-grid p {
  display: block;
}

.product-banner-preview-head strong {
  font-size: 15px;
}

.product-banner-preview-head span,
.product-banner-preview-grid p {
  color: var(--muted);
  font-size: 12px;
}

.product-banner-preview-head > span {
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  color: var(--green);
  padding: 6px 10px;
  font-weight: 900;
  white-space: nowrap;
}

.product-banner-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.38fr);
  gap: 14px;
  align-items: stretch;
}

.product-banner-preview-grid p {
  margin: 0 0 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-banner-prompt-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.03);
  padding: 14px;
}

.product-banner-prompt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}

.product-banner-prompt-head strong,
.product-banner-prompt-head span {
  display: block;
}

.product-banner-prompt-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.product-banner-prompt-panel textarea {
  width: 100%;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 12px;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  resize: vertical;
}

.product-empty-state {
  display: block;
}

.product-allocation-head,
.product-allocation-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(100px, 0.65fr)) auto;
  gap: 10px;
  align-items: end;
}

.product-allocation-head {
  padding: 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.product-allocation-rows {
  display: grid;
  gap: 10px;
}

.product-allocation-row {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  padding: 12px;
}

.product-allocation-row .allocation-remove {
  min-height: 42px;
}

.allocation-summary,
.allocation-editor-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 13px 15px;
}

.allocation-editor-total {
  margin-top: 0;
}

.allocation-summary span,
.allocation-editor-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.allocation-summary strong,
.allocation-editor-total strong {
  font-size: 22px;
}

.allocation-summary p,
.allocation-editor-total p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.market-logo-cell {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.market-logo-frame,
.market-logo-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #eef6ff, #dbeafe);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 16px rgba(15, 23, 42, 0.08);
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.market-logo-cell img {
  filter: brightness(0) saturate(100%) invert(27%) sepia(86%) saturate(1682%) hue-rotate(212deg) brightness(90%) contrast(96%);
  height: 19px;
  object-fit: contain;
  width: 19px;
}

.instrument-logo-cell {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.instrument-logo-frame,
.instrument-logo-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 6px 14px rgba(15, 23, 42, 0.07);
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.instrument-logo-cell img {
  height: 24px;
  object-fit: contain;
  width: 24px;
}

.market-logo-item-us-stocks .market-logo-frame {
  background: linear-gradient(135deg, #ecfdf5, #bbf7d0);
  border-color: rgba(22, 163, 74, 0.2);
}

.market-logo-item-us-stocks img {
  filter: brightness(0) saturate(100%) invert(38%) sepia(71%) saturate(688%) hue-rotate(99deg) brightness(88%) contrast(89%);
}

.market-logo-item-global-etfs .market-logo-frame {
  background: linear-gradient(135deg, #eff6ff, #bfdbfe);
  border-color: rgba(37, 99, 235, 0.22);
}

.market-logo-item-crypto .market-logo-frame {
  background: linear-gradient(135deg, #fff7ed, #fed7aa);
  border-color: rgba(234, 88, 12, 0.2);
}

.market-logo-item-crypto img {
  filter: brightness(0) saturate(100%) invert(45%) sepia(95%) saturate(1423%) hue-rotate(3deg) brightness(98%) contrast(92%);
}

.market-logo-item-forex .market-logo-frame {
  background: linear-gradient(135deg, #ecfeff, #a5f3fc);
  border-color: rgba(8, 145, 178, 0.22);
}

.market-logo-item-forex img {
  filter: brightness(0) saturate(100%) invert(43%) sepia(94%) saturate(527%) hue-rotate(144deg) brightness(87%) contrast(95%);
}

.market-logo-item-commodities .market-logo-frame {
  background: linear-gradient(135deg, #fefce8, #fde68a);
  border-color: rgba(202, 138, 4, 0.24);
}

.market-logo-item-commodities img {
  filter: brightness(0) saturate(100%) invert(53%) sepia(95%) saturate(577%) hue-rotate(8deg) brightness(92%) contrast(96%);
}

.market-logo-item-bonds .market-logo-frame,
.market-logo-item-money-market .market-logo-frame {
  background: linear-gradient(135deg, #f8fafc, #cbd5e1);
  border-color: rgba(71, 85, 105, 0.24);
}

.market-logo-item-bonds img,
.market-logo-item-money-market img {
  filter: brightness(0) saturate(100%) invert(29%) sepia(13%) saturate(1024%) hue-rotate(176deg) brightness(89%) contrast(86%);
}

.market-logo-item-mutual-funds .market-logo-frame {
  background: linear-gradient(135deg, #f5f3ff, #ddd6fe);
  border-color: rgba(124, 58, 237, 0.2);
}

.market-logo-item-mutual-funds img {
  filter: brightness(0) saturate(100%) invert(34%) sepia(74%) saturate(1878%) hue-rotate(248deg) brightness(91%) contrast(94%);
}

.market-logo-item-private-credit .market-logo-frame {
  background: linear-gradient(135deg, #fff1f2, #fecdd3);
  border-color: rgba(225, 29, 72, 0.2);
}

.market-logo-item-private-credit img {
  filter: brightness(0) saturate(100%) invert(24%) sepia(89%) saturate(2284%) hue-rotate(337deg) brightness(92%) contrast(91%);
}

.allocation-summary.is-ready,
.allocation-editor-total.is-ready {
  border-color: rgba(22, 163, 74, 0.34);
  background: rgba(22, 163, 74, 0.07);
}

.allocation-summary.is-ready strong,
.allocation-editor-total.is-ready strong {
  color: var(--green-dark);
}

.allocation-summary.is-blocked,
.allocation-editor-total.is-blocked {
  border-color: rgba(217, 119, 6, 0.3);
  background: rgba(217, 119, 6, 0.06);
}

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

.mobile-tabs {
  display: none;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.mobile-tabs a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mobile-tabs a.is-active {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(22, 163, 74, 0.12);
  color: var(--green-dark);
}

.toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: grid;
  gap: 10px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  transform: translateY(8px);
  opacity: 0;
  border-radius: 10px;
  background: var(--sidebar);
  color: white;
  padding: 12px 14px;
  box-shadow: 0 18px 44px rgba(16, 24, 20, 0.2);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.admin-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f4f7f5;
}

.admin-auth-card {
  width: min(460px, 100%);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(16, 24, 20, .09);
}

.admin-auth-card.is-wide { width: min(640px, 100%); }
.auth-heading { margin: 28px 0 20px; }
.auth-heading h1 { margin: 5px 0 8px; font-size: 28px; letter-spacing: 0; }
.auth-heading p:last-child,.auth-status { color: var(--muted); line-height: 1.6; }
.auth-form { display: grid; gap: 16px; }
.auth-form label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 700; }
.auth-form input { min-height: 43px; border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; font: inherit; }
.admin-password-field { position: relative; display: flex; align-items: center; }
.admin-password-field input { width: 100%; padding-right: 76px; }
.admin-password-field button { position: absolute; right: 7px; min-height: 31px; border: 0; border-radius: 7px; background: #e8f5ea; color: var(--green-dark); padding: 0 12px; font-size: 12px; font-weight: 900; cursor: pointer; }
.admin-password-field button:hover { background: #d8f0dc; }
.auth-error { margin: 0 0 16px; border: 1px solid #fecaca; border-radius: 8px; background: #fff1f2; color: #9f1239; padding: 11px 12px; font-size: 13px; }
.mfa-setup-grid { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 18px; align-items: stretch; margin-bottom: 16px; }
.mfa-qr-card { display: grid; justify-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 10px; background: #f8faf9; padding: 16px; }
.mfa-qr-card span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.mfa-qr-card canvas { width: 220px; height: 220px; border: 10px solid #fff; border-radius: 10px; background: #fff; box-shadow: 0 14px 32px rgba(16,24,20,.08); }
.mfa-qr-card p,.mfa-help { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mfa-secret { display: grid; gap: 6px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 8px; padding: 13px; }
.mfa-secret span { color: var(--muted); font-size: 12px; }
.mfa-secret strong { overflow-wrap: anywhere; font-family: ui-monospace, monospace; }
.recovery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.recovery-grid code { border: 1px solid var(--border); border-radius: 7px; background: #f8faf9; padding: 8px; text-align: center; }

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

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

  .payout-editor-grid {
    grid-template-columns: 1fr;
  }

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

  .payout-field-row::before {
    justify-self: start;
  }

  .product-allocation-head,
  .product-allocation-row {
    grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(90px, 0.7fr));
  }

  .product-allocation-head span:last-child {
    display: none;
  }

  .product-allocation-row .allocation-remove {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .app {
    min-height: 100vh;
  }

  .sidebar {
    display: none;
  }

  .main {
    margin-left: 0;
  }

  .app.menu-open .sidebar {
    display: block;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 86vw);
    z-index: 80;
    overflow-y: auto;
    box-shadow: 20px 0 45px rgba(0, 0, 0, .22);
  }

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .mobile-tabs {
    display: flex;
  }

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

  .search {
    display: none;
  }

  .api-status {
    display: none;
  }

  .content {
    padding: 18px;
  }

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

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

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

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

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
  }

  .top-actions {
    margin-left: auto;
  }

  .admin-account-button {
    padding-right: 3px;
  }

  .admin-account-caret {
    display: none;
  }

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

  .content {
    padding: 14px;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .section-header,
  .section-body,
  .card {
    padding: 14px;
  }

  .queue-item {
    grid-template-columns: 1fr;
  }

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

  .product-editor-grid,
  .product-banner-controls,
  .product-allocation-row {
    grid-template-columns: 1fr;
  }

  .product-banner-preview-head {
    flex-direction: column;
  }

  .product-allocation-head {
    display: none;
  }

  .product-allocation-row .allocation-remove {
    width: 100%;
  }

  .check-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-search {
    min-width: 0;
  }

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

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

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

  .withdrawal-field-row {
    grid-template-columns: 1fr;
  }

  .payout-fixed-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .payout-fixed-pills {
    justify-content: flex-start;
  }

  .payout-field-row {
    grid-template-columns: 1fr;
  }

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

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

.required-asterisk {
  color: #ef4444;
  display: inline-flex;
  font-weight: 950;
  line-height: 1;
  margin-left: 4px;
}

.modal-check.has-required-field,
.checkbox-row.has-required-field {
  position: relative;
}

.modal-check.has-required-field::after,
.checkbox-row.has-required-field::after {
  color: #ef4444;
  content: " *";
  font-weight: 950;
}
