:root {
  --navy: #0B1020;
  --ink: #27303F;
  --mut: #6A7384;
  --purple: #6366F1;
  --teal: #10B981;
  --lav: #A78BFA;
  --orange: #F59E0B;
  --cream: #FBF7F1;
  --cream2: #FFFDFA;
  --line: #EFE7DC;
  --lavbg: #F2EFFB;
  --tealbg: #E7F7F1;
  --orangebg: #FDF1DD;
  --purplebg: #ECECFC;
  --disp: 'Plus Jakarta Sans', sans-serif;
  --body: 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
h1, h2, h3 { font-family: var(--disp); letter-spacing: -0.02em; color: var(--navy); line-height: 1.08; }
a { color: inherit; text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--body); font-weight: 600; font-size: 15.5px;
  border-radius: 100px; padding: 14px 26px;
  cursor: pointer; border: 2px solid transparent;
  transition: all 0.18s; white-space: nowrap;
}
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 8px 22px rgba(99,102,241,.28); }
.btn-primary:hover { background: #5457e6; transform: translateY(-2px); }
.btn-warm { background: var(--orange); color: #fff; box-shadow: 0 8px 22px rgba(245,158,11,.3); }
.btn-warm:hover { transform: translateY(-2px); }
.btn-soft { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-soft:hover { border-color: var(--lav); transform: translateY(-2px); }

/* Eyebrow */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 600; color: #8B5CF6;
  background: var(--lavbg); padding: 8px 18px; border-radius: 100px;
}
.eyebrow .dot { font-size: 15px; line-height: 1; }

/* Logo & wordmark */
.rm-house { stroke: url(#rmH); }
.wordmark { font-family: var(--disp); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.wordmark .r { color: var(--navy); }
.wordmark .o { color: var(--purple); }
.logo { display: flex; align-items: center; gap: 11px; }

/* Icon colors */
.ic-teal { background: var(--tealbg); color: var(--teal); }
.ic-purple { background: var(--purplebg); color: var(--purple); }
.ic-lav { background: var(--lavbg); color: #8B5CF6; }
.ic-orange { background: var(--orangebg); color: var(--orange); }

/* =============== LANDING NAV =============== */
body > header {
  position: sticky; top: 0; z-index: 50;
  padding: 14px 0 10px;
  background: var(--cream);
}
body > header nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; background: var(--cream2);
  border: 1px solid var(--line); border-radius: 100px;
  padding: 0 14px 0 22px;
  box-shadow: 0 6px 24px rgba(120,90,40,.06);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--mut); transition: .15s; }
.nav-links a:hover { color: var(--navy); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-right .login { font-size: 15px; font-weight: 600; color: var(--navy); white-space: nowrap; }

/* Nav dropdown */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-drop-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 15px; font-weight: 500; color: var(--mut);
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color .15s;
}
.nav-drop-btn:hover, .nav-dropdown:hover .nav-drop-btn { color: var(--navy); }
.nav-drop-btn svg { transition: transform .2s; }
.nav-dropdown:hover .nav-drop-btn svg { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.1);
  padding: 22px 8px 8px;
  margin-top: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 200;
}
.nav-dropdown:hover .nav-drop-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* arrow caret — sits at top of the visible card (offset by the transparent padding-top) */
.nav-drop-menu::before {
  content: ''; position: absolute; top: 8px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #fff; border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}

.nav-drop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--navy); transition: background .12s;
}
.nav-drop-item:hover { background: var(--cream); }
.nav-drop-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px;
  background: var(--lavbg); display: flex; align-items: center; justify-content: center;
  color: var(--purple);
}
.nav-drop-item strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--navy); }
.nav-drop-item small { display: block; font-size: 12px; color: var(--mut); margin-top: 1px; }

/* =============== HERO =============== */
.hero { padding: 72px 0 80px; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute;
  width: 560px; height: 560px; border-radius: 50%;
  right: -120px; top: -120px;
  background: radial-gradient(circle, rgba(167,139,250,.28), transparent 65%);
}
.hero-bg::after {
  content: ""; position: absolute;
  width: 480px; height: 480px; border-radius: 50%;
  left: -140px; bottom: -160px;
  background: radial-gradient(circle, rgba(245,158,11,.18), transparent 65%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 50px; align-items: center;
}
.hero h1 { font-size: 64px; font-weight: 800; margin: 22px 0 0; }
.hero h1 .accent { position: relative; color: var(--orange); white-space: nowrap; }
.hero h1 .accent svg { position: absolute; left: 0; right: 0; bottom: -12px; width: 100%; height: 16px; }
.hero p.sub { font-size: 19px; color: var(--mut); margin: 26px 0 34px; max-width: 29em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 14.5px; color: var(--mut); }
.checkpill {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--tealbg); color: var(--teal);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}

/* Phone mockup */
.phone-stage { position: relative; display: flex; justify-content: center; }
.phone-card {
  position: absolute; background: #fff; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(120,90,40,.12);
  padding: 12px 16px; display: flex; align-items: center; gap: 11px; z-index: 2;
}
.phone-card .ci { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; }
.pc-top { top: 46px; left: -26px; }
.pc-bot { bottom: 60px; right: -30px; }
.phone-card .t { font-size: 13px; font-weight: 700; color: var(--navy); font-family: var(--disp); }
.phone-card .s { font-size: 11.5px; color: var(--mut); }
.phone {
  position: relative; z-index: 1; width: 296px;
  background: #1c2333; border-radius: 44px; padding: 10px;
  box-shadow: 0 30px 60px rgba(120,90,40,.18);
}
.phone-screen { background: #fff; border-radius: 35px; overflow: hidden; position: relative; }
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 11px 22px 4px; font-size: 12px; font-weight: 600; color: var(--navy); }
.notch {
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 94px; height: 23px; background: #1c2333; border-radius: 13px; z-index: 3;
}
.scr-pad { padding: 8px 18px 14px; }
.scr-hi { font-family: var(--disp); font-weight: 700; font-size: 18px; color: var(--navy); margin-top: 4px; }
.scr-sub { font-size: 12.5px; color: var(--mut); margin-bottom: 14px; }
.bal-card {
  background: linear-gradient(135deg, #A78BFA, #6366F1);
  color: #fff; border-radius: 20px; padding: 16px; position: relative; overflow: hidden;
}
.bal-card .lbl { font-size: 12px; opacity: .9; }
.bal-card .amt { font-family: var(--disp); font-weight: 800; font-size: 27px; margin: 3px 0; }
.bal-card .owe { font-size: 12px; opacity: .92; }
.bal-ic {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 12px;
  background: rgba(255,255,255,.24);
  display: flex; align-items: center; justify-content: center;
}
.scr-label { font-size: 11.5px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; margin: 15px 0 6px; }
.row-item { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.row-item:last-child { border-bottom: 0; }
.row-ic { width: 31px; height: 31px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; }
.row-tt { flex: 1; min-width: 0; }
.row-tt .t { display: block; font-size: 13px; font-weight: 600; color: var(--navy); }
.row-tt .d { display: block; font-size: 11px; color: var(--mut); }
.row-amt { font-size: 13px; font-weight: 700; color: var(--navy); font-family: var(--disp); }
.scr-viewall { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--purple); background: var(--purplebg); padding: 11px; border-radius: 13px; margin-top: 12px; }
.tabbar { display: flex; justify-content: space-around; padding: 11px 0 16px; border-top: 1px solid var(--line); color: #C2BBAF; }
.tabbar svg:first-child { color: var(--purple); }

/* =============== SECTIONS =============== */
section.block { padding: 92px 0; }
.sec-head { max-width: 640px; margin: 0 auto; text-align: center; margin-bottom: 16px; }
.sec-head .eyebrow { margin-bottom: 20px; }
.sec-head h2 { font-size: 46px; font-weight: 800; margin-top: 14px; }
.sec-head p { font-size: 18px; color: var(--mut); margin-top: 16px; }

/* Feature cards */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 54px; }
.feat-card {
  border-radius: 26px; padding: 32px;
  transition: .2s; border: 1px solid rgba(0,0,0,.02);
}
.feat-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(120,90,40,.1); }
.feat-card h3 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.feat-card p { font-size: 15px; color: var(--mut); }
.feat-ic {
  width: 54px; height: 54px; border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; background: #fff;
  box-shadow: 0 4px 12px rgba(120,90,40,.08);
}
.fc-lav { background: var(--lavbg); }
.fc-teal { background: var(--tealbg); }
.fc-orange { background: var(--orangebg); }
.fc-purple { background: var(--purplebg); }
.fc-cream { background: var(--cream2); border: 1px solid var(--line); }

/* Testimonials */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 52px; }
.tcard {
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 26px; padding: 30px;
  display: flex; flex-direction: column; gap: 16px;
}
.stars { display: flex; gap: 3px; color: var(--orange); font-size: 18px; }
.tcard p { font-size: 16px; color: var(--ink); line-height: 1.6; }
.tperson { display: flex; align-items: center; gap: 13px; margin-top: auto; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
  font-family: var(--disp); flex: none;
}
.tperson .nm { font-size: 14.5px; font-weight: 600; color: var(--navy); }
.tperson .rl { font-size: 13px; color: var(--mut); }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #F2EFFB, #FDF1DD);
  border: 1px solid var(--line); border-radius: 34px;
  padding: 72px 56px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute;
  width: 340px; height: 340px; border-radius: 50%;
  right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(167,139,250,.4), transparent 65%);
}
.cta-band::after {
  content: ""; position: absolute;
  width: 300px; height: 300px; border-radius: 50%;
  left: -90px; bottom: -130px;
  background: radial-gradient(circle, rgba(245,158,11,.28), transparent 65%);
}
.cta-band h2 { font-size: 46px; font-weight: 800; position: relative; z-index: 1; margin-top: 16px; }
.cta-band p { color: var(--mut); font-size: 18px; margin: 16px auto 32px; position: relative; z-index: 1; max-width: 30em; }
.cta-band .btn, .cta-band > div { position: relative; z-index: 1; }

/* Footer */
footer { padding: 64px 0 40px; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid > div > p { font-size: 14.5px; color: var(--mut); margin-top: 16px; max-width: 24em; }
.foot-col h4 {
  font-family: var(--body); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--navy); margin-bottom: 14px;
}
.foot-col a { display: block; font-size: 14.5px; color: var(--mut); padding: 5px 0; }
.foot-col a:hover { color: var(--navy); }
.foot-bottom {
  display: flex; justify-content: space-between;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--mut);
  flex-wrap: wrap; gap: 12px;
}

/* =============== RENT CALCULATOR =============== */
.calc-section { background: var(--cream2); }
.calc-card {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 32px; margin-top: 52px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 28px; padding: 36px;
  box-shadow: 0 8px 32px rgba(120,90,40,.06);
}
.calc-top-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.calc-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--navy); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em;
}
.calc-field input, .calc-field select {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--line);
  border-radius: 12px; font-family: var(--body); font-size: 15px;
  color: var(--navy); background: var(--cream);
  outline: none; transition: border-color .15s;
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--purple); }
.input-prefix { position: relative; }
.input-prefix span {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--mut); font-weight: 600;
}
.input-prefix input { padding-left: 28px; }
.roommate-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.rm-calc-card {
  background: var(--cream); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 16px;
}
.rm-calc-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.rm-calc-name {
  font-family: var(--body); font-size: 14px; font-weight: 600;
  color: var(--navy); background: transparent;
  border: none; border-bottom: 1.5px solid var(--line);
  padding: 4px 0; flex: 1; outline: none;
}
.rm-calc-name:focus { border-color: var(--purple); }
.rm-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 700;
  font-family: var(--disp); flex: none;
}
.rm-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rm-options label { font-size: 13px; color: var(--mut); font-weight: 500; }
.rm-options select, .rm-options input[type="checkbox"] { accent-color: var(--purple); }
.rm-option-row { display: flex; align-items: center; gap: 8px; }
.rm-option-row input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; }
.calc-btn { width: 100%; justify-content: center; }

.calc-results { display: flex; flex-direction: column; }
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.results-header h3 { font-size: 20px; font-weight: 700; }
.results-total { font-size: 15px; font-weight: 600; color: var(--mut); }
.results-list { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.result-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px;
  transition: .15s;
}
.result-row:hover { border-color: var(--lav); }
.result-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-family: var(--disp); flex: none;
}
.result-info { flex: 1; }
.result-name { font-size: 15px; font-weight: 600; color: var(--navy); }
.result-pct { font-size: 13px; color: var(--mut); }
.result-amount { font-family: var(--disp); font-size: 20px; font-weight: 800; color: var(--navy); }
.results-note {
  margin-top: 16px; font-size: 13px; color: var(--mut);
  background: var(--lavbg); padding: 12px 16px; border-radius: 12px;
}

/* =============== DASHBOARD =============== */
.dash-layout { display: flex; min-height: 100vh; background: #F0EDE8; }
body:has(.dash-layout) { background: #F0EDE8; }

.sidebar {
  width: 240px; min-height: 100vh; background: #1A1C2E;
  border-right: none;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-logo {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-logo .wordmark .r { color: rgba(255,255,255,.9); }
.sidebar-logo .wordmark .o { color: #818CF8; }
.sidebar-logo .rm-house { stroke: rgba(255,255,255,.8); }

.sidebar-nav { display: flex; flex-direction: column; padding: 10px 0; flex: 1; }
.snav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.3);
  padding: 10px 18px 4px;
}
.snav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px; border-radius: 0;
  font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.52);
  transition: background .12s, color .12s;
  border-left: 3px solid transparent;
}
.snav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.88); }
.snav-item.active {
  background: rgba(99,102,241,.22); color: #A5B4FC;
  font-weight: 600; border-left-color: #6366F1;
}

/* Sidebar collapsible groups */
.snav-group { display: flex; flex-direction: column; }
.snav-group-btn {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 18px; width: 100%; text-align: left;
  font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.52);
  background: none; border: none; border-left: 3px solid transparent;
  cursor: pointer; transition: background .12s, color .12s;
}
.snav-group-btn:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.88); }
.snav-group-btn.active { color: #A5B4FC; }
.snav-chevron { margin-left: auto; flex-shrink: 0; transition: transform .2s; }
.snav-submenu {
  display: none; flex-direction: column;
  background: rgba(0,0,0,.18); border-left: 3px solid rgba(99,102,241,.3);
  margin-left: 18px;
}
.snav-submenu.open { display: flex; }
.snav-subitem {
  display: block; padding: 7px 14px;
  font-size: 13px; color: rgba(255,255,255,.45);
  transition: background .12s, color .12s;
}
.snav-subitem:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.snav-subitem.active { color: #A5B4FC; font-weight: 600; }

/* Blog admin sidebar new styles */
.ba-nav-group { display: flex; flex-direction: column; }
.ba-nav-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 18px; background: none; border: none;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,.5);
  border-left: 3px solid transparent; cursor: pointer;
  transition: background .12s, color .12s; text-align: left;
}
.ba-nav-toggle:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.ba-nav-toggle-active { background: rgba(99,102,241,.2); color: #A5B4FC; border-left-color: #6366F1; }
.ba-chevron { margin-left: auto; flex-shrink: 0; transition: transform .2s; }
.ba-nav-panel {
  display: none; flex-direction: column;
  background: rgba(0,0,0,.2); padding-bottom: 6px;
}
.ba-nav-sub {
  display: block; padding: 7px 18px 7px 28px;
  font-size: 13px; color: rgba(255,255,255,.45);
  transition: color .12s, background .12s;
}
.ba-nav-sub:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.05); }
.ba-nav-sub-active { color: #A5B4FC; font-weight: 600; }
.ba-nav-new-post { color: #34D399 !important; font-weight: 600; }
.ba-nav-new-post:hover { color: #6EE7B7 !important; }
.ba-nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 6px 18px; }
.ba-posts-list { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; }
.ba-posts-loading { padding: 6px 18px 6px 28px; font-size: 12px; color: rgba(255,255,255,.3); }
.ba-post-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 28px;
  font-size: 12px; color: rgba(255,255,255,.45);
  transition: background .1s, color .1s;
}
.ba-post-row:hover { background: rgba(255,255,255,.05); color: rgba(255,255,255,.85); }
.ba-post-row-active { background: rgba(99,102,241,.15); color: #A5B4FC; }
.ba-pr-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-footer { border-top: 1px solid rgba(255,255,255,.07); padding: 6px 0 0; }
.snav-back { color: rgba(255,255,255,.38); }
.snav-back:hover { color: rgba(255,255,255,.75); background: rgba(255,255,255,.06); }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 10px 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
}
.su-info { flex: 1; min-width: 0; }
.su-name { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-home { font-size: 11.5px; color: rgba(255,255,255,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.logout-btn {
  color: rgba(255,255,255,.38); display: flex; align-items: center;
  padding: 5px; border-radius: 6px; transition: .12s; flex-shrink: 0;
}
.logout-btn:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.1); }

.mobile-menu-btn {
  display: none; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; color: var(--navy);
  padding: 4px; margin-right: 8px;
}
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 99;
}
.mobile-overlay.active { display: block; }

/* Mobile-only topbar (logo + hamburger) */
.mobile-topbar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 95;
  height: 54px; padding: 0 16px;
  background: #F0EDE8; border-bottom: 1px solid var(--line);
  align-items: center; justify-content: space-between;
}
.mobile-topbar-btn {
  background: none; border: none; cursor: pointer;
  color: var(--navy); padding: 6px; display: flex; align-items: center;
}

.dash-main { flex: 1; padding: 32px 40px; overflow-y: auto; min-width: 0; }
.dash-topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 12px;
}
.dash-topbar-left { display: flex; align-items: flex-start; gap: 0; }
.dash-title { font-size: 26px; font-weight: 800; color: var(--navy); }
.dash-sub { font-size: 13.5px; color: var(--mut); margin-top: 3px; }
.dash-actions { display: flex; gap: 10px; flex-shrink: 0; }

.no-home-banner {
  text-align: center; padding: 80px 40px;
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 20px;
}
.no-home-icon { font-size: 48px; margin-bottom: 16px; }
.no-home-banner h2 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
.no-home-banner p { color: var(--mut); max-width: 38em; margin: 0 auto 24px; }
.empty-state { font-size: 13.5px; color: var(--mut); padding: 16px 0; }

.form-modal { text-align: left; max-width: 480px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-select, .auth-date {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 15px; font-family: var(--body);
  background: #fff; color: var(--navy); outline: none;
  transition: border-color .15s; width: 100%;
}
.auth-select:focus, .auth-date:focus { border-color: var(--purple); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.stat-body { flex: 1; min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--mut); font-weight: 500; margin-bottom: 4px; }
.stat-value { font-family: var(--disp); font-size: 24px; font-weight: 800; color: var(--navy); }
.stat-note { font-size: 12px; color: var(--mut); margin-top: 2px; }

/* Dash two-col */
.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mt-6 { margin-top: 20px; }
.dash-panel {
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-head h2 { font-size: 17px; font-weight: 700; color: var(--navy); }
.panel-badge {
  font-size: 12px; font-weight: 600; color: var(--purple);
  background: var(--purplebg); padding: 4px 10px; border-radius: 100px;
}
.panel-link { font-size: 13.5px; font-weight: 600; color: var(--purple); }

/* Roommate rows */
.rm-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rm-row:last-child { border-bottom: none; }
.rm-info { flex: 1; }
.rm-name { font-size: 14.5px; font-weight: 600; color: var(--navy); }
.rm-meta { font-size: 12.5px; color: var(--mut); }
.rm-rep { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rep-badge {
  font-family: var(--disp); font-weight: 700; font-size: 14px;
  padding: 3px 9px; border-radius: 100px;
}
.rep-green { background: var(--tealbg); color: var(--teal); }
.rep-yellow { background: var(--orangebg); color: var(--orange); }
.rep-red { background: #FEE2E2; color: #EF4444; }
.rep-label { font-size: 10px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }

/* Task rows */
.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: none; }
.check-box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 2px solid var(--line); flex: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s;
}
.check-box.checked { background: var(--teal); border-color: var(--teal); }
.check-box:hover:not(.checked) { border-color: var(--purple); }
.task-info { flex: 1; }
.task-title { font-size: 14px; font-weight: 500; color: var(--navy); }
.task-title.done { text-decoration: line-through; color: var(--mut); }
.task-meta { font-size: 12px; color: var(--mut); }
.task-due {
  font-size: 12px; font-weight: 600; color: var(--mut);
  background: var(--cream); padding: 3px 9px; border-radius: 100px;
}
.task-due.urgent { color: #EF4444; background: #FEE2E2; }

/* Expense table */
.expense-table { display: flex; flex-direction: column; gap: 0; }
.expense-thead {
  display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr 0.8fr;
  gap: 12px; padding: 8px 0 12px;
  font-size: 12px; font-weight: 700; color: var(--mut);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1.5px solid var(--line);
}
.expense-row {
  display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr 0.8fr;
  gap: 12px; padding: 14px 0;
  border-bottom: 1px solid var(--line); align-items: center;
}
.expense-row:last-child { border-bottom: none; }
.expense-desc { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--navy); }
.exp-cat-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.expense-paid-by { font-size: 13.5px; color: var(--mut); }
.expense-date { font-size: 13.5px; color: var(--mut); }
.expense-amount { font-family: var(--disp); font-size: 14px; font-weight: 700; color: var(--navy); }
.expense-status {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 100px; display: inline-block;
}
.expense-status.settled { background: var(--tealbg); color: var(--teal); }
.expense-status.pending { background: var(--orangebg); color: var(--orange); }
.settle-btn {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 100px;
  background: var(--purplebg); color: var(--purple); cursor: pointer;
  border: none; transition: .12s;
}
.settle-btn:hover { background: var(--purple); color: #fff; }

/* Task section label */
.task-section-label {
  font-size: 11px; font-weight: 700; color: var(--mut);
  text-transform: uppercase; letter-spacing: .07em;
  padding: 4px 0 8px; margin-top: 8px;
}

/* Roommate cards grid */
.rm-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rm-card {
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px;
}
.rm-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar-lg { width: 44px; height: 44px; font-size: 17px; }
.rm-card-name { font-size: 15px; font-weight: 700; color: var(--navy); }
.rm-card-rent { font-size: 13px; color: var(--mut); margin-top: 1px; }
.rm-card-room { display: flex; flex-direction: column; gap: 6px; }
.rm-room-row { display: flex; justify-content: space-between; font-size: 13px; }
.rm-room-label { color: var(--mut); }
.rm-room-val { font-weight: 600; color: var(--navy); }
.rm-room-tag {
  font-size: 12px; font-weight: 500; padding: 3px 10px;
  border-radius: 100px; background: var(--tealbg); color: var(--teal);
  display: inline-block; width: fit-content;
}
.rm-room-tag-neg { background: #FEE2E2; color: #EF4444; }

/* Agreements list */
.agreements-list { display: flex; flex-direction: column; gap: 16px; }
.ag-card {
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 24px;
}
.ag-card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; color: var(--purple); }
.ag-card-meta { flex: 1; }
.ag-card-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.ag-card-date { font-size: 12px; color: var(--mut); }
.ag-card-body { font-size: 14px; color: var(--navy); line-height: 1.6; margin-bottom: 14px; white-space: pre-wrap; }
.ag-card-sigs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-sig-label { font-size: 12.5px; color: var(--mut); font-weight: 500; }
.ag-sig-chip {
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: 100px; background: var(--purplebg); color: var(--purple);
}

/* Textarea for agreements */
.auth-textarea {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 15px; font-family: var(--body);
  background: #fff; color: var(--navy); outline: none;
  transition: border-color .15s; width: 100%; resize: vertical;
}
.auth-textarea:focus { border-color: var(--purple); }

/* ── link-btn (inline text button) ─────────────────────────────────────────── */
.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--purple); font-size: inherit; font-weight: 500;
  padding: 0; text-decoration: underline; text-decoration-color: transparent;
  transition: text-decoration-color .15s;
}
.link-btn:hover { text-decoration-color: var(--purple); }

/* ── invite link box ─────────────────────────────────────────────────────────── */
.invite-link-box {
  display: flex; align-items: center; gap: 8px;
  background: #F3F4F6; border: 1px solid #E5E7EB; border-radius: 10px;
  padding: 10px 12px;
}
.invite-link-text {
  flex: 1; font-size: 12.5px; color: var(--navy);
  word-break: break-all; font-family: monospace;
}
.invite-copy-btn {
  flex-shrink: 0; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
  background: var(--purple); color: #fff; border: none; border-radius: 6px;
  cursor: pointer; transition: opacity .15s;
}
.invite-copy-btn:hover { opacity: .85; }

/* ── pending invitations ─────────────────────────────────────────────────────── */
.pending-invites-section { margin-top: 32px; }
.pending-inv-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; margin-top: 8px;
}
.pending-inv-icon { color: var(--mut); flex-shrink: 0; }
.pending-inv-email { flex: 1; font-size: 14px; color: var(--navy); }
.pending-inv-badge {
  font-size: 11px; font-weight: 600; padding: 2px 8px;
  background: #FEF3C7; color: #92400E; border-radius: 20px;
}
.pending-inv-cancel {
  background: none; border: none; cursor: pointer; color: var(--mut);
  padding: 4px; display: flex; align-items: center; border-radius: 4px;
  transition: color .12s, background .12s;
}
.pending-inv-cancel:hover { color: #EF4444; background: #FEE2E2; }

/* ── join page ───────────────────────────────────────────────────────────────── */
.join-page {
  min-height: 100vh; background: var(--cream);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 24px;
}
.join-logo { margin-bottom: 32px; }
.join-card {
  background: #fff; border-radius: 20px; padding: 40px 32px;
  max-width: 420px; width: 100%; text-align: center;
  box-shadow: 0 4px 32px rgba(0,0,0,.08);
}
.join-icon { font-size: 48px; margin-bottom: 16px; }
.join-title { font-size: 22px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.join-sub { font-size: 14px; color: #555; margin-bottom: 24px; line-height: 1.5; }
.join-btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.join-hint { font-size: 12px; color: #aaa; margin-top: 16px; }

/* == section label (reused in pending invites) */
.section-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--mut); margin-bottom: 4px;
}

/* =============== BLOG =============== */

.blog-hero {
  padding: 72px 0 56px;
  text-align: center;
}
.blog-hero h1 { font-size: 42px; font-weight: 800; color: var(--navy); margin: 16px 0 12px; }
.blog-hero p  { color: var(--mut); font-size: 18px; max-width: 520px; margin: 0 auto; }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.blog-card {
  display: flex; flex-direction: column;
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.09); }
.blog-card-img {
  height: 160px; display: flex; align-items: flex-end; padding: 16px;
}
.blog-card-topic {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; background: rgba(255,255,255,.75);
  border-radius: 20px; padding: 3px 10px; color: var(--navy);
}
.blog-card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.blog-card-title { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.35; }
.blog-card-excerpt { font-size: 14px; color: var(--mut); line-height: 1.55; flex: 1; margin-bottom: 16px; }
.blog-card-meta { font-size: 12px; color: var(--mut); display: flex; gap: 6px; }

/* Single post */
.blog-post-page { padding: 48px 0 80px; }
.post-back { margin-bottom: 32px; }
.post-back a { color: var(--mut); font-size: 14px; text-decoration: none; }
.post-back a:hover { color: var(--navy); }
.blog-post-page .wrap { max-width: 760px; }
.post-header { margin-bottom: 40px; }
.post-title { font-size: 38px; font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 14px; }
.post-meta { font-size: 13px; color: var(--mut); display: flex; gap: 8px; }
.post-author { font-weight: 600; color: var(--ink); }

.blog-content { font-size: 17px; line-height: 1.75; color: var(--ink); }
.blog-content h2 { font-size: 24px; font-weight: 700; color: var(--navy); margin: 40px 0 14px; }
.blog-content h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin: 28px 0 10px; }
.blog-content p  { margin-bottom: 20px; }
.blog-content ul, .blog-content ol { padding-left: 24px; margin-bottom: 20px; }
.blog-content li { margin-bottom: 6px; }
.blog-content strong { font-weight: 700; color: var(--navy); }
.blog-content a { color: var(--purple); text-decoration: underline; }
.blog-content table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 15px; }
.blog-content th { background: var(--purplebg); color: var(--navy); font-weight: 700; padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--line); }
.blog-content td { padding: 9px 14px; border-bottom: 1px solid var(--line); }
.blog-content tr:last-child td { border-bottom: none; }
.blog-content code { background: var(--lavbg); padding: 2px 6px; border-radius: 4px; font-size: 14px; }

.post-cta-strip {
  margin-top: 56px; padding: 32px; background: var(--lavbg);
  border-radius: 18px; text-align: center;
}
.post-cta-strip p { color: var(--mut); margin-bottom: 20px; }
.post-cta-strip .btn { margin: 0 6px; }

/* =============== BLOG ADMIN =============== */

.ba-layout { display: flex; min-height: 100vh; background: #F8FAFC; }

.ba-sidebar {
  width: 220px; flex-shrink: 0; background: #1A1C2E;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.ba-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 18px; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ba-nav { padding: 12px 0; flex: 1; }
.ba-nav-item {
  display: block; padding: 9px 18px;
  color: rgba(255,255,255,.5); font-size: 14px; font-weight: 500;
  text-decoration: none; border-left: 3px solid transparent;
  transition: background .12s, color .12s;
}
.ba-nav-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.85); }
.ba-nav-item.active { background: rgba(99,102,241,.2); color: #A5B4FC; border-left-color: #6366F1; }
.ba-user { padding: 14px 18px; font-size: 11px; color: rgba(255,255,255,.3); border-top: 1px solid rgba(255,255,255,.07); word-break: break-all; }

.ba-main { flex: 1; padding: 32px 40px; overflow-y: auto; }
.ba-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.ba-title { font-size: 22px; font-weight: 800; color: var(--navy); }
.ba-card {
  background: #fff; border: 1px solid #E5E7EB;
  border-radius: 14px; padding: 24px;
}
.ba-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ba-table th { text-align: left; padding: 10px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); border-bottom: 1px solid #E5E7EB; }
.ba-table td { padding: 12px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
.ba-table tr:last-child td { border-bottom: none; }
.ba-post-link { color: var(--navy); font-weight: 600; text-decoration: none; }
.ba-post-link:hover { color: var(--purple); }
.ba-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 20px; }
.ba-badge-pub { background: #D1FAE5; color: #065F46; }
.ba-badge-draft { background: #F3F4F6; color: #6B7280; }
.ba-actions { display: flex; gap: 8px; }
.ba-btn-edit { font-size: 13px; color: var(--purple); background: none; border: none; cursor: pointer; font-weight: 600; }
.ba-btn-del  { font-size: 13px; color: #EF4444; background: none; border: none; cursor: pointer; font-weight: 600; }
.ba-empty { color: var(--mut); font-size: 14px; }
.ba-empty a { color: var(--purple); }

/* Edit form */
.ba-edit-form { display: flex; flex-direction: column; gap: 20px; }
.ba-meta-card { display: flex; flex-direction: column; gap: 16px; }
.ba-field { display: flex; flex-direction: column; gap: 6px; }
.ba-field label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mut); }
.ba-field input, .ba-field select, .ba-field textarea {
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 14px; font-size: 14px; font-family: var(--body);
  background: #fff; color: var(--navy);
}
.ba-field input:focus, .ba-field select:focus, .ba-field textarea:focus {
  outline: none; border-color: var(--purple);
}
.ba-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ba-editor-card { display: flex; flex-direction: column; gap: 0; overflow: hidden; }
.ba-editor-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.ba-tab { padding: 10px 20px; font-size: 13px; font-weight: 600; background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; color: var(--mut); margin-bottom: -1px; }
.ba-tab.active { color: var(--purple); border-bottom-color: var(--purple); }
.ba-content-area { min-height: 380px; border: none; resize: vertical; padding: 20px; font-size: 14px; font-family: 'Courier New', monospace; line-height: 1.6; color: var(--navy); }
.ba-content-area:focus { outline: none; }
.ba-preview { min-height: 380px; padding: 20px; overflow-y: auto; }
.ba-actions-bar { display: flex; align-items: center; gap: 16px; justify-content: flex-end; }

/* Users form */
.ba-add-user-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ba-add-user-form input, .ba-add-user-form select {
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 9px 14px; font-size: 14px; background: #fff;
}
.ba-add-user-form input { flex: 1; min-width: 200px; }

/* =============== TOOLS =============== */

/* Bill splitter */
.bs-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bs-avatar { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.bs-avatar-sm { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.bs-input { flex: 1; border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; }
.bs-del { background: none; border: none; color: var(--mut); cursor: pointer; font-size: 18px; line-height: 1; padding: 0 4px; }
.bs-del:hover { color: #EF4444; }
.bs-bill-block { background: var(--cream); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.bs-bill-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bs-bill-name { flex: 1; }
.bs-amount { width: 90px; padding-left: 22px; }
.bs-shares { display: flex; flex-direction: column; gap: 6px; }
.bs-share-row { display: flex; align-items: center; gap: 8px; }
.bs-share-name { flex: 1; font-size: 12px; color: var(--mut); }
.bs-pct { width: 64px; border: 1.5px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 12px; text-align: right; }

/* Agreement generator */
.ag-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.ag-form-col { display: flex; flex-direction: column; gap: 0; }
.ag-section { background: var(--cream2); border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-bottom: 20px; }
.ag-section-title { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.ag-output-col { position: sticky; top: 24px; }
.ag-output-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 28px; min-height: 300px; }
.ag-output-actions { display: flex; gap: 10px; margin-top: 14px; }
.ag-doc { font-size: 14px; line-height: 1.7; color: var(--navy); }
.ag-doc h2.ag-doc-title { font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.ag-doc .ag-doc-date { text-align: center; color: var(--mut); font-size: 12px; margin-bottom: 24px; }
.ag-doc h3 { font-size: 14px; font-weight: 700; margin: 22px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.ag-doc ul { padding-left: 18px; margin-bottom: 10px; }
.ag-doc p { margin-bottom: 10px; }
.ag-signatures { margin-top: 32px; }
.ag-sig-row { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 12px; }
.ag-sig-name { font-weight: 700; margin-bottom: 8px; }
.ag-sig-line { font-size: 13px; color: var(--mut); margin-top: 6px; }

/* Move-in checklist */
.mc-progress-bar { height: 8px; background: var(--line); border-radius: 8px; overflow: hidden; margin: 24px 0 8px; }
.mc-progress-fill { height: 100%; background: var(--purple); border-radius: 8px; transition: width .3s; width: 0; }
.mc-progress-label { font-size: 13px; color: var(--mut); margin-bottom: 24px; }
.mc-section { margin-bottom: 36px; }
.mc-section-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.mc-items { display: flex; flex-direction: column; gap: 4px; }
.mc-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px; cursor: pointer;
  transition: background .1s;
}
.mc-item:hover { background: #fff; }
.mc-item.mc-checked { background: var(--tealbg); border-color: #A7F3D0; }
.mc-item.mc-checked .mc-text { text-decoration: line-through; color: var(--mut); }
.mc-item input[type=checkbox] { display: none; }
.mc-checkmark {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0;
  border: 2px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.mc-item.mc-checked .mc-checkmark {
  background: var(--teal); border-color: var(--teal);
}
.mc-item.mc-checked .mc-checkmark::after {
  content: ''; display: block; width: 6px; height: 10px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.mc-text { font-size: 14px; color: var(--navy); }

/* =============== RESPONSIVE =============== */

/* Tablet landscape & small desktop */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-main { padding: 28px 28px; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  /* Landing */
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { font-size: 44px; }
  .nav-links { display: none; }
  .nav-right .login { font-size: 14px; }
  .feat-grid, .trust-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .sec-head h2 { font-size: 34px; }
  .cta-band { padding: 48px 28px; }
  .cta-band h2 { font-size: 32px; }
  section.block { padding: 60px 0; }
  /* Calculator */
  .calc-card { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  /* Dashboard */
  .dash-cols { grid-template-columns: 1fr; }
  .expense-thead, .expense-row { grid-template-columns: 2fr 1fr 1fr 0.8fr; }
  .expense-thead span:nth-child(2), .expense-row .expense-paid-by { display: none; }
  .rm-cards-grid { grid-template-columns: 1fr 1fr; }
  /* Auth modal */
  .auth-modal-box { padding: 28px 24px 24px; }
}

/* Mobile (large) */
@media (max-width: 768px) {
  /* Show the fixed mobile topbar; hide the per-page hamburger inside dash-topbar */
  .mobile-topbar { display: flex; }
  .dash-topbar-left .mobile-menu-btn { display: none; }

  /* Dashboard sidebar becomes drawer overlay */
  .sidebar {
    position: fixed; left: -260px; top: 0; z-index: 100;
    transition: left .25s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
    /* 100dvh accounts for iOS Safari address bar; falls back to 100vh */
    height: 100vh; height: 100dvh;
    overflow-y: auto;
  }
  .sidebar.mobile-open {
    left: 0;
    box-shadow: 8px 0 40px rgba(0,0,0,.35);
  }

  /* Push content below the fixed mobile topbar (54px) */
  .dash-main { padding: 70px 16px 20px; }
  .dash-topbar { flex-wrap: wrap; margin-bottom: 16px; }
  .dash-actions { width: 100%; }
  .dash-actions .btn { flex: 1; justify-content: center; }
  /* Stats */
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-value { font-size: 20px; }
  /* Expenses table */
  .expense-thead, .expense-row { grid-template-columns: 2fr 1fr 0.8fr; }
  .expense-thead span:nth-child(3), .expense-row .expense-date,
  .expense-thead span:nth-child(5), .expense-row .expense-status { display: none; }
  .rm-cards-grid { grid-template-columns: 1fr; }
  /* Blog */
  .blog-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 26px; }
  /* Tools */
  .ag-layout { grid-template-columns: 1fr; }
  .ag-output-col { position: static; }
  /* Blog admin */
  .ba-sidebar { display: none; }
  .ba-main { padding: 20px 16px; }
  .ba-field-row { grid-template-columns: 1fr; }
  .ba-add-user-form { flex-direction: column; align-items: stretch; }
  /* Form modal */
  .form-modal { max-width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  /* Auth modal */
  .modal-box { border-radius: 20px; padding: 28px 20px 24px; }
}

/* Mobile (small) */
@media (max-width: 560px) {
  .hero h1 { font-size: 36px; }
  .wrap { padding: 0 16px; }
  .feat-grid, .trust-grid, .foot-grid { grid-template-columns: 1fr; }
  .phone-stage { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 18px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  /* Dash */
  .dash-topbar-left { flex-direction: row; }
  .dash-panel { padding: 16px; }
  .panel-head h2 { font-size: 15px; }
  /* Calculator */
  .rm-calc-card { padding: 16px; }
  /* Footer */
  .foot-grid > div:nth-child(3), .foot-grid > div:nth-child(4) { display: none; }
  /* Auth modal full-width bottom sheet */
  .modal-overlay { align-items: flex-end; }
  .modal-box { border-radius: 24px 24px 0 0; max-width: 100%; width: 100%; }
}

/* Mobile (tiny — nav compaction) */
@media (max-width: 480px) {
  /* Compact nav for small phones — keep BOTH auth buttons visible */
  body > header nav { height: auto; padding: 10px 10px 10px 16px; border-radius: 20px; }
  .nav-right { gap: 8px; }
  .nav-right .login { display: none; }
  .btn.nav-btn { padding: 10px 16px; font-size: 13.5px; }
}

/* =============== NAV BUTTON RESET =============== */
/* Only clear native <button> chrome — do NOT override background so btn-primary stays purple */
.nav-btn { font-family: var(--body); cursor: pointer; }
button.nav-btn { border: none; }

/* =============== COMING SOON MODAL =============== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(11,16,32,.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--cream2); border: 1px solid var(--line);
  border-radius: 28px; padding: 44px 40px;
  max-width: 420px; width: calc(100% - 40px);
  text-align: center; position: relative;
  box-shadow: 0 24px 64px rgba(11,16,32,.18);
  transform: translateY(12px);
  transition: transform .2s;
}
.modal-overlay.open .modal-box { transform: translateY(0); }
.modal-close {
  position: absolute; top: 18px; right: 20px;
  background: none; border: none; cursor: pointer;
  font-size: 18px; color: var(--mut); line-height: 1;
  padding: 4px 8px; border-radius: 8px; transition: .15s;
}
.modal-close:hover { background: var(--cream); color: var(--navy); }
.modal-icon { font-size: 44px; margin-bottom: 16px; }
.modal-box h2 { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.modal-box p { font-size: 15.5px; color: var(--mut); margin-bottom: 24px; line-height: 1.6; }

/* =============== AUTH MODAL =============== */
.auth-modal-box { text-align: left; max-width: 440px; padding: 36px 36px 32px; }
.auth-tabs {
  display: flex; gap: 4px; background: var(--cream); border: 1px solid var(--line);
  border-radius: 12px; padding: 4px; margin-bottom: 28px;
}
.auth-tab {
  flex: 1; padding: 9px; border: none; border-radius: 9px;
  background: none; font-family: var(--body); font-size: 14px;
  font-weight: 600; color: var(--mut); cursor: pointer; transition: .15s;
}
.auth-tab.active { background: #fff; color: var(--navy); box-shadow: 0 1px 4px rgba(11,16,32,.1); }
.auth-title { font-size: 22px; font-weight: 800; margin-bottom: 22px; color: var(--navy); }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label {
  font-size: 12.5px; font-weight: 600; color: var(--navy);
  text-transform: uppercase; letter-spacing: .04em;
}
.auth-field input {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 11px 14px; font-size: 15px; font-family: var(--body);
  background: #fff; color: var(--navy); outline: none; transition: border-color .15s;
}
.auth-field input:focus { border-color: var(--purple); }
.auth-msg { font-size: 13.5px; border-radius: 10px; padding: 10px 14px; }
.auth-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-switch { font-size: 13.5px; color: var(--mut); text-align: center; margin-top: 4px; }
.auth-switch-btn {
  background: none; border: none; cursor: pointer; font-size: 13.5px;
  font-weight: 600; color: var(--purple); padding: 0; font-family: var(--body);
}
.auth-switch-btn:hover { text-decoration: underline; }

/* =============== CALCULATOR PAGE =============== */
.calc-page-hero { padding: 64px 0 48px; }
.calc-page-hero .eyebrow { margin-bottom: 0; }

/* How it works */
.how-it-works { background: var(--cream2); }
.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 52px; }
.how-step {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: 22px; padding: 28px 28px 28px 24px;
  position: relative;
}
.how-num {
  font-family: var(--disp); font-weight: 800; font-size: 13px;
  color: var(--purple); background: var(--purplebg);
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.how-step h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.how-step p { font-size: 15px; color: var(--mut); line-height: 1.65; }

.how-formula {
  margin-top: 36px; background: var(--purplebg);
  border: 1.5px solid rgba(99,102,241,.2);
  border-radius: 18px; padding: 24px 32px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.formula-label {
  font-size: 12px; font-weight: 700; color: var(--purple);
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.formula-text {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-family: var(--disp); font-size: 15px; font-weight: 600; color: var(--navy);
}
.f-var { color: var(--purple); }
.f-op { color: var(--mut); font-size: 18px; }
.f-frac { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.f-num { border-bottom: 2px solid var(--navy); padding-bottom: 3px; text-align: center; font-size: 13px; }
.f-den { text-align: center; font-size: 13px; color: var(--mut); }

/* FAQ */
.faq-section { background: var(--cream); }
.faq-list { margin-top: 52px; display: flex; flex-direction: column; gap: 0; }
.faq-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item h3 {
  font-size: 18px; font-weight: 700; color: var(--navy);
  margin-bottom: 10px; line-height: 1.3;
}
.faq-item p { font-size: 15.5px; color: var(--ink); line-height: 1.7; max-width: 72ch; }
.faq-item p strong { color: var(--navy); font-weight: 600; }
.faq-item p em { color: var(--purple); font-style: normal; }

@media (max-width: 720px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-formula { flex-direction: column; align-items: flex-start; gap: 12px; }
}

.scoring-legend {
  margin-top: 24px; background: var(--cream);
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
}
.legend-title {
  font-size: 12px; font-weight: 700; color: var(--mut);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px;
}
.legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.leg-label { font-size: 13px; color: var(--ink); }
.leg-val {
  font-size: 13px; font-weight: 700; font-family: var(--disp);
  min-width: 32px; text-align: right; color: var(--mut);
}
.leg-val.pos { color: var(--teal); }
.leg-val.neg { color: #EF4444; }
