body {
  background: #dfeaf4;
}

.mv-app-page {
  min-height: 100vh;
  color: var(--mv-text);
}

.mv-app-nav {
  position: sticky;
  top: 0;
}

.mv-app-nav-actions {
  gap: 0.75rem;
}

.mv-app-hero-shell {
  padding-top: 0;
}

.mv-app-hero {
  min-height: 220px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: center;
  gap: 2rem;
}

.mv-app-hero-copy {
  max-width: 44rem;
}

.mv-app-status-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.18);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mv-app-status-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.75);
}

#sessionBadge {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
}

#sessionHint {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.mv-app-main-shell {
  min-height: calc(100vh - 220px);
}

.mv-app-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.mv-app-loading-card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  padding: 2rem;
  display: grid;
  gap: 0.85rem;
}

.mv-app-loading-card h2 {
  font-size: 1.5rem;
  color: #0f172a;
}

.mv-app-loading-card p {
  color: #4b5563;
}

.mv-app-spinner {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 6px solid rgba(26, 20, 70, 0.12);
  border-top-color: var(--mv-accent);
  border-right-color: var(--mv-primary);
  margin: 0 auto 0.5rem;
  animation: mvSpin 0.9s linear infinite;
}

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

.is-hidden {
  display: none !important;
}

.mv-dashboard-shell {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.mv-panel-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #d7e5f3;
  border-radius: 28px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.mv-app-summary-card,
.mv-app-query-card {
  color: #0f172a;
}

.mv-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.mv-panel-head.compact {
  align-items: center;
}

.mv-panel-head .section-title-strong {
  font-size: 1.05rem;
  margin-bottom: 0;
}

.mv-panel-head .section-title-strong.small {
  font-size: 0.98rem;
}

.mv-sticky-summary {
  position: sticky;
  top: 88px;
}

.mv-summary-grid {
  display: grid;
  gap: 0.9rem;
}

.mv-summary-item {
  background: #f3f7fc;
  border: 1px solid #dbe7f4;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.25rem;
}

.mv-summary-item span {
  color: #6b7280;
  font-size: 0.88rem;
}

.mv-summary-item strong {
  color: #111827;
  font-size: 1rem;
  word-break: break-word;
}

.mv-summary-item.accent {
  background: linear-gradient(135deg, #fff4e6, #f8e3cd);
  border-color: rgba(255, 107, 0, 0.25);
}

.mv-summary-item.accent strong {
  color: #1f2937;
  font-size: 1.45rem;
}

.mv-role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #d7e4f3;
  color: #1a1446;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mv-inline-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: #f5ece6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a3b6b;
  flex: 0 0 auto;
}

.mv-inline-icon.large {
  width: 56px;
  height: 56px;
}

.mv-inline-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.mv-field {
  display: grid;
  gap: 0.38rem;
}

.mv-field span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #334155;
}

.mv-field input,
.mv-field select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid #bfd5ea;
  background: #eef4fb;
  color: #0f172a;
  font: inherit;
  padding: 0.78rem 0.95rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.mv-field input:focus,
.mv-field select:focus {
  border-color: #2f7fb0;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 127, 176, 0.15);
}

.mv-recharge-box {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.8rem;
}

.mv-app-history-box {
  margin-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.15rem;
}

.mv-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.mv-history-list {
  display: grid;
  gap: 0.7rem;
}

.mv-history-item {
  border: 1px solid #dfe8f2;
  background: #f8fbff;
  border-radius: 16px;
  padding: 0.85rem 0.9rem;
  display: grid;
  gap: 0.18rem;
}

.mv-history-item strong {
  font-size: 0.92rem;
  color: #0f172a;
}

.mv-history-item span {
  font-size: 0.9rem;
  color: #334155;
  word-break: break-word;
}

.mv-history-item small {
  font-size: 0.78rem;
  color: #6b7280;
}

.mv-query-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.4fr) auto;
  gap: 1rem;
  align-items: end;
}

.mv-field.grow {
  min-width: 0;
}

.mv-help-text {
  margin-top: 0.95rem;
  color: #64748b;
  font-size: 0.92rem;
}

.mv-help-text code,
.mv-app-hero-copy code {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font-size: 0.88em;
}

.mv-query-grid + .mv-help-text {
  margin-top: 0.75rem;
}

.mv-app-inline-status {
  min-height: 1.35rem;
  margin-top: 0.85rem;
  color: #475569;
  font-size: 0.9rem;
}

.mv-results-shell {
  margin-top: 1.35rem;
  background: #f8fbff;
  border: 1px solid #dbe7f4;
  border-radius: 24px;
  padding: 1rem;
}

.mv-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.mv-field.inline {
  min-width: 220px;
}

.mv-result-chip {
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: #eef4fb;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid #d5e3f1;
}

.mv-result-highlight {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1446;
}

.mv-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.mv-field-card {
  background: #ffffff;
  border: 1px solid #dbe7f4;
  border-radius: 18px;
  padding: 0.9rem 0.95rem;
  display: grid;
  gap: 0.38rem;
}

.mv-field-card span {
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mv-field-card strong {
  font-size: 0.95rem;
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 600;
}

.mv-modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 80;
}

.mv-modal-card {
  width: min(760px, 100%);
  background: #ffffff;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  padding: 1.4rem;
  position: relative;
  display: grid;
  gap: 0.85rem;
  color: #0f172a;
}

.mv-modal-card h3 {
  font-size: 1.3rem;
}

.mv-modal-card p {
  color: #475569;
}

.mv-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.85rem;
  border: none;
  background: #f3f7fc;
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  color: #1f2937;
}

.mv-recharge-summary {
  background: #fff4e6;
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  color: #7c2d12;
  font-weight: 600;
}

#rechargeFrame {
  width: 100%;
  min-height: 480px;
  border: 1px solid #dbe7f4;
  border-radius: 18px;
  background: #f8fbff;
}

.mv-toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.75rem;
  z-index: 90;
}

.mv-toast {
  min-width: min(340px, calc(100vw - 2rem));
  max-width: 420px;
  border-radius: 18px;
  padding: 0.95rem 1rem;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.18);
  border: 1px solid transparent;
  background: #ffffff;
  color: #0f172a;
}

.mv-toast strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.94rem;
}

.mv-toast p {
  font-size: 0.88rem;
  color: #475569;
}

.mv-toast.is-success {
  border-color: rgba(34, 197, 94, 0.25);
}

.mv-toast.is-error {
  border-color: rgba(239, 68, 68, 0.25);
}

.mv-toast.is-info {
  border-color: rgba(47, 127, 176, 0.25);
}

@media (max-width: 980px) {
  .mv-app-hero,
  .mv-dashboard-shell {
    grid-template-columns: 1fr;
  }

  .mv-sticky-summary {
    position: static;
  }

  .mv-query-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .mv-app-nav .nav-inner {
    flex-wrap: wrap;
  }

  .mv-app-nav-actions {
    width: 100%;
    justify-content: stretch;
  }

  .mv-app-nav-actions .btn,
  .mv-app-nav-actions a.btn {
    flex: 1 1 0;
    justify-content: center;
  }

  .mv-result-grid {
    grid-template-columns: 1fr;
  }

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

  .mv-field.inline {
    min-width: 0;
  }

  #rechargeFrame {
    min-height: 420px;
  }
}
