:root {
  --brand-50: #f0f9ff;
  --brand-100: #e0f2fe;
  --brand-500: #0ea5e9;
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-900: #0c4a6e;
}

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #7dd3fc; border-radius: 8px; }
.dark ::-webkit-scrollbar-thumb { background: #0369a1; }

/* ---------- Progress bars ---------- */
.progress-track { background: #e2e8f0; }
.dark .progress-track { background: #334155; }

.bg-gradient-to-r.from-brand-400.to-brand-600 {
  background-image: none;
  background-color: #F59E0B;
}

/* ---------- View switching (SPA sections) ---------- */
.view { display: none; }
.view.active { display: block; }

/* ---------- Sidebar / nav ---------- */
.nav-link.active { background: var(--brand-600); color: #fff; }
.nav-link.active svg { color: #fff; }

/* ---------- Filter chips (admin project list) ---------- */

.filter-chip.active { background: var(--brand-600); color: #fff; }

/* ---------- Theme toggle icon (Moon in Light Mode, Sun in Dark Mode) ----------*/

.mxn-theme-toggle svg { display: none; }
.mxn-theme-toggle .mxn-icon-moon { display: inline-block; }
.dark .mxn-theme-toggle .mxn-icon-moon { display: none; }
.dark .mxn-theme-toggle .mxn-icon-sun { display: inline-block; }

/* ---------- Loading spinner ---------- */
.spinner {
  border: 3px solid #bae6fd;
  border-top-color: var(--brand-600);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: mxn-spin 0.8s linear infinite;
}
@keyframes mxn-spin { to { transform: rotate(360deg); } }

/* ---------- Fade-in for section switches ---------- */
.fade-in { animation: mxn-fade-in .35s ease; }
@keyframes mxn-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Range slider (admin progress control) ---------- */
input[type="range"].brand-slider { accent-color: var(--brand-600); }

/* ---------- Modal backdrop ---------- */
.modal-backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }

/* ---------- Fatal error / watchdog fallback screen ---------- */
.mxn-fatal-error {
  max-width: 360px;
  margin: 0 auto;
  text-align: center;
  padding: 24px;
}
.mxn-fatal-error p {
  color: #475569;
  font-size: 14px;
  margin: 4px 0;
}
.mxn-fatal-error .mxn-fatal-sub {
  color: #94a3b8;
  font-size: 12.5px;
}
.mxn-fatal-error button {
  margin-top: 16px;
  background: var(--brand-600);
  color: #fff;
  border: none;
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mxn-fatal-error button:hover { background: var(--brand-700); }

#appShell.hidden { display: none !important; }

/* ---------- Copy-to-clipboard button (Client Portal payment card, Transaction ID) ---------- */
.mxn-copy-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: transparent;
  border: none;
  padding: 2px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 0;
}
.mxn-copy-btn:hover { color: var(--brand-600); background: var(--brand-50); }
.dark .mxn-copy-btn:hover { background: rgba(2, 132, 199, 0.15); }
.mxn-copy-btn--copied { color: var(--brand-600); }
.mxn-copy-btn--copied::after {
  content: "Copied";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  background: #0f172a;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
}

/* ---------- Inline auth/data error banners ---------- */
.mxn-error-banner {
  font-size: 13px;
  color: #e11d48;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ---------- Agreement / digital signature (dashboard.js renderAgreements) ---------- */

/* Scrollable terms box the client must read before the sign section unlocks */
.mxn-terms-scroll {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

/* The live-rendered cursive signature preview */
.mxn-signature-font {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
}

/* Signature preview box the client types into and sees rendered live */
.mxn-signature-box {
  min-height: 64px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 28px;
  line-height: 1;
  color: #0369a1;
  background: #f0f9ff;
  border: 1.5px dashed #7dd3fc;
  border-radius: 10px;
  transition: opacity .15s ease;
}
.dark .mxn-signature-box { background: rgba(2, 132, 199, 0.08); color: #7dd3fc; }
.mxn-signature-box.mxn-signature-empty { color: #94a3b8; font-family: 'Inter', ui-sans-serif, system-ui; font-size: 13px; font-weight: 400; }

.mxn-sign-locked {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Mobile header logo (admin.html top bar, lg:hidden) ----------*/

.mxn-mobile-logo {
  height: 72px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
}

/* ---------- Desktop sidebar logo (admin.html left nav, lg:flex) ---------- */

.mxn-sidebar-logo {
  height: 88px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
}

/* ---------- Header logos (index.html Client Portal) ----------*/

.mxn-sidebar-logo-lg {
  height: 96px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
}
.mxn-mobile-logo-lg {
  height: 78px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: contain;
}