/*
 * Mpangaj Clean theme
 *
 * This file is intentionally additive. Every rule is rooted at
 * html[data-theme="clean"] body.mpangaj-theme-surface, so selecting Current restores the existing cascade
 * without a deployment or a second set of templates.
 */

html[data-theme="clean"] body.mpangaj-theme-surface {
  --color-brand-50: #edf5f2;
  --color-brand-100: #d7e9e3;
  --color-brand-500: #1f6f5c;
  --color-brand-600: #195b4c;
  --color-brand-700: #174536;
  --color-brand-900: #122019;

  --color-indigo-50: var(--color-brand-50);
  --color-indigo-300: #aebdb6;
  --color-indigo-600: var(--color-brand-600);
  --color-indigo-700: var(--color-brand-700);

  --color-slate-50: #f8f9f7;
  --color-slate-100: #f4f5f3;
  --color-slate-200: #e1e6e2;
  --color-slate-300: #cad2cc;
  --color-slate-400: #8a978f;
  --color-slate-500: #6f7d75;
  --color-slate-600: #536158;
  --color-slate-700: #34443b;
  --color-slate-800: #16241f;
  --color-slate-900: #0e1915;

  --color-emerald-50: #edf7f2;
  --color-emerald-100: #d8eee5;
  --color-emerald-400: #62a98e;
  --color-emerald-500: #2d8a6f;
  --color-emerald-600: #24745e;
  --color-emerald-700: #1c5b4a;
  --color-green-50: var(--color-emerald-50);
  --color-green-200: #b9ddce;
  --color-green-600: var(--color-emerald-600);
  --color-green-700: var(--color-emerald-700);

  --color-red-50: #fbefec;
  --color-red-100: #f5ddd7;
  --color-red-200: #edbdb2;
  --color-red-400: #d56c56;
  --color-red-500: #c1442d;
  --color-red-600: #a63825;
  --color-red-700: #842d1e;
  --color-rose-600: var(--color-red-600);
  --color-rose-700: var(--color-red-700);
  --color-violet-50: var(--color-brand-50);
  --color-violet-100: var(--color-brand-100);
  --color-violet-500: var(--color-brand-500);
  --color-violet-600: var(--color-brand-600);
  --color-violet-700: var(--color-brand-700);
  --color-teal-50: var(--color-brand-50);
  --color-teal-500: var(--color-brand-500);
  --color-teal-700: var(--color-brand-700);

  --font-serif: "Inter", system-ui, sans-serif;
  --font-mono: "Inter", system-ui, sans-serif;
  --radius-lg: 8px;
  --radius-xl: 9px;
  --radius-2xl: 10px;
  color: var(--color-slate-800);
  font-family: "Inter", system-ui, sans-serif;
}

html[data-theme="clean"] body.mpangaj-theme-surface {
  background: var(--color-slate-100);
  color: var(--color-slate-800);
}

html[data-theme="clean"] body.mpangaj-theme-surface :focus-visible {
  outline: 2px solid var(--color-brand-500);
  outline-offset: 2px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .card-shadow {
  border: 1px solid var(--color-slate-200);
  box-shadow: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-kpi {
  min-height: 88px;
  padding: 12px 13px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-kpi .fz-figure {
  font-size: clamp(1.25rem, 1.16rem + .38vw, 1.5rem);
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-kpi > p:first-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-view-scroll {
  scrollbar-color: var(--color-slate-300) transparent;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-toolbar {
  min-height: 38px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-card {
  border-radius: 10px;
  box-shadow: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-card:hover {
  border-color: var(--color-slate-300);
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-media,
html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-media > img,
html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-media > div:first-child {
  height: 110px;
  min-height: 110px;
  aspect-ratio: auto;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-body {
  gap: 8px;
  padding: 14px;
  min-width: 0;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-body h3 {
  font-size: 14px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-footer {
  padding-top: 8px;
  flex-wrap: wrap;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-footer > * {
  min-width: 0;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ws-link {
  margin-left: 0;
  margin-right: 0;
}

html[data-theme="clean"] body.mpangaj-theme-surface aside#main-sidebar {
  width: 240px;
  background: var(--color-brand-900);
}

html[data-theme="clean"] body.mpangaj-theme-surface aside#main-sidebar > div:first-child {
  padding: 18px 16px;
  border-color: rgba(255, 255, 255, .08);
}

html[data-theme="clean"] body.mpangaj-theme-surface #sidebar-nav {
  padding: 14px 10px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .nav-item {
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 500;
}

html[data-theme="clean"] body.mpangaj-theme-surface .theme-icon-current {
  display: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .theme-icon-clean {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", sans-serif;
  font-style: normal;
  line-height: 1;
}

html[data-theme="clean"] body.mpangaj-theme-surface .nav-item > .theme-icon-clean {
  width: 16px;
  height: 16px;
  font-size: 14px;
  text-align: center;
}

html[data-theme="clean"] body.mpangaj-theme-surface .bottom-nav-item > .theme-icon-clean {
  width: 22px;
  height: 22px;
  font-size: 15px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .more-sheet-item > .theme-icon-clean {
  width: 18px;
  height: 18px;
  font-size: 15px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .kb-top-nav-item > .theme-icon-clean {
  width: 16px;
  height: 16px;
  font-size: 14px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .clean-brand-glyph {
  width: 14px;
  height: 14px;
  border-radius: 0 50% 50% 50%;
  background: #fff;
  transform: rotate(45deg);
}

html[data-theme="clean"] body.mpangaj-theme-surface .clean-search-glyph {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  font-size: 12px;
  pointer-events: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .clean-currency-glyph {
  width: 16px;
  height: 16px;
  color: var(--color-slate-400);
  font-size: 13px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ws-ico[data-clean-icon] svg {
  display: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ws-ico[data-clean-icon]::before {
  content: attr(data-clean-icon);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", sans-serif;
  font-size: 14px;
  line-height: 1;
}

html[data-theme="clean"] body.mpangaj-theme-surface .nav-item.active {
  background: var(--color-brand-500);
}

html[data-theme="clean"] body.mpangaj-theme-surface .nav-group-label {
  padding: 0 10px 6px;
  color: #5f7168;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
}

html[data-theme="clean"] body.mpangaj-theme-surface .nav-group + .nav-group {
  margin-top: 22px;
}

html[data-theme="clean"] body.mpangaj-theme-surface #desktop-topbar {
  min-height: 68px;
  padding: 12px 28px;
  gap: 24px;
  border-color: var(--color-slate-200);
}

html[data-theme="clean"] body.mpangaj-theme-surface #desktop-topbar #page-title {
  color: var(--color-slate-800);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

html[data-theme="clean"] body.mpangaj-theme-surface #desktop-topbar #global-search {
  min-height: 40px;
  border-radius: 9px;
  background: var(--color-slate-50);
}

html[data-theme="clean"] body.mpangaj-theme-surface #main-content-area {
  background: var(--color-slate-100);
}

html[data-theme="clean"] body.mpangaj-theme-surface .page-action-slot .bg-orange-500,
html[data-theme="clean"] body.mpangaj-theme-surface #page-action-slot .bg-orange-500,
html[data-theme="clean"] body.mpangaj-theme-surface .ui-primary-action {
  border-color: var(--color-brand-500);
  background: var(--color-brand-500);
}

html[data-theme="clean"] body.mpangaj-theme-surface .page-action-slot .bg-orange-500:hover,
html[data-theme="clean"] body.mpangaj-theme-surface #page-action-slot .bg-orange-500:hover,
html[data-theme="clean"] body.mpangaj-theme-surface .ui-primary-action:hover {
  background: var(--color-brand-600);
}

html[data-theme="clean"] body.mpangaj-theme-surface .status-pill,
html[data-theme="clean"] body.mpangaj-theme-surface .pill-filter,
html[data-theme="clean"] body.mpangaj-theme-surface .ui-filter-chip {
  font-family: "Inter", system-ui, sans-serif;
  letter-spacing: 0;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-filter-chip {
  min-height: 36px;
  border-radius: 7px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .dl-wide,
html[data-theme="clean"] body.mpangaj-theme-surface .dl-narrow,
html[data-theme="clean"] body.mpangaj-theme-surface .coming-soon {
  border-color: var(--color-slate-200);
  box-shadow: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .dl-wide thead {
  background: #f6f7f5;
  color: var(--color-slate-500);
}

html[data-theme="clean"] body.mpangaj-theme-surface .dl-wide th {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .04em;
}

html[data-theme="clean"] body.mpangaj-theme-surface .dl-wide td {
  font-size: 12.5px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .ui-data-card {
  border: 1px solid var(--color-slate-200);
  border-radius: 10px;
  background: #fff;
}

html[data-theme="clean"] body.mpangaj-theme-surface .txn-card + .txn-card {
  margin-top: 8px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .txn-card-amount {
  max-width: 42%;
}

html[data-theme="clean"] body.mpangaj-theme-surface [data-ui-archetype="settings"] > div {
  max-width: 760px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .settings-tab {
  border-radius: 7px;
  font-size: 12.5px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .theme-choice {
  min-height: 104px;
}

html[data-theme="clean"] body.mpangaj-theme-surface input,
html[data-theme="clean"] body.mpangaj-theme-surface select,
html[data-theme="clean"] body.mpangaj-theme-surface textarea,
html[data-theme="clean"] body.mpangaj-theme-surface .input-field {
  border-color: var(--color-slate-200);
  border-radius: 8px;
  box-shadow: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface input:focus,
html[data-theme="clean"] body.mpangaj-theme-surface select:focus,
html[data-theme="clean"] body.mpangaj-theme-surface textarea:focus,
html[data-theme="clean"] body.mpangaj-theme-surface .input-field:focus {
  border-color: var(--color-brand-500);
  box-shadow: 0 0 0 3px rgba(31, 111, 92, .12);
}

html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header {
  background: #fff;
  border-bottom: 1px solid var(--color-slate-200);
}

html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-header-home,
html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-header-avatar {
  display: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-page-identity {
  display: block;
}

html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header [data-back-button] {
  color: var(--color-slate-600);
}

html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header [data-back-button]:hover {
  background: var(--color-slate-100);
}

/* The avatar (→ the "more" sheet) is hidden above because the bottom nav's own
   "More" tab already reaches it. Refresh has no such second path on mobile —
   staying reachable here is what lets a Manager pick up a shipped update
   without logging out and back in — so it (and the hard-refresh control next
   to it) stay visible, just recolored for this theme's light header. */
html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-header-refresh,
html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-header-hard-refresh {
  color: var(--color-slate-600);
}

html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-header-refresh:hover,
html[data-theme="clean"] body.mpangaj-theme-surface #mobile-header .mobile-header-hard-refresh:hover {
  background: var(--color-slate-100);
}

html[data-theme="clean"] body.mpangaj-theme-surface #currency-toggle-mobile {
  border-color: var(--color-slate-200);
  background: #fff;
  color: var(--color-slate-700);
}

html[data-theme="clean"] body.mpangaj-theme-surface .bottom-nav {
  background: #fff;
  border-color: var(--color-slate-200);
}

html[data-theme="clean"] body.mpangaj-theme-surface .bottom-nav-item {
  color: var(--color-slate-400);
}

html[data-theme="clean"] body.mpangaj-theme-surface .bottom-nav-item.active {
  color: var(--color-brand-500);
}

html[data-theme="clean"] body.mpangaj-theme-surface #more-sheet {
  border: 1px solid var(--color-slate-200);
  border-bottom: 0;
  box-shadow: 0 -12px 40px rgba(18, 32, 25, .12);
}

/* Auth archetype: shared by sign-in, signup, invite acceptance and account claim. */
html[data-theme="clean"] body.mpangaj-theme-surface:has(.auth-shell) {
  background: linear-gradient(160deg, #0e1a15, #1c3229 60%, #16241f);
}

html[data-theme="clean"] body.mpangaj-theme-surface:has(.auth-shell) > .fixed.inset-0 {
  display: none;
}

html[data-theme="clean"] body.mpangaj-theme-surface .auth-shell {
  max-width: 340px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .auth-brand {
  margin-bottom: 24px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .auth-brand .fz-heading {
  font-size: 19px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .auth-card {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

html[data-theme="clean"] body.mpangaj-theme-surface .auth-card form {
  gap: 14px;
}

html[data-theme="clean"] body.mpangaj-theme-surface .auth-card button[type="submit"] {
  min-height: 44px;
  border-radius: 8px;
  box-shadow: none;
}

/* The approved Clean marketing direction uses the same teal action vocabulary. */
html[data-theme="clean"] body.mpangaj-theme-surface .pp-btn-orange {
  background: var(--color-brand-500);
}

html[data-theme="clean"] body.mpangaj-theme-surface .pp-btn-orange:hover {
  background: var(--color-brand-600);
}

html[data-theme="clean"] body.mpangaj-theme-surface .pp-logo,
html[data-theme="clean"] body.mpangaj-theme-surface .pp-hero h1,
html[data-theme="clean"] body.mpangaj-theme-surface .pp-section-head h2,
html[data-theme="clean"] body.mpangaj-theme-surface .pp-cta-band h2 {
  font-family: "Inter", system-ui, sans-serif;
}

html[data-theme="clean"] body.mpangaj-theme-surface .modal-backdrop > div {
  border-color: var(--color-slate-200);
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(18, 32, 25, .18);
}

@media (min-width: 768px) {
  html[data-theme="clean"] body.mpangaj-theme-surface [id^="view-"] {
    padding-left: 28px;
    padding-right: 28px;
  }

  html[data-theme="clean"] body.mpangaj-theme-surface .ui-view-scroll {
    padding: 20px 0 28px;
  }

  html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-media,
  html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-media > img,
  html[data-theme="clean"] body.mpangaj-theme-surface .ui-entity-media > div:first-child {
    height: 130px;
    min-height: 130px;
  }
}

@media (min-width: 1024px) {
  html[data-theme="clean"] body.mpangaj-theme-surface .ui-kpi-grid {
    gap: 12px;
  }
}

@media (min-width: 768px) {
  html[data-theme="clean"] body.mpangaj-theme-surface .ui-kpi {
    min-height: 104px;
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="clean"] body.mpangaj-theme-surface *,
  html[data-theme="clean"] body.mpangaj-theme-surface *::before,
  html[data-theme="clean"] body.mpangaj-theme-surface *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
