/* =====================================================================
   MyReactPWAIndia
   Vaguely styled after the website... I did do it after all
   ===================================================================== */

/* =====================================================================
   KEYFRAME ANIMATIONS
   ===================================================================== */

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  display: block;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--fg) 8%, transparent) 25%,
    color-mix(in srgb, var(--fg) 18%, transparent) 50%,
    color-mix(in srgb, var(--fg) 8%, transparent) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

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

@keyframes blink-fade {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

@keyframes cli-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

@keyframes modal-pop {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

@keyframes modal-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes modal-pop-out {
  from { opacity: 1; transform: translateY(0)   scale(1); }
  to   { opacity: 0; transform: translateY(6px) scale(0.98); }
}

@keyframes modal-fade-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(6px); }
}

@keyframes modal-fullscreen-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-fullscreen-backdrop-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-out-left {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}

.release-summary {
  width: 100%;
  background: none !important;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: inherit !important;
  font: inherit;
  text-align: left;
  box-shadow: none !important;
}

.release-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 180ms ease;
}

.release-body.open {
  grid-template-rows: 1fr;
}

.release-body-inner {
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 150ms ease 30ms, transform 150ms ease 30ms;
}

.release-body.open .release-body-inner {
  opacity: 1;
  transform: translateY(0);
}

.page-slide-in {
  animation: slide-in-right 0.12s ease-out;
}

.page-slide-out {
  animation: slide-out-left 0.1s ease-in forwards;
}

/* card crash: slams down from above with a bounce */

@keyframes card-crash {
  0%   { opacity: 0; transform: translateY(-340px) scale(1.1); }
  65%  { opacity: 1; transform: translateY(14px) scale(0.96); }
  80%  { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

/* card spin: whips around 3 full rotations and lands */

@keyframes card-spin-land {
  0%   { opacity: 0; transform: rotate(0deg) scale(0.4); }
  30%  { opacity: 1; }
  100% { transform: rotate(1080deg) scale(1); }
}

/* card static: just appears with a quick fade */

@keyframes card-static {
  0%   { opacity: 0; transform: scale(0.97); }
  100% { opacity: 1; transform: scale(1); }
}

/* card flip: starts upside down and rights itself */

@keyframes card-flip {
  0%   { opacity: 0.6; transform: rotate(180deg) scale(0.9); }
  70%  { transform: rotate(-6deg); }
  85%  { transform: rotate(3deg); }
  100% { opacity: 1; transform: rotate(0deg); }
}

/* card slide: rockets in from far right */

@keyframes card-slide-far-right {
  0%   { opacity: 0; transform: translateX(110vw); }
  75%  { opacity: 1; transform: translateX(-12px); }
  100% { transform: translateX(0); }
}

@keyframes slot-roll {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes dropdown-out {
  from { opacity: 1; transform: translateY(0)    scale(1); }
  to   { opacity: 0; transform: translateY(-4px) scale(0.98); }
}

/* =====================================================================
   BASE
   ===================================================================== */

* {
  box-sizing: border-box;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--fg);
  margin: 12px 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

pre {
  background: rgba(0, 0, 0, 0.2);
  padding: 12px;
  border-radius: var(--radius);
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand);
}

/* =====================================================================
   THEMES
   ===================================================================== */

:root {
  --bg: #121212;
  --bg-elev: #1d1d1d;
  --fg: #eaeaea;
  --muted: #aaa;
  --border: #333;
  --card: #1d1d1d;
  --card-soft: #1e1e1e;
  --pill-bg: #232323;
  --success: #4de68f;
  --error: #ff6b6b;
  --alert-success: #3bd43f;
  --alert-error: #e63232;
  --alert-info: #2f8ffc;
  --alert-warning: #ffc300;
  --table-row-alt: #181818;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

:root[data-theme='light'] {
  --bg: #ffffff;
  --bg-elev: #f7f7f7;
  --fg: #222;
  --muted: #666;
  --border: #ddd;
  --card: #f7f7f7;
  --card-soft: #ffffff;
  --pill-bg: #ededed;
  --success: #0a7d26;
  --error: #d03505;
  --alert-success: #3bd43f;
  --alert-error: #e63232;
  --alert-info: #2f8ffc;
  --alert-warning: #ffc300;
  --table-row-alt: #fafafa;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

:root[data-theme='dim'] {
  --bg: #121212;
  --bg-elev: #1d1d1d;
  --fg: #eaeaea;
  --muted: #aaa;
  --border: #333;
  --card: #1d1d1d;
  --card-soft: #1e1e1e;
  --pill-bg: #232323;
  --success: #4de68f;
  --error: #ff6b6b;
  --alert-success: #3bd43f;
  --alert-error: #e63232;
  --alert-info: #2f8ffc;
  --alert-warning: #ffc300;
  --table-row-alt: #181818;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

:root[data-theme='dark'] {
  --bg: #000000;
  --bg-elev: #0a0a0a;
  --fg: #f0f0f0;
  --muted: #aaa;
  --border: #222;
  --card: #0a0a0a;
  --card-soft: #111;
  --pill-bg: #111;
  --success: #4de68f;
  --error: #ff6b6b;
  --alert-success: #3bd43f;
  --alert-error: #e63232;
  --alert-info: #2f8ffc;
  --alert-warning: #ffc300;
  --table-row-alt: #050505;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* =====================================================================
   LAYOUT
   ===================================================================== */

.mpi-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  background: linear-gradient(
    to right,
    var(--bg) 239px,
    var(--border) 239px,
    var(--border) 240px,
    transparent 240px
  );
}

.mpi-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  user-select: none;
}

.mpi-sidebar h4 {
  margin: 0 0 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.mpi-sidebar .links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mpi-sidebar .links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--fg);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 320ms ease, color 320ms ease, opacity 320ms ease;
}

.mpi-sidebar .links a svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 320ms ease;
}

.mpi-sidebar .links a:hover {
  background: var(--bg-elev);
  text-decoration: none;
}

.mpi-sidebar .links a:hover svg {
  opacity: 1;
}

.mpi-sidebar .links a.active {
  background: var(--brand);
  color: var(--brand-text);
  font-weight: 500;
}

.mpi-sidebar .links a.active svg {
  opacity: 1;
}

.mpi-sidebar .links a.active:hover {
  background: var(--brand-dark);
}

.mpi-sidebar .links a.active.active-parent {
  background: var(--brand);
  color: var(--brand-text);
  font-weight: 500;
  opacity: 0.55;
}

.mpi-sidebar .links a.active.active-parent svg {
  opacity: 0.75;
}

.mpi-sidebar .links a.active.active-parent:hover {
  background: var(--bg-elev);
  opacity: 1;
}

.mpi-sidebarmobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
}

.mpi-sidebarlogo {
  display: block;
}

.mpi-sidebarclose-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--fg);
  font-size: 1.5rem;
  cursor: pointer;
  align-self: flex-end;
}

.mpi-sidebaroverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}

.mpi-sidebaroverlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mpi-sidebarlogout {
  margin-top: auto;
}

.mpi-main {
  padding: 28px 32px 28px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mpi-wrap {
  max-width: 1200px;
  margin: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
}

.mpi-shell:has(.mpi-settings-layout) {
  height: 100vh;
  overflow: hidden;
}

.mpi-body:has(.mpi-settings-layout) {
  overflow: hidden;
}

@media (min-width: 901px) {
  .mpi-body:has(.mpi-settings-layout) .mpi-sidebar {
    position: static;
    align-self: stretch;
    max-height: none;
  }
}

.mpi-main:has(.mpi-settings-layout) {
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mpi-wrap:has(.mpi-settings-layout) {
  max-width: 100%;
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* =====================================================================
   APP SHELL
   ===================================================================== */

.mpi-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.mpi-sticky-top {
  position: sticky;
  top: 0;
  z-index: 50;
}

.mpi-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.verification-banner-stack {
  display: flex;
  flex-direction: column;
}

.mpi-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

.mpi-header-logo {
  height: 38px;
  width: auto;
  display: block;
}

.mpi-header-spacer {
  flex: 1;
}

.hamburger-btn {
  display: none;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.hamburger-btn:hover {
  background: var(--bg-elev);
}

.hamburger-btn svg {
  width: 20px;
  height: 20px;
}

.mpi-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px 10px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: default;
  white-space: nowrap;
}

.pill.clickable {
  cursor: pointer;
}

.pill.clickable:hover {
  background: var(--bg-elev);
}

.pill-label {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill-balance .pill-value {
  font-weight: 600;
  color: var(--brand);
}

.acct-dropdown {
  position: relative;
}

.acct-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  max-width: calc(100vw - 32px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 80;
  overflow: hidden;
  transform-origin: top left;
  animation: dropdown-in 100ms ease-out forwards;
}

.acct-dropdown-closing {
  animation: dropdown-out 80ms ease-in forwards;
}

.acct-list {
  display: flex;
  flex-direction: column;
}

.acct-item {
  display: flex;
  align-items: center;
  padding: 0;
  width: 100%;
  background: transparent;
  color: var(--fg);
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.acct-item:last-child {
  border-bottom: none;
}

.acct-item:hover {
  background: var(--bg-elev);
}

.acct-item.active {
  background: color-mix(in srgb, var(--brand) 6%, transparent);
}

.acct-switch-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 10px 12px;
  background: transparent !important;
  border: none;
  color: inherit !important;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  font-weight: inherit;
  justify-content: flex-start;
}

.acct-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.acct-name {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.acct-handle {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.9em;
}

.acct-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.acct-badge {
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-elev);
  color: var(--muted);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.acct-badge-staging {
  background: color-mix(in srgb, #b45309 12%, transparent);
  color: #92400e;
  border-color: color-mix(in srgb, #b45309 30%, transparent);
}

.acct-balance {
  font-size: 0.73rem;
  color: var(--muted);
}

.acct-remove {
  flex-shrink: 0;
  color: var(--muted) !important;
  background: transparent !important;
  border: none;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.acct-remove-active {
  color: var(--brand) !important;
  font-size: 0.85rem;
  font-weight: 700;
}

.acct-remove .acct-icon-check { display: none; }

.acct-remove .acct-icon-x { display: flex; align-items: center; }

/* Active account: show ✓, hide X */

.acct-remove-active .acct-icon-check { display: flex; align-items: center; }

.acct-remove-active .acct-icon-x { display: none; }

/* Active account hover: show X, hide ✓ */

.acct-remove-active:hover .acct-icon-check { display: none; }

.acct-remove-active:hover .acct-icon-x { display: flex; align-items: center; }

.acct-remove:hover { color: var(--alert-error) !important; }

.acct-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

.acct-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--brand) !important;
  background: transparent !important;
  border: none;
  cursor: pointer;
  padding: 0;
  font-weight: 500;
}

.acct-add-btn:hover {
  background: transparent !important;
  text-decoration: underline;
}

/* =====================================================================
   ALERTS
   ===================================================================== */

.alert {
  padding: 10px 14px;
  margin: 10px 0;
  border-radius: var(--radius);
  border: 1px solid;
}

.alert-success {
  background: rgba(59, 212, 63, 0.07);
  border-color: var(--success);
  color: var(--fg);
}

.alert-warning {
  background: rgba(255, 195, 0, 0.08);
  border-color: var(--alert-warning);
  color: var(--fg);
}

.alert-info {
  background: rgba(47, 143, 252, 0.07);
  border-color: var(--alert-info);
  color: var(--fg);
}

.alert-error {
  background: rgba(230, 50, 50, 0.07);
  border-color: var(--alert-error);
  color: var(--fg);
}

.alert-info a    { color: var(--alert-info); }

.alert-success a { color: var(--success); }

.alert-warning a { color: var(--alert-warning); }

.alert-error a   { color: var(--alert-error); }

.verification-banner {
  background: var(--alert-warning);
  color: black;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.9rem;
  line-height: 1.3;
}

.verification-banner a,
.verification-banner .link {
  color: black;
  text-decoration: underline;
}

.verification-banner button {
  background: black;
  color: white;
  margin-left: 10px;
  padding: 4px 10px;
  font-size: 0.8rem;
}

.verification-banner button:hover {
  background: #333;
}

.verification-banner.banner-error {
  background: var(--alert-error);
}

.verification-banner.banner-error button {
  background: black;
  color: white;
}

.verification-banner.banner-error button:hover {
  background: #333;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */

button,
.btn,
a.option {
  background: var(--brand);
  color: var(--brand-text);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, transform 0.05s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

button:hover,
.btn:hover {
  background: var(--brand-text);
  color: var(--brand);
  text-decoration: none;
}

button:active,
.btn:active {
  transform: translateY(1px);
}

button:disabled,
.btn:disabled {
  background: var(--muted) !important;
  color: var(--bg) !important;
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

button.secondary,
.btn.secondary {
  background: var(--pill-bg);
  color: var(--fg);
  border: 1px solid var(--border);
}

button.secondary:hover,
.btn.secondary:hover {
  background: var(--bg-elev);
}

button.danger,
.btn.danger {
  background: var(--alert-error);
  color: white;
}

button.danger:hover,
.btn.danger:hover {
  background: color-mix(in srgb, var(--alert-error) 80%, black);
}

button.compact,
.btn.compact {
  font-size: 0.8rem;
  padding: 6px 10px;
}

button.ghost,
.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
}

button.ghost:hover,
.btn.ghost:hover {
  background: var(--bg-elev);
}

button.option,
.btn.option,
a.option {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 14px 16px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  text-align: left;
  line-height: 1.2;
}

button.option:hover,
.btn.option:hover,
a.option:hover {
  background: var(--bg-elev);
  color: var(--fg);
  text-decoration: none;
}

button.option:disabled {
  background: transparent !important;
  color: var(--fg) !important;
  opacity: 0.4;
}

button.option .option-label,
a.option .option-label {
  font-weight: 600;
  font-size: 0.95rem;
}

button.option .option-desc,
a.option .option-desc {
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 400;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

/* =====================================================================
   CARDS
   ===================================================================== */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.card.compact {
  padding: 12px 14px;
}

.card.restricted {
  pointer-events: none;
  user-select: none;
  position: relative;
}

.card.restricted::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px) grayscale(1);
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  border-radius: inherit;
}

.card.restricted::after {
  content: attr(data-reason);
  background-color: var(--alert-warning);
  color: black;
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 2;
  max-width: calc(100% - 45px);
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

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

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* =====================================================================
   FORMS
   ===================================================================== */

input[type='search']::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='url'],
input[type='search'],
textarea,
select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
  color: var(--fg);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

* + label {
  margin-top: 18px;
}

.mpi-float {
  position: relative;
  margin-top: 16px;
}

.mpi-float + .mpi-float {
  margin-top: 12px;
}

.mpi-float > input,
.mpi-float > textarea {
  padding-top: 22px;
  padding-bottom: 8px;
}

.mpi-float.has-trailing > input {
  padding-right: 44px;
}

.mpi-float-trailing {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.mpi-float-trailing button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  border-radius: 6px;
}

.mpi-float-trailing button:hover {
  color: var(--fg);
}

.mpi-float > label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--muted);
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, transform 0.15s ease;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  max-width: calc(100% - 28px);
  text-overflow: ellipsis;
}

.mpi-float > input:focus ~ label,
.mpi-float > input:not(:placeholder-shown) ~ label,
.mpi-float > textarea:focus ~ label,
.mpi-float > textarea:not(:placeholder-shown) ~ label {
  top: 6px;
  transform: translateY(0);
  font-size: 0.72rem;
  color: var(--brand);
}

.mpi-float > input:not(:focus):not(:placeholder-shown) ~ label,
.mpi-float > textarea:not(:focus):not(:placeholder-shown) ~ label {
  color: var(--muted);
}

.mpi-float > textarea {
  padding-top: 26px;
}

.mpi-float > textarea ~ label {
  top: 20px;
  transform: none;
}

.mpi-float > textarea:focus ~ label,
.mpi-float > textarea:not(:placeholder-shown) ~ label {
  top: 8px;
}

input[type='color'] {
  width: 50px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  padding: 2px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.checkbox-row input[type='checkbox'] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  transition: background 0.2s ease;
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--brand);
}

.toggle-switch input:checked + .toggle-track::before {
  transform: translateX(22px);
}

.toggle-switch input:disabled + .toggle-track {
  opacity: 0.4;
}

.toggle-switch:has(input:disabled) {
  cursor: not-allowed;
}

/* =====================================================================
   PAYMENT LINKS
   ===================================================================== */

.preset-stack {
  display: grid;
  gap: 10px;
}

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

.preset-stack-display {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

input.preset-stack-display {
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  border: none;
  border-bottom: 3px solid var(--brand);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 4px;
  outline: none;
  padding: 0 0 2px;
  margin: 0;
  width: 100%;
  cursor: default;
  caret-color: var(--brand);
  font-family: inherit;
  transition: box-shadow 0.15s;
}

input.preset-stack-display:focus {
  cursor: text;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand) 14%, transparent);
}

.link-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.link-card .link-info {
  flex: 1;
  min-width: 200px;
}

.link-card .link-token {
  font-family: ui-monospace, 'JetBrains Mono', Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

.link-status {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  font-weight: 600;
}

.link-status.active {
  background: rgba(59, 212, 63, 0.15);
  color: var(--success);
}

.link-status.claimed {
  background: rgba(47, 143, 252, 0.15);
  color: var(--alert-info);
}

.link-status.cancelled {
  background: rgba(230, 50, 50, 0.15);
  color: var(--alert-error);
}

.link-status.expired {
  background: rgba(170, 170, 170, 0.15);
  color: var(--muted);
}

/* =====================================================================
   SUBSCRIPTIONS
   ===================================================================== */

.sub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub-card {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.sub-card .sub-info {
  flex: 1;
  min-width: 200px;
  display: grid;
  gap: 2px;
}

.link-status.trialing {
  background: rgba(47, 143, 252, 0.15);
  color: var(--alert-info);
}

.link-status.past_due {
  background: rgba(230, 160, 50, 0.18);
  color: var(--alert-warning);
}

/* =====================================================================
   MODAL
   ===================================================================== */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  animation: modal-fullscreen-backdrop-in 0.15s ease-out forwards;
}

.modal-root.closing .modal-backdrop {
  animation: modal-fullscreen-backdrop-out 0.1s ease-in forwards;
}

.modal-panel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-pop 0.12s ease-out;
}

.modal-root.closing .modal-panel {
  animation: modal-pop-out 0.1s ease-in forwards;
}

.modal-root.fullscreen {
  background: transparent;
}

.modal-root.fullscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg);
  animation: modal-fullscreen-backdrop-in 0.2s ease-out forwards;
}

.modal-root.fullscreen.closing::before {
  animation: modal-fullscreen-backdrop-out 0.2s ease-in forwards;
}

.modal-root.fullscreen .modal-panel {
  animation: modal-fade 0.12s ease-out;
}

.modal-root.fullscreen.closing .modal-panel {
  animation: modal-fade-out 0.1s ease-in forwards;
}

.modal-root.slide .modal-panel {
  animation: slide-in-right 0.12s ease-out;
}

.modal-root.slide.closing .modal-panel {
  animation: slide-out-left 0.1s ease-in forwards;
}

.modal-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--fg);
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover { background: var(--bg-elev); }

.modal-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.modal-title-logo { justify-self: center; }

.modal-header-spacer { width: 36px; }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

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

.modal-actions button {
  flex: 1;
  min-width: 120px;
}

/* =====================================================================
   TABLES
   ===================================================================== */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
}

.table th,
.table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.table th {
  background: var(--bg-elev);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.table th.sortable:hover {
  color: var(--fg);
}

.table th .sort-indicator {
  font-size: 0.7rem;
  margin-left: 4px;
  opacity: 0.7;
}

.table tr:nth-child(even) td {
  background: var(--table-row-alt);
}

.table tr:hover td {
  background: var(--bg-elev);
}

.table tr.clickable {
  cursor: pointer;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
}

.table-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.table-controls select {
  width: auto;
  min-width: 120px;
}

/* =====================================================================
   TOASTS
   ===================================================================== */

.toast-container {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  box-shadow: var(--shadow);
  background: var(--card);
  animation: toast-slide-up 0.25s ease-out;
}

.toast.toast-leaving {
  animation: toast-fade-out 0.2s ease-in forwards;
}

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

@keyframes toast-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.toast-x {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  padding: 0 4px;
  cursor: pointer;
  margin-left: auto;
}

.toast-x:hover {
  background: transparent;
  color: var(--fg);
}

.toast-action {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.toast-action:hover {
  background: rgba(255,255,255,0.08);
}

/* =====================================================================
   LEADERBOARD / TEAM
   ===================================================================== */

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.lb-row:last-child {
  border-bottom: none;
}

.lb-rank {
  font-weight: 700;
  font-size: 1.1rem;
  width: 32px;
  color: var(--muted);
}

.lb-rank.top-1 {
  color: gold;
}

.lb-rank.top-2 {
  color: silver;
}

.lb-rank.top-3 {
  color: #cd7f32;
}

.lb-username {
  flex: 1;
  padding: 0 12px;
  font-weight: 500;
}

.lb-balance {
  color: var(--brand);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-elev);
  user-select: none;
  cursor: pointer;
}

.team-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.team-role {
  color: var(--muted);
  font-size: 0.85rem;
}

.team-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.team-socials a {
  font-size: 0.8rem;
  padding: 4px 10px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg);
}

.team-socials a:hover {
  background: var(--bg-elev);
  text-decoration: none;
}

/* =====================================================================
   STATS / DASHBOARD
   ===================================================================== */

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.balance-display {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
}

/* =====================================================================
   LOGIN / AUTH
   ===================================================================== */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card .auth-logo {
  display: block;
  margin: 0 auto 16px;
  height: 50px;
}

.auth-card h2 {
  text-align: center;
  margin: 0 0 4px;
}

.auth-card .auth-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 900px) {
  .hamburger-btn {
    display: inline-flex;
  }

  .mpi-body {
    grid-template-columns: 1fr;
    background: none;
  }

  .mpi-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    max-height: none;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    z-index: 100;
    border-right: 1px solid var(--border);
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
  }

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

  .mpi-sidebarmobile-header {
    display: flex;
  }

  .mpi-sidebarclose-btn {
    display: block;
  }

  .mpi-main {
    padding: 18px 14px;
  }

  .mpi-pills {
    padding: 0 12px 10px;
  }

  .mpi-header-logo {
    height: 32px;
  }

  .lb-username,
  .lb-balance {
    font-size: 0.95rem;
  }

  .balance-display {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .pill {
    font-size: 0.78rem;
    padding: 5px 10px;
  }

  .pill-label {
    font-size: 0.68rem;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
  }

  .toast {
    min-width: 0;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .balance-display {
    font-size: 1.7rem;
  }
}

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

.row.tight {
  gap: 4px;
}

.row.spread {
  justify-content: space-between;
}

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

.mono {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85em;
}

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.mt-3 {
  margin-top: 24px;
}

.mb-2 {
  margin-bottom: 16px;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.flex-1 {
  flex: 1;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.copy-btn:hover {
  background: var(--bg-elev);
}

/* =====================================================================
   EMPTY / LOADING
   ===================================================================== */

.empty {
  text-align: center;
  padding: 32px;
  color: var(--muted);
}

.spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--border);
  border-top-color: var(--brand);
  border-right-color: var(--brand);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

.spinner.lg {
  width: 28px;
  height: 28px;
  border-width: 3px;
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 24px;
  color: var(--muted);
}

.loading-row span:last-child {
  animation: blink-fade 1.4s ease-in-out infinite;
}

/* =====================================================================
   mycliindia
   ===================================================================== */

.cli-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 178px);
  min-height: 320px;
  background: #000000;
  border: 2px solid #ffffff;
  border-radius: var(--radius);
  font-family: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  font-size: 0.855rem;
  line-height: 1.6;
  cursor: text;
  overflow: hidden;
}

.cli-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 10px;
  border-bottom: 1px solid #1a1a1a;
  flex-shrink: 0;
}

.cli-clear-btn {
  background: transparent;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  color: #444;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 9px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
  line-height: 1.6;
}

.cli-clear-btn:hover {
  color: #fff;
  border-color: #555;
}

.cli-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 8px;
}

.cli-output::-webkit-scrollbar {
  width: 5px;
}

.cli-output::-webkit-scrollbar-track {
  background: transparent;
}

.cli-output::-webkit-scrollbar-thumb {
  background: #ffffff;
  border-radius: 3px;
}

.cli-line {
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 1.2em;
}

.cli-line-cmd {
  color: #ffffff;
  padding-top: 10px;
  margin-bottom: 1px;
}

.cli-line-out {
  color: #ffffff;
}

.cli-line-ok {
  color: #00ff66;
}

.cli-line-err {
  color: #ff4444;
}

.cli-line-warn {
  color: #ffcc00;
}

.cli-line-info {
  color: #00ccff;
}

.cli-line-sep {
  display: block;
  height: 6px;
}

.cli-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 12px;
  border-top: 2px solid #ffffff;
  background: #000000;
  flex-shrink: 0;
}

.cli-prompt {
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap;
  font-family: inherit;
  user-select: none;
  flex-shrink: 0;
}

.cli-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: inherit;
  font-size: inherit;
  caret-color: #ffffff;
  padding: 0;
  min-width: 0;
}

.cli-input::placeholder {
  color: #666666;
}

.cli-input:disabled {
  opacity: 0.5;
}

.cli-send-btn {
  background: #000000;
  border: 2px solid #00ff66;
  border-radius: 4px;
  color: #00ff66;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0 12px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s, color 0.12s;
}

.cli-send-btn:hover:not(:disabled) {
  background: #00ff66;
  border-color: #00ff66;
  color: #000000;
  box-shadow: 0 0 12px #00ff66;
}

.cli-send-btn:active:not(:disabled) {
  background: #00cc55;
  box-shadow: 0 0 6px #00ff66;
}

.cli-send-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.cli-busy-dot {
  width: 7px;
  height: 7px;
  background: #00ff66;
  border-radius: 50%;
  animation: cli-pulse 0.9s ease-in-out infinite;
  flex-shrink: 0;
}

.cli-wrap--fullscreen {
  position: fixed;
  inset: 0;
  height: 100dvh;
  border-radius: 0;
  border: none;
  z-index: 9999;
}

/* =====================================================================
   SETTINGS
   ===================================================================== */

.mpi-settings-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  flex: 1;
  min-height: 0;
  border-top: 1px solid var(--border);
}

.mpi-settings-nav {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-height: 0;
  overflow: hidden;
}

.mpi-settings-nav-header {
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.mpi-settings-nav-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
}

.mpi-settings-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.mpi-settings-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--fg);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.12s ease;
  gap: 10px;
}

.mpi-settings-nav-item:hover {
  background: var(--bg-elev);
  text-decoration: none;
  color: inherit;
}

.mpi-settings-nav-item.active {
  background: var(--bg-elev);
  border-left-color: var(--brand);
  font-weight: 500;
}

.mpi-settings-nav-item-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mpi-settings-nav-item-chevron {
  color: var(--muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.mpi-settings-nav-footer {
  flex-shrink: 0;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--border);
}

.mpi-settings-nav-footer p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
}

.mpi-settings-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.mpi-settings-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 1;
}

.mpi-settings-detail-back {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
  cursor: pointer;
  padding: 7px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.12s ease;
  flex-shrink: 0;
  margin-left: -7px;
}

.mpi-settings-detail-back:hover {
  background: var(--bg-elev);
}

.mpi-settings-detail-scroll {
  flex: 1;
  overflow-y: auto;
}

.mpi-settings-detail-content {
  padding: 28px;
}

@media (max-width: 700px) {
  .mpi-settings-layout {
    grid-template-columns: 1fr;
    border-top: none;
  }

  .mpi-settings-nav {
    border-right: none;
  }

  .mpi-settings-nav.mpi-settings-nav--hidden {
    display: none;
  }

  .mpi-settings-detail {
    display: none;
  }

  .mpi-settings-detail.mpi-settings-detail--visible {
    display: flex;
  }

  .mpi-settings-detail-back {
    display: flex;
  }

}

/* =====================================================================
   BUTT
   ===================================================================== */

.the_button {
  width: 100%;
  background: linear-gradient(to left, var(--brand) 0%, var(--brand) var(--payout-percentage), var(--success) var(--payout-percentage));
  color: var(--bg);
  font-weight: 700;
  transition: background 0.08s linear;
}

.the_button:hover {
  background: linear-gradient(to left, var(--brand-dark) 0%, var(--brand-dark) var(--payout-percentage), var(--success) var(--payout-percentage));
  color: var(--bg);
}

/* =====================================================================
   APP LOCK
   ===================================================================== */

.app-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.app-lock-bg-icon {
  position: absolute;
  bottom: -140px;
  right: -140px;
  color: var(--fg);
  opacity: 0.04;
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 0;
  animation: app-lock-bg-icon-in 0.3s ease-out;
}

.modal-root.closing .app-lock-bg-icon {
  animation: app-lock-bg-icon-out 0.2s ease-in forwards;
}

@keyframes app-lock-bg-icon-in {
  from { opacity: 0; }
  to   { opacity: 0.04; }
}

@keyframes app-lock-bg-icon-out {
  from { opacity: 0.04; }
  to   { opacity: 0; }
}

.app-lock-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.app-lock-pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 22px;
}

.app-lock-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.app-lock-pin-dot.filled {
  background: var(--brand);
  border-color: var(--brand);
}

.app-lock-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 0 auto;
}

.app-lock-key {
  font-size: 1.3rem;
  padding: 14px 0;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
}

.app-lock-key:active {
  background: var(--card-soft);
}

.app-lock-key-clear {
  font-size: 0.85rem;
  color: var(--muted);
}

.app-lock-pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 220px;
  margin: 18px auto 0;
}

.app-lock-pattern-dot {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.app-lock-pattern-dot.active {
  background: var(--brand);
  border-color: var(--brand);
  transform: scale(1.1);
}

@font-face {
  font-family: "Inter";
  src: url("/inter-CkI0DTMQ.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/inter-italic-Czj5mwY-.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1;
  --radius: 10px;

  /* These get overridden by SettingsContext at runtime fucking */
  --brand: #d03505;
  --brand-dark: #b22d04;
  --brand-text: #fff;
}