:root {
  color-scheme: dark;
  --bg: #07020d;
  --panel: #10101b;
  --panel-2: #161528;
  --line: #2d2541;
  --text: #ffffff;
  --muted: #aaa3b9;
  --purple: #9b2dff;
  --purple-2: #6c1ee8;
  --green: #28d56f;
  --red: #ff4058;
  --orange: #d98400;
  --cyan: #19d7d0;
  --yellow: #ffd84c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 4%, rgba(155, 45, 255, .18), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(25, 215, 208, .08), transparent 28%),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.auth-shell {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid rgba(155, 45, 255, .45);
  background: rgba(16, 16, 27, .92);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}

.auth-logo {
  width: 148px;
  display: block;
  margin: 0 auto 18px;
}

.auth-card h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 46px);
  letter-spacing: 0;
}

.auth-card p,
.page-title p,
.muted {
  color: var(--muted);
}

.auth-card > p {
  text-align: center;
}

.auth-hint {
  display: grid;
  gap: 4px;
  margin: 16px 0 12px;
  padding: 12px;
  border: 1px solid rgba(155, 45, 255, .28);
  border-radius: 12px;
  background: rgba(155, 45, 255, .08);
  color: var(--muted);
}

.auth-hint strong {
  color: var(--text);
}

.auth-link {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
}

.auth-link button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #dcb8ff;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.password-wrap {
  position: relative;
}

.password-wrap .input {
  padding-right: 58px;
}

.password-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  cursor: pointer;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

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

.form-grid .btn {
  min-height: 50px;
}

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

.stack .field {
  margin-top: 0;
}

.field label {
  color: #ded6ef;
  font-weight: 800;
}

.input,
select {
  width: 100%;
  min-height: 50px;
  color: var(--text);
  background: #080812;
  border: 1px solid #302b42;
  border-radius: 10px;
  padding: 0 14px;
  outline: none;
}

.top-select {
  width: min(280px, 100%);
}

.textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  color: var(--text);
  background: #080812;
  border: 1px solid #302b42;
  border-radius: 10px;
  padding: 14px;
  outline: none;
  line-height: 1.45;
}

.input:focus,
select:focus,
.textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155, 45, 255, .18);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  transition: transform .12s ease, filter .12s ease;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:active {
  transform: scale(.98);
}

.btn.soft {
  background: #19172a;
  border: 1px solid #312a43;
}

.btn.green {
  background: #0b8b48;
}

.btn.red {
  background: var(--red);
}

.btn.orange {
  background: var(--orange);
}

.mini {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  padding: 0 10px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: #242039;
}

.mini.green {
  background: #0b8b48;
}

.mini.orange {
  background: var(--orange);
}

.mini.red {
  background: var(--red);
}

.mini.active {
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px clamp(14px, 3vw, 32px);
  border-bottom: 1px solid rgba(155, 45, 255, .26);
  background: rgba(7, 2, 13, .86);
  backdrop-filter: blur(16px);
}

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

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.brand h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 20px);
  margin-top: 3px;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
  padding: 18px clamp(16px, 3vw, 34px) 18px;
}

.sidebar {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  align-self: start;
  display: grid;
  gap: 10px;
  padding-right: 2px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  text-align: left;
  border: 1px solid transparent;
  background: var(--panel-2);
  color: #d8d2e5;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav-btn.active {
  color: white;
  border-color: rgba(155, 45, 255, .5);
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
}

.nav-emoji {
  width: 30px;
  font-size: 22px;
  text-align: center;
}

.content {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 0 8px 96px 0;
}

.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

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

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

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

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

.card {
  background: rgba(16, 16, 27, .92);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
}

.dead-accounts-card {
  border-color: rgba(255, 59, 92, 0.58);
  background: rgba(47, 8, 20, 0.34);
}

.card.accent {
  border-color: rgba(155, 45, 255, .65);
  box-shadow: inset 0 2px 0 rgba(155, 45, 255, .9);
}

.mini-card {
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
}

.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

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

.card h2,
.card h3 {
  margin: 0 0 10px;
}

.stat {
  min-height: 96px;
}

.stat .label {
  color: var(--muted);
  font-size: 15px;
}

.stat .value {
  display: block;
  margin-top: 10px;
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.dashboard-grid .stat {
  min-height: 104px;
}

.section-block {
  display: grid;
  gap: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

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

.quick-action {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  color: white;
  text-align: left;
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 5px;
}

.quick-action span {
  font-size: 26px;
}

.quick-action small {
  color: rgba(255,255,255,.72);
}

.quick-action.purple { background: linear-gradient(135deg, var(--purple), var(--purple-2)); }
.quick-action.dark { background: var(--panel-2); }
.quick-action.orange { background: var(--orange); }
.quick-action.green { background: #0b8b48; }

.hero-metric {
  display: grid;
  gap: 6px;
}

.hero-metric span {
  color: var(--muted);
}

.hero-metric strong {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
}

.cash-hero {
  border-color: rgba(40, 213, 111, .38);
  background:
    linear-gradient(135deg, rgba(40, 213, 111, .08), transparent 45%),
    rgba(16, 16, 27, .92);
}

.cash-chart-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 7px;
  color: var(--muted);
}

.cash-chart-line strong {
  color: var(--text);
}

.cash-chart-line span {
  text-align: right;
}

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

.movement-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(8, 8, 18, .7);
}

.movement-item strong,
.movement-item span {
  display: block;
}

.movement-item span {
  color: var(--muted);
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.movement-item b {
  font-size: 18px;
  white-space: nowrap;
}

.movement-item.positive {
  border-color: rgba(40, 213, 111, .22);
}

.movement-item.negative {
  border-color: rgba(255, 64, 88, .28);
}

.bar.positive > span {
  background: linear-gradient(90deg, #11a85a, var(--green));
}

.bar.negative > span {
  background: linear-gradient(90deg, #b21b35, var(--red));
}

.compact-list .row {
  padding: 9px 0;
}

.nested-list {
  margin: 0 0 10px 14px;
  padding-left: 12px;
  border-left: 2px solid rgba(155, 45, 255, .4);
}

.combo-account-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.45fr) minmax(0, .8fr) minmax(0, .65fr);
  gap: 10px;
  align-items: end;
}

.form-span {
  grid-column: 1 / -1;
}

.account-preview {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(155, 45, 255, .24);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(155, 45, 255, .09), transparent 50%),
    rgba(8, 8, 18, .7);
}

.account-preview strong,
.account-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-preview span {
  color: var(--muted);
}

.account-preview .preview-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.backup-note {
  display: grid;
  gap: 6px;
  margin: 14px 0 2px;
  padding: 12px;
  border: 1px solid rgba(40, 213, 111, .22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(40, 213, 111, .08), transparent 60%),
    rgba(8, 8, 18, .7);
}

.backup-note strong {
  color: #ddffeb;
}

.backup-note span {
  color: var(--muted);
}

.backup-versions {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 10px;
  background: rgba(255, 255, 255, .035);
}

.backup-versions h3 {
  margin: 0;
}

.backup-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.backup-version-row:first-of-type {
  border-top: 0;
}

.backup-version-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.combo-detail {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.combo-line small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.refund-detail {
  margin: 12px 0;
}

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

.positive {
  color: var(--green);
}

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

.warning {
  color: var(--orange);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.badge.orange {
  color: #ffdca3;
  background: rgba(217, 132, 0, .18);
}

.nowrap {
  white-space: nowrap;
}

.list {
  display: grid;
  gap: 10px;
}

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

.section-head h2 {
  margin: 0;
}

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

.mini-stats span {
  display: grid;
  gap: 5px;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
  background: rgba(8, 8, 18, .72);
  color: var(--muted);
}

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

.backup-actions .btn {
  min-height: 54px;
  display: inline-grid;
  place-items: center;
  text-align: center;
}

.reward-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.reward-hero {
  min-height: 170px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr);
  gap: 18px;
  align-items: end;
  background:
    linear-gradient(135deg, rgba(155, 45, 255, .2), rgba(25, 215, 208, .08)),
    rgba(16, 16, 27, .92);
}

.reward-hero strong {
  display: block;
  font-size: clamp(42px, 6vw, 76px);
  line-height: .95;
  color: var(--green);
}

.reward-bank {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
}

.reward-chest,
.reward-next,
.reward-pending {
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.reward-chest {
  grid-row: span 2;
}

.reward-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(155, 45, 255, .18);
  border: 1px solid rgba(155, 45, 255, .34);
  font-size: 32px;
}

.reward-chest-visual {
  width: 92px;
  height: 76px;
  display: grid;
  justify-items: center;
  align-content: center;
  margin: 0 auto;
}

.reward-chest-lid {
  width: 68px;
  height: 18px;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, #ffd84c, #f59e0b);
  border: 1px solid rgba(255, 255, 255, .46);
  transform: translateY(3px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, .18);
}

.reward-chest-body {
  width: 78px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #d98400, #8b4a00);
  border: 1px solid rgba(255, 255, 255, .38);
}

.reward-chest-body i {
  width: 14px;
  height: 14px;
  display: block;
  transform: rotate(45deg);
  border-radius: 3px;
  background: #fff4b8;
}

.reward-next {
  min-height: 138px;
}

.reward-pending {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 14px;
  border-color: rgba(217, 132, 0, .45);
}

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

.reward-prize {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  background: rgba(8, 8, 18, .72);
}

.reward-prize.ready {
  border-color: rgba(40, 213, 111, .42);
  background: rgba(40, 213, 111, .08);
}

.reward-prize h3 {
  margin: 0 0 4px;
}

.reward-prize-main {
  display: grid;
  gap: 7px;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(155, 45, 255, .18), rgba(25, 215, 208, .06)),
    rgba(16, 16, 27, .92);
}

.profile-hero h2 {
  margin: 0 0 4px;
  font-size: clamp(28px, 3.4vw, 42px);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(155, 45, 255, .18);
  border: 1px solid rgba(155, 45, 255, .34);
  font-size: 30px;
}

.profile-checks {
  display: grid;
  gap: 10px;
}

.profile-checks span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(8, 8, 18, .72);
}

.profile-checks small {
  color: var(--muted);
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(155, 45, 255, .2), rgba(40, 213, 111, .08)),
    rgba(16, 16, 27, .92);
}

.premium-hero h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 44px);
}

.premium-feature {
  min-height: 132px;
}

.stock-notice {
  display: grid;
  gap: 4px;
  margin: 10px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(8, 8, 18, .7);
}

.stock-notice strong {
  font-size: 16px;
}

.stock-notice span {
  color: var(--muted);
}

.stock-notice.ok {
  border-color: rgba(40, 213, 111, .34);
  box-shadow: inset 3px 0 0 var(--green);
}

.stock-notice.empty {
  border-color: rgba(255, 64, 88, .34);
  box-shadow: inset 3px 0 0 var(--red);
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: .52;
  filter: grayscale(.25);
}

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

.sales-mode-card {
  padding-bottom: 14px;
}

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

.sales-tabs .mini {
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
}

.inventory-mode-card {
  padding-bottom: 14px;
}

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

.inventory-tabs .mini {
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
}

.database-mode-card {
  padding-bottom: 14px;
}

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

.database-tabs .mini {
  min-height: 46px;
  border-radius: 12px;
  font-size: 15px;
}

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

.hidden {
  display: none !important;
}

.form-grid.compact {
  grid-template-columns: minmax(220px, 1fr) auto;
  margin-bottom: 14px;
}

.stock-card {
  overflow: hidden;
}

.stock-card .section-head {
  align-items: center;
}

.stock-list {
  margin-top: 14px;
  padding-top: 4px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.clickable-row {
  cursor: pointer;
  border-radius: 10px;
  padding-left: 10px;
  padding-right: 10px;
  margin-left: -10px;
  margin-right: -10px;
}

.clickable-row:hover {
  background: rgba(155, 45, 255, .08);
}

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

.alert-actions {
  max-width: 520px;
}

.alert-actions .mini {
  min-width: 96px;
}

.row-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  border: 1px solid transparent;
}

.status-badge.positive {
  color: #d8ffe9;
  background: rgba(40, 213, 111, .12);
  border-color: rgba(40, 213, 111, .34);
}

.status-badge.negative {
  color: #ffd4da;
  background: rgba(255, 64, 88, .12);
  border-color: rgba(255, 64, 88, .34);
}

.status-badge.warning {
  color: #ffe9bb;
  background: rgba(217, 132, 0, .12);
  border-color: rgba(217, 132, 0, .36);
}

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

.row-title {
  font-weight: 900;
}

.row-sub {
  color: var(--muted);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(155, 45, 255, .14);
  border: 1px solid rgba(155, 45, 255, .35);
  color: #e7d4ff;
  font-weight: 800;
}

.toast {
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 800;
  border: 1px solid transparent;
}

.toast.success {
  color: #d7ffe6;
  background: rgba(40, 213, 111, .13);
  border-color: rgba(40, 213, 111, .35);
}

.toast.danger {
  color: #ffd4da;
  background: rgba(255, 64, 88, .13);
  border-color: rgba(255, 64, 88, .35);
}

.bar {
  height: 12px;
  overflow: hidden;
  background: #080812;
  border-radius: 999px;
}

.bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  border-radius: inherit;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(920px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  background: #10101b;
  border: 1px solid rgba(155, 45, 255, .48);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
}

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

.detail-line {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #2d2541;
  border-radius: 10px;
  background: #080812;
  min-width: 0;
}

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

.detail-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-link {
  cursor: pointer;
  color: #d9c3ff;
}

.copy-link:hover {
  color: white;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 14px 14px calc(92px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 8px;
    background: rgba(12, 9, 24, .94);
    border: 1px solid rgba(155, 45, 255, .28);
    border-radius: 18px;
    backdrop-filter: blur(16px);
  }

  .mobile-nav .nav-btn {
    min-height: 64px;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    padding: 8px 4px;
    font-size: 12px;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .quick-grid,
  .quick-grid.mini-quick,
  .sales-tabs,
  .inventory-tabs,
  .database-tabs,
  .database-summary,
  .combo-account-fields,
  .backup-actions,
  .mini-stats,
  .reward-dashboard,
  .reward-hero,
  .reward-pending,
  .profile-hero,
  .premium-hero,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .reward-chest {
    grid-row: auto;
  }

  .reward-prize {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 10px 14px;
  }

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

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

  .row-actions,
  .row-right {
    justify-content: flex-start;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

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

  .brand span {
    font-size: 15px;
  }

  .content {
    padding: 0 0 calc(92px + env(safe-area-inset-bottom));
  }
}
