/* style.css — Babe With a Plan (2026-01-13-full)
   Goals:
   - Remove harsh white (soft gray app background)
   - Tighten divider spacing (right tabs)
   - Keep layout readable + centered
   - Sticker drawer clean + usable
*/

:root{
  --bg: #e7e8ea;            /* softer than white */
  --panel: rgba(255,255,255,.78);
  --panel2: rgba(255,255,255,.62);
  --ink: #1f2430;
  --muted: rgba(31,36,48,.65);

  --topbar: #5f636b;
  --chip: rgba(255,255,255,.18);
  --chipInk: #fff;

  --pink: #ff4d88;
  --teal: #30d5c8;

  --line: rgba(0,0,0,.08);
  --shadow: 0 12px 30px rgba(0,0,0,.10);

  --contentW: min(980px, 92vw);
  --radius: 16px;
  --radius2: 22px;
  --font: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
}

/* Helpers */
.hidden{ display:none !important; }
.muted{ color: var(--muted); }
.small{ font-size:.92rem; }
.tiny{ font-size:.82rem; }
.ghost{ background:transparent !important; border:1px solid rgba(0,0,0,.12) !important; color: var(--ink) !important; }

/* Buttons */
.btn{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.7);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:600;
}
.btn:hover{ filter: brightness(.98); }
.btn.primary{
  border:0;
  background: linear-gradient(90deg, var(--pink), var(--teal));
  color: #111;
}
.btn.danger{
  border:0;
  background: #ff3b54;
  color:#fff;
}
.btn.gradient{
  border:0;
  background: linear-gradient(90deg, rgba(255,77,136,.85), rgba(48,213,200,.85));
  color:#111;
}
.btn.ghost{
  background: rgba(255,255,255,.55);
}

.chip{
  border: 1px solid rgba(255,255,255,.28);
  background: var(--chip);
  color: var(--chipInk);
  padding: 8px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:600;
  line-height:1;
}
.chip:hover{ filter: brightness(1.05); }
.chip.danger{
  background: rgba(255,59,84,.85);
  border-color: rgba(255,255,255,.18);
}
.chip.gem{
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.30);
}

/* ✅ LOGIN PAGE: dead-center, always */
.auth{
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 18px;
}

.authCard{
  width: min(420px, 92vw);
  margin: 0 auto;
}

.brand{
  margin: 0 0 10px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height:1.02;
}
.field{
  display:block;
  margin: 12px 0;
}
.field span{
  display:block;
  font-size:.88rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.field input, .field textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.85);
  padding: 10px 12px;
  outline:none;
}
.authMsg{
  margin-top: 10px;
  min-height: 20px;
  font-size:.92rem;
  color: rgba(31,36,48,.78);
}

/* APP TOPBAR */
.topbar{
  position: sticky;
  top:0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 14px;
  background: var(--topbar);
  color:#fff;
}
.topbarLeft{
  display:flex;
  align-items:center;
  gap: 14px;
}
.appTitle{
  font-weight: 800;
  letter-spacing:.2px;
}
.topTabs{
  display:flex;
  gap: 8px;
  align-items:center;
}
.topTab{
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.14);
  color:#fff;
  padding: 7px 10px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:700;
}
.topTab.active{
  background: rgba(255,255,255,.30);
}
.topbarRight{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* Page menu */
.menuWrap{ position:relative; }
.menuPanel{
  position:absolute;
  right:0;
  top: calc(100% + 8px);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  padding: 8px;
  min-width: 160px;
  box-shadow: var(--shadow);
}
.menuBtn{
  width:100%;
  text-align:left;
  padding: 10px 10px;
  border-radius: 12px;
  border:0;
  background: transparent;
  cursor:pointer;
  font-weight:700;
}
.menuBtn:hover{ background: rgba(0,0,0,.06); }

/* VIP Pill */
.vipPillWrap{
  position: sticky;
  top: 54px;
  z-index: 49;
  display:flex;
  justify-content:center;
  padding: 10px 12px;
}
.vipPillBtn{
  border:0;
  background: linear-gradient(90deg, rgba(255,77,136,.85), rgba(48,213,200,.85));
  color:#111;
  font-weight:900;
  border-radius: 999px;
  padding: 10px 14px;
  cursor:pointer;
}
.vipPillPanel{
  margin-left: 10px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
  width: min(520px, 92vw);
}
.vipRow{
  display:flex;
  gap: 10px;
  align-items:center;
}
.vipRow input{
  flex:1;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.9);
  padding: 10px 12px;
}
.vipMsg{ margin-top: 8px; font-size:.92rem; }

/* Shell layout */
.shell{
  position:relative;
  width:100%;
  padding: 18px 0 110px; /* room for sticker drawer */
  display:flex;
  justify-content:center;
}
.stack{
  width: var(--contentW);
}
.panel{
  background: var(--panel);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius2);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin: 14px auto 0;
}
.pageTitle{
  margin: 0 0 12px;
  font-size: 1.4rem;
}
.row{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}
.row.thin{ gap: 8px; }

.picker, input[type="date"], input[type="month"], input[type="number"], input[type="text"], textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.84);
  padding: 10px 12px;
  outline:none;
}
textarea{ resize: vertical; }

.card{
  background: var(--panel2);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: var(--radius);
  padding: 14px 14px;
  margin: 12px 0;
}
.card h3{ margin: 0 0 10px; }

.priGrid{ display:flex; flex-direction:column; gap: 10px; }
.priRow{
  display:flex;
  align-items:center;
  gap: 10px;
}
.priRow .pri{
  flex:1;
}
.priDone{ transform: scale(1.05); }

/* Notes page */
.notesWrap{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
}
@media (max-width: 880px){
  .notesWrap{ grid-template-columns: 1fr; }
}
.notesList{
  min-height: 220px;
  border: 1px dashed rgba(0,0,0,.15);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255,255,255,.5);
}
.noteItem{
  padding: 10px;
  border-radius: 12px;
  cursor:pointer;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.6);
  margin-bottom: 8px;
}
.noteItem.active{
  border-color: rgba(255,77,136,.35);
  box-shadow: 0 8px 18px rgba(255,77,136,.12);
}
.notesEditor input{ margin-bottom: 10px; }
.notesActions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: 10px;
}
.noteStatus{ color: var(--muted); font-size:.92rem; }

/* Vision board */
.visionBoard{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 900px){
  .visionBoard{ grid-template-columns: repeat(2, 1fr); }
}
.visionTile{
  position:relative;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.55);
  aspect-ratio: 1 / 1;
}
.visionTile img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.visionTile button{
  position:absolute;
  top:8px;
  right:8px;
  border:0;
  background: rgba(0,0,0,.55);
  color:#fff;
  border-radius: 999px;
  padding: 6px 10px;
  cursor:pointer;
  font-weight:800;
}

/* Right-side dividers (page tabs) */
.dividers{
  position: fixed;
  right: 14px;
  top: 92px;
  display:flex;
  flex-direction:column;
  gap: 6px;              /* ✅ tighter */
  z-index: 40;
}
.divTab{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.72);
  color: #111;
  padding: 8px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight:800;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  letter-spacing: .2px;
}
.divTab.active{
  background: linear-gradient(180deg, rgba(255,77,136,.75), rgba(48,213,200,.75));
  color:#111;
  border-color: rgba(0,0,0,.08);
}

/* Budget totals */
.budgetTotals{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 10px 0 0;
}
@media (max-width: 820px){
  .budgetTotals{ grid-template-columns: 1fr; }
}
.totBox{
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  padding: 12px;
}
.totLabel{ color: var(--muted); font-weight:800; font-size:.88rem; }
.totValue{ font-size: 1.25rem; font-weight: 950; margin-top: 6px; }

/* Sticker drawer */
.stickerDrawer{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  width: var(--contentW);
  z-index: 60;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.stickerToggle{
  width:100%;
  border:0;
  background: rgba(0,0,0,.05);
  padding: 10px 12px;
  font-weight: 950;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
}
.stickerDrawer:not(.open) .stickerImport,
.stickerDrawer:not(.open) .stickerShelf{ display:none; }

.stickerImport{
  padding: 12px;
  border-top: 1px solid rgba(0,0,0,.08);
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.stickerImport input[type="file"]{ display:none; }
.stickerImport .btn{ width: fit-content; }

.stickerShelf{
  padding: 10px 12px 14px;
  border-top: 1px solid rgba(0,0,0,.08);
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 56px;
}
.stickerThumb{
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.7);
  cursor:pointer;
}
.stickerThumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* Pages */
.page{ display:none; }
.page.active{ display:block; }

/* VIP-only sections (app.js will toggle locked style) */
.vipOnly.locked{
  position:relative;
  filter: grayscale(.2);
  opacity: .65;
}
.vipOnly.locked::after{
  content:"VIP 🔒";
  position:absolute;
  right: 12px;
  top: 12px;
  background: rgba(0,0,0,.6);
  color:#fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight:900;
}

/* Small toast for gem + uploads */
.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 88px;
  background: rgba(0,0,0,.75);
  color:#fff;
  padding: 10px 14px;
  border-radius: 999px;
  z-index: 200;
  box-shadow: var(--shadow);
  font-weight:800;
}
/* ===== Sticker Drawer: force visible + on top (safety patch) ===== */
.stickerDrawer{
  position: fixed !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: 12px !important;

  z-index: 99999 !important;      /* 👈 jump above everything */
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Make sure nothing can clip it */
body{ overflow-x: hidden; }
.shell{ overflow: visible !important; }
.stack{ overflow: visible !important; }

/* Give the page enough breathing room so drawer doesn't cover content */
.shell{ padding-bottom: 160px !important; }
/* ===== Login background + hero (optional) ===== */
.auth{
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(255,77,136,.18), transparent 55%),
    radial-gradient(1200px 600px at 80% 90%, rgba(48,213,200,.18), transparent 55%),
    var(--bg);
}

/* If you have an image, drop it in assets/hero.png */
.auth::after{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url("assets/hero.png") no-repeat right bottom / contain;
  opacity: .25;
  mix-blend-mode: multiply;
}
