@import url("https://fonts.googleapis.com/css2?family=Bodoni+Moda:opsz,wght@6..96,600;6..96,700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --ivory: #FFF9F4;
  --black: #171717;
  --pink: #D94B87;
  --pink-pale: #F8DFEA;
  --teal: #175E63;
  --teal-pale: #E6F0F0;
  --white: #FFFFFF;
  --muted: #5B5B5B;
  --line: #E8DED6;
  --danger: #A12C2C;
  --radius: 14px;
  --serif: "Bodoni Moda", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ivory);
  color: var(--black);
  font: 16px/26px var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: 34px; line-height: 39px; }
h2 { font-size: 26px; line-height: 32px; }
h3 { font-size: 20px; line-height: 26px; }
a { color: var(--teal); }
p { margin: 0 0 12px; }
.muted { color: var(--muted); font-size: 14px; line-height: 22px; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal);
}

/* Layout: teal sidebar, as in the Stage 1 prototype */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
nav.side {
  background: var(--teal); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 2px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
nav.side::after {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.06); left: -120px; bottom: -110px; pointer-events: none;
}
.brandlink { display: block; margin: 0 0 18px; border-radius: 6px; }
.logo-full { display: block; width: 210px; height: auto; }
.logo-icon { display: none; width: 38px; height: 38px; border-radius: 9px; }
.navgroup { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.navgroup + .navgroup { margin-top: 16px; }
.navh {
  display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 800; color: #F9B8D3; padding: 3px 14px 5px;
}
.navh::after { content: ""; flex: 1; min-width: 14px; height: 2px; border-radius: 2px; background: var(--pink); opacity: .85; }
.navbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: #fff; text-decoration: none;
}
.navbtn:hover { background: rgba(255,255,255,.12); }
.navbtn[aria-current="page"] { background: var(--ivory); color: var(--black); }
.navbtn.soon { color: rgba(255,255,255,.72); }
.navbtn.soon[aria-current="page"] { color: var(--black); }
.navbtn .nbadge { background: var(--pink); color: var(--black); border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; font-weight: 700; }
.navbtn .nsoon { font-size: 11px; font-weight: 700; opacity: .7; }
.navlast { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.18); }
.navmenu { display: none; }
nav.side a:focus-visible, nav.side button:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.side-foot { margin-top: auto; padding: 16px 8px 0; font-size: 13px; line-height: 20px; color: rgba(255,255,255,.8); position: relative; z-index: 1; overflow-wrap: anywhere; }
main { position: relative; overflow: hidden; }
.deco { position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; }
.deco.pink { width: 420px; height: 420px; right: -190px; top: -230px; background: var(--pink-pale); }
.deco.teal { width: 380px; height: 380px; left: -230px; bottom: -230px; background: var(--teal-pale); }
main > *:not(.deco) { position: relative; z-index: 1; }
.page-head { padding-bottom: 18px; margin-bottom: 22px; border-bottom: 1px solid var(--teal); }
.page-head .sub { color: var(--muted); margin: 6px 0 0; }
.soon-list { margin: 8px 0 0; padding-left: 20px; }
.soon-list li { margin-bottom: 6px; }
.copyrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.copyrow code { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; overflow-wrap: anywhere; }
.steps-ol { padding-left: 20px; margin: 6px 0 0; }
.steps-ol li { margin-bottom: 8px; }
main { padding: 36px clamp(16px, 3vw, 44px) 80px; min-width: 0; }
main > .wrap { max-width: 1040px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 24px; }

/* Cards */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.card.pale-pink { background: var(--pink-pale); border-color: transparent; }
.card.pale-teal { background: var(--teal-pale); border-color: transparent; }
.stat-num { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.1; }
.list { display: grid; gap: 10px; }
.item {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  text-decoration: none; color: inherit;
}
a.item:hover { border-color: var(--pink); }
.item-title { font-weight: 700; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }

/* Badges */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--teal-pale); color: var(--teal); white-space: nowrap;
}
.badge.new, .badge.todo { background: var(--pink-pale); color: #8E2457; }
.badge.won, .badge.active, .badge.done { background: var(--teal); color: var(--white); }
.badge.lost, .badge.cancelled { background: #EEE; color: var(--muted); }
.badge.overdue { background: #F6D8D8; color: var(--danger); }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--black);
  background: var(--white); border: 1px solid #D9CFC6; border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 15px/20px var(--sans); border: 0; border-radius: 999px; padding: 11px 20px;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--pink); color: var(--black); }
.btn-secondary { background: var(--black); color: var(--white); }
.btn-ghost { background: transparent; color: var(--black); border: 1px solid #D9CFC6; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #E7B9B9; }
button[disabled] { opacity: 0.55; cursor: default; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  background: var(--black); color: var(--white); padding: 10px 18px; border-radius: 999px;
  font-weight: 600; font-size: 14px; z-index: 50;
}
.error { color: var(--danger); font-weight: 600; }
.divider { height: 1px; background: var(--teal); opacity: 0.4; margin: 24px 0; border: 0; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--muted); font-size: 14px; }
dl.facts dd { margin: 0; word-break: break-word; }

/* Sign-in */
.signin-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin { width: 100%; max-width: 400px; }
.signin .brand { justify-content: center; margin-bottom: 20px; }
.signin .brand-word { font-size: 40px; }
.signin .brand-pin { width: 42px; height: 50px; }

@media (max-width: 760px) {
  h1 { font-size: 30px; line-height: 36px; }
  .app { grid-template-columns: 1fr; }
  nav.side { flex-direction: row; flex-wrap: wrap; align-items: center; height: auto; padding: 10px 12px; z-index: 20; }
  nav.side::after, .side-foot { display: none; }
  .brandlink { margin: 0; }
  .logo-full { display: none; }
  .logo-icon { display: block; }
  .navmenu {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto; cursor: pointer;
    background: rgba(255,255,255,.14); color: #fff; font: 700 15px/20px var(--sans); border: 0; border-radius: 999px; padding: 8px 14px;
  }
  .navgroups { display: none; flex-basis: 100%; }
  .navgroups.open { display: flex; flex-direction: column; padding: 4px 0 10px; }
  .navgroup + .navgroup { margin-top: 10px; }
  .navbtn { padding: 9px 14px; }
  .deco.pink { width: 260px; height: 260px; right: -150px; top: -150px; }
}
@media (max-width: 640px) {
  .item { flex-wrap: wrap; }
}
