:root{
  --maip-primary: #0f766e;
  --maip-accent: #f59e0b;
  --maip-bg: #f6f7f9;
  --maip-surface: #ffffff;
  --maip-text: #0f172a;
  --maip-muted: #64748b;
  --maip-radius: 16px;
  --maip-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --maip-shadow-soft: 0 6px 18px rgba(15, 23, 42, .06);
}

html, body {
  height: 100%;
  background: var(--maip-bg);
}

body{
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Inter,Arial,sans-serif;
  color: var(--maip-text);
}

/* App canvas */
.maip-app{
  min-height: 100vh;
  padding-bottom: 86px; /* space for bottom nav */
}

.maip-app-header{
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(246,247,249,.88);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.maip-logo{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(245,158,11,.15));
  display: grid;
  place-items: center;
  box-shadow: var(--maip-shadow-soft);
}
.maip-logo-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--maip-primary);
  box-shadow: 0 0 0 6px rgba(15,118,110,.12);
}

.maip-brand{ font-weight: 700; font-size: 14px; line-height: 1.1; }
.maip-subbrand{ font-size: 12px; color: var(--maip-muted); margin-top: 2px; }

.maip-icon-btn{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--maip-surface);
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: var(--maip-shadow-soft);
  display: grid;
  place-items: center;
}
.maip-icon-btn i{ font-size: 18px; color: var(--maip-text); }

.maip-badge-dot{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.2);
}

/* Cards */
.maip-card{
  background: var(--maip-surface);
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: var(--maip-radius);
  box-shadow: var(--maip-shadow-soft);
}

.maip-balance-card{
  background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(245,158,11,.12));
  border: 1px solid rgba(15, 23, 42, .05);
}

.maip-h1{ font-size: 20px; font-weight: 700; margin: 0; }
.maip-section-title{ font-size: 14px; font-weight: 700; margin: 0; }
.maip-muted{ color: var(--maip-muted); }

.maip-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255,255,255,.8);
  font-size: 12px;
  color: var(--maip-text);
}

.maip-action{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: var(--maip-radius);
  background: var(--maip-surface);
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: var(--maip-shadow-soft);
  text-decoration: none;
  color: var(--maip-text);
}
.maip-action i{ font-size: 22px; color: var(--maip-primary); }
.maip-action span{ font-size: 12.5px; font-weight: 600; text-align: center; }

/* Module tiles */
.maip-tile{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding: 14px;
  border-radius: var(--maip-radius);
  background: var(--maip-surface);
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: var(--maip-shadow-soft);
  text-decoration:none;
  color: var(--maip-text);
  min-height: 104px;
}
.maip-tile i{ font-size: 24px; color: var(--maip-primary); }
.maip-tile .title{ font-weight: 700; font-size: 14px; line-height: 1.1; }
.maip-tile .subtitle{ font-size: 12px; color: var(--maip-muted); }

.maip-progress{
  height: 8px;
  border-radius: 999px;
  background: rgba(100,116,139,.18);
  overflow:hidden;
}
.maip-progress > span{
  display:block;
  height:100%;
  width: 60%;
  background: linear-gradient(90deg, var(--maip-primary), var(--maip-accent));
  border-radius: 999px;
}

/* Bottom nav */
.maip-bottom-nav{
  position: fixed;
  left: 0; right:0; bottom: 0;
  z-index: 1030;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid rgba(15, 23, 42, .06);
}
.maip-bottom-nav__inner{
  max-width: 520px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.maip-nav-item{
  text-decoration:none;
  color: var(--maip-muted);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 14px;
}
.maip-nav-item i{ font-size: 18px; }
.maip-nav-item span{ font-size: 11px; font-weight: 600; }
.maip-nav-item.is-active{
  background: rgba(15,118,110,.10);
  color: var(--maip-primary);
}
.maip-nav-item.is-active i{ color: var(--maip-primary); }

/* Pay primary button */
.maip-btn-primary{
  background: var(--maip-primary);
  border-color: var(--maip-primary);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
}
.maip-btn-primary:hover{ filter: brightness(.95); color:#fff; }
.maip-btn-outline{
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
}

/* Small list rows */
.maip-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, .06);
  background: rgba(255,255,255,.9);
  text-decoration:none;
  color: var(--maip-text);
}
.maip-row .left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 0;
}
.maip-row .icon{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(15,118,110,.10);
  color: var(--maip-primary);
}
.maip-row .meta{
  min-width: 0;
}
.maip-row .meta .t{
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.maip-row .meta .s{
  font-size: 12px;
  color: var(--maip-muted);
}
.maip-row .right{
  text-align:right;
}
.maip-row .amt{
  font-weight: 800;
  font-size: 13px;
}
.maip-row .st{
  font-size: 11px;
  color: var(--maip-muted);
}

/* Optional: hide WP admin bar gap on app pages */
body.admin-bar .maip-app-header{ top: 32px; }
@media (max-width: 782px){
  body.admin-bar .maip-app-header{ top: 46px; }
}
