/* Profit Mommy Money Tracker — scoped styles */
.pmt-app, .pmt-sheet-wrap {
  --pmt-plum: #4B3B5C; --pmt-lav: #B8A9D9; --pmt-lav-l: #EEE8F7; --pmt-cream: #FAF7F2;
  --pmt-ink: #2E2A33; --pmt-gold: #C2A15A; --pmt-grey: #6B6475; --pmt-line: #E2DAEE; --pmt-warn: #B5534A;
  --pmt-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --pmt-sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-family: var(--pmt-sans); color: var(--pmt-ink); font-size: 16px; line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
.pmt-app *, .pmt-sheet-wrap * { box-sizing: border-box; }
.pmt-app { max-width: 480px; margin: 0 auto; background: var(--pmt-cream); border-radius: 20px; overflow: hidden;
  box-shadow: 0 6px 30px rgba(75, 59, 92, .10); }
.pmt-app button, .pmt-sheet-wrap button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pmt-app a, .pmt-sheet-wrap a { color: var(--pmt-plum); }
.pmt-loading { padding: 48px 20px; text-align: center; color: var(--pmt-grey); margin: 0; }

/* Auth */
.pmt-auth { padding: 32px 22px 26px; }
.pmt-brand { font-family: var(--pmt-serif); font-style: italic; color: var(--pmt-gold); font-size: 22px; text-align: center; letter-spacing: .5px; }
.pmt-brand-sm { text-align: left; font-size: 16px; }
.pmt-title { font-family: var(--pmt-serif); color: var(--pmt-plum); font-size: 32px; line-height: 1.1; text-align: center; margin: 4px 0 6px; font-weight: 600; }
.pmt-sub { text-align: center; color: var(--pmt-grey); font-style: italic; margin: 0 0 20px; font-size: 15px; }
.pmt-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--pmt-lav-l); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.pmt-seg button { border: 0; background: transparent; border-radius: 999px; padding: 10px; color: var(--pmt-plum); font-weight: 700; font-size: 15px; }
.pmt-seg button.is-on { background: #fff; box-shadow: 0 1px 4px rgba(75, 59, 92, .15); }
.pmt-form label, .pmt-field { display: block; font-weight: 700; font-size: 14px; color: var(--pmt-plum); margin: 0 0 12px; }
.pmt-form input:not([type=checkbox]), .pmt-form select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font-size: 16px; font-family: var(--pmt-sans);
  border: 1.5px solid var(--pmt-line); border-radius: 12px; background: #fff; color: var(--pmt-ink); min-height: 48px;
  -webkit-appearance: none; appearance: none; }
.pmt-form select { background-image: linear-gradient(45deg, transparent 50%, var(--pmt-plum) 50%), linear-gradient(135deg, var(--pmt-plum) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.pmt-form input:focus, .pmt-form select:focus { outline: none; border-color: var(--pmt-lav); box-shadow: 0 0 0 3px var(--pmt-lav-l); }
.pmt-pw { position: relative; display: block; }
.pmt-pw input { padding-right: 70px !important; }
.pmt-show { position: absolute; right: 8px; top: 50%; transform: translateY(-40%); border: 0; background: var(--pmt-lav-l); color: var(--pmt-plum);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; font-weight: 700; }
.pmt-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; color: var(--pmt-ink) !important; font-size: 14px !important; }
.pmt-check input { width: 22px; height: 22px; margin: 0; flex: 0 0 22px; accent-color: var(--pmt-plum); }
.pmt-hint { margin: -6px 0 14px; font-size: 13px; color: var(--pmt-grey); }
.pmt-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pmt-error { color: var(--pmt-warn); font-size: 14px; min-height: 1px; margin: 4px 0 8px; font-weight: 700; }
.pmt-btn { display: block; width: 100%; border: 0; border-radius: 14px; background: var(--pmt-plum); color: #fff; font-weight: 700;
  font-size: 17px; padding: 15px; min-height: 52px; }
.pmt-btn:disabled { opacity: .6; }
.pmt-btn-ghost { border: 1.5px solid var(--pmt-line); background: #fff; color: var(--pmt-plum); border-radius: 14px; padding: 14px; font-weight: 700; }
.pmt-fine { font-size: 12px; color: var(--pmt-grey); margin: 14px 0 0; line-height: 1.4; }
.pmt-center { text-align: center; }

/* Shell */
.pmt-shell { display: flex; flex-direction: column; min-height: 640px; }
.pmt-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 6px; }
.pmt-hi { font-family: var(--pmt-serif); font-size: 28px; color: var(--pmt-plum); font-weight: 600; line-height: 1.1; }
.pmt-menu-btn { border: 0; background: #fff; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; color: var(--pmt-plum);
  box-shadow: 0 1px 4px rgba(75, 59, 92, .12); }
.pmt-month { display: flex; align-items: center; justify-content: space-between; margin: 8px 18px 4px; background: #fff; border-radius: 14px; padding: 4px; }
.pmt-month strong { color: var(--pmt-plum); font-size: 16px; }
.pmt-mbtn { border: 0; background: var(--pmt-lav-l); color: var(--pmt-plum); width: 44px; height: 40px; border-radius: 10px; font-size: 22px; line-height: 1; }
.pmt-main { flex: 1; padding: 12px 18px 90px; position: relative; }
.pmt-status { position: sticky; bottom: 70px; text-align: center; font-size: 12px; color: var(--pmt-grey); min-height: 16px; pointer-events: none; }
.pmt-status.is-bad { color: var(--pmt-warn); font-weight: 700; }
.pmt-nav { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--pmt-line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.pmt-nav button { border: 0; background: transparent; color: var(--pmt-grey); font-size: 11px; font-weight: 700; padding: 6px 0; display: flex;
  flex-direction: column; align-items: center; gap: 2px; min-height: 52px; border-radius: 12px; }
.pmt-nav button span { font-size: 19px; line-height: 1.1; }
.pmt-nav button.is-on { color: var(--pmt-plum); background: var(--pmt-lav-l); }

/* Home */
.pmt-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pmt-card { border-radius: 16px; padding: 12px 14px; background: #fff; }
.pmt-card span { display: block; font-size: 12px; font-weight: 700; color: var(--pmt-grey); text-transform: uppercase; letter-spacing: .4px; }
.pmt-card strong { display: block; font-size: 21px; color: var(--pmt-plum); margin-top: 2px; }
.pmt-card.is-gold { border-top: 4px solid var(--pmt-gold); }
.pmt-card.is-plum { border-top: 4px solid var(--pmt-plum); }
.pmt-card.is-lav { border-top: 4px solid var(--pmt-lav); }
.pmt-card.is-cream { border-top: 4px solid #D8CDB8; }
.pmt-card.is-warn { border-top: 4px solid var(--pmt-warn); }
.pmt-card.is-warn strong { color: var(--pmt-warn); }
.pmt-panel { background: #fff; border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.pmt-panel h3, .pmt-sheet h3 { font-family: var(--pmt-serif); color: var(--pmt-plum); font-size: 22px; margin: 0 0 10px; font-weight: 600; }
.pmt-row-panel { display: flex; justify-content: space-between; align-items: center; }
.pmt-row-panel h3 { margin: 0; }
.pmt-row-panel p { margin: 0; }
.pmt-big { font-size: 22px; color: var(--pmt-plum); }
.pmt-donut { display: block; width: 190px; height: 190px; margin: 4px auto 10px; }
.pmt-donut-big { font-family: var(--pmt-sans); font-weight: 700; font-size: 22px; fill: var(--pmt-plum); }
.pmt-donut-small { font-size: 11px; fill: var(--pmt-grey); }
.pmt-legend { list-style: none; margin: 0; padding: 0; }
.pmt-legend li { display: grid; grid-template-columns: 14px 1fr auto 42px; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--pmt-line); font-size: 14px; }
.pmt-legend i, .pmt-legend-inline i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.pmt-legend b { font-weight: 700; }
.pmt-legend em { font-style: normal; color: var(--pmt-grey); text-align: right; font-size: 13px; }
.pmt-bars { display: block; width: 100%; height: auto; }
.pmt-axis { font-size: 10px; fill: var(--pmt-grey); }
.pmt-axis.is-on { fill: var(--pmt-plum); font-weight: 700; }
.pmt-legend-inline { display: flex; gap: 16px; justify-content: center; font-size: 13px; color: var(--pmt-grey); margin-top: 6px; }
.pmt-legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.pmt-muted { color: var(--pmt-grey); font-size: 14px; }
.pmt-cta { display: block; text-align: center; background: var(--pmt-gold); color: #fff !important; text-decoration: none; font-weight: 700;
  border-radius: 14px; padding: 15px; }

/* Lists */
.pmt-sum { display: flex; justify-content: space-between; align-items: baseline; background: var(--pmt-plum); color: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.pmt-sum span { font-size: 14px; opacity: .9; }
.pmt-sum strong { font-size: 24px; }
.pmt-mini { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--pmt-grey); margin: 0 4px 10px; }
.pmt-mini b { color: var(--pmt-plum); }
.pmt-tip { background: var(--pmt-lav-l); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 12px; color: var(--pmt-ink); }
.pmt-list { list-style: none; margin: 0; padding: 0; }
.pmt-list li { margin: 0 0 8px; }
.pmt-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; background: #fff; border-radius: 14px; padding: 12px 14px; min-height: 60px; color: var(--pmt-ink); }
.pmt-item.is-done { opacity: .6; }
.pmt-item-main { flex: 1; min-width: 0; }
.pmt-item-title { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmt-item-sub { display: block; font-size: 12.5px; color: var(--pmt-grey); }
.pmt-item-amt { font-weight: 700; color: var(--pmt-plum); white-space: nowrap; }
.pmt-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; font-style: normal; }
.pmt-dot.is-paid { width: 24px; height: 24px; flex-basis: 24px; background: #5E8C8A; color: #fff; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pmt-empty { text-align: center; color: var(--pmt-grey); padding: 30px 16px; background: #fff; border-radius: 16px; }
.pmt-fab { position: sticky; bottom: 84px; float: right; margin-top: 10px; width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--pmt-gold);
  color: #fff; font-size: 32px; line-height: 1; box-shadow: 0 6px 18px rgba(75, 59, 92, .3); z-index: 4; }

/* Bottom sheet */
.pmt-sheet-wrap { position: fixed; inset: 0; background: rgba(46, 42, 51, .45); z-index: 99999; display: flex; align-items: flex-end; justify-content: center; }
.pmt-sheet { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; background: var(--pmt-cream); border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: pmtUp .2s ease-out; }
@keyframes pmtUp { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.pmt-sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 6px; }
.pmt-menu { display: grid; gap: 8px; }
.pmt-menu button, .pmt-menu a { display: block; text-align: left; border: 0; background: #fff; border-radius: 12px; padding: 14px; font-weight: 700;
  color: var(--pmt-plum); text-decoration: none; font-size: 15px; }
.pmt-menu .is-danger { color: var(--pmt-warn); }
.pmt-steps p { margin: 0 0 12px; }
body.pmt-noscroll { overflow: hidden; }
@media (max-width: 520px) { .pmt-app { border-radius: 0; box-shadow: none; margin: 0 -1px; } }
@media (prefers-reduced-motion: reduce) { .pmt-sheet { animation: none; } }
