/* Sorellahood Platform — brand-consistent with sorellahood.com */
:root {
  --sage: #577f60;
  --sage-dark: #3f5f47;
  --blush: #e6b4ab;
  --blush-light: #f6e3df;
  --cream: #f8f4ef;
  --ink: #26231f;
  --paper: #faf7f4;
  --line: #e8e2db;
  --ok: #2e7d4f;
  --err: #b34747;
  --radius: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; margin: 0 0 .5rem; }
a { color: var(--sage); }
button { font: inherit; cursor: pointer; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Top nav ---------- */
.topnav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.topnav__inner { display: flex; align-items: center; gap: 1.5rem; padding: .75rem 1.25rem; max-width: 1100px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sage); color: var(--blush);
  display: grid; place-items: center; font-size: 1.1rem;
}
.topnav nav { display: flex; gap: .25rem; flex: 1; }
.topnav nav a {
  padding: .45rem .8rem; border-radius: 8px; text-decoration: none;
  color: var(--ink); font-weight: 500; font-size: .92rem;
}
.topnav nav a.active { background: var(--blush-light); color: var(--sage-dark); }
.topnav nav a:hover { background: var(--blush-light); }
.topnav .user { font-size: .85rem; color: #777; }
.user--link { text-decoration: none; font-weight: 600; color: var(--sage-dark); }
.user--link:hover { text-decoration: underline; }
.topnav .signout { background: none; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .7rem; font-size: .85rem; }
.topnav .signout:hover { border-color: var(--sage); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: none; border-radius: 8px;
  padding: .55rem 1.1rem; font-weight: 600; font-size: .92rem;
  text-decoration: none; transition: filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn--primary { background: var(--sage); color: #fff; }
.btn--ghost { background: transparent; border: 1.5px solid var(--sage); color: var(--sage); }
.btn--sm { padding: .3rem .65rem; font-size: .82rem; }
.btn--danger { background: var(--err); color: #fff; }

/* ---------- Cards & grids ---------- */
.page { padding: 2rem 0 4rem; }
.page__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 2rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem;
}
.card .num { font-family: 'Fraunces', serif; font-size: 2rem; color: var(--sage); font-weight: 600; }
.card .lbl { font-size: .85rem; color: #777; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.5rem;
}

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #888; padding: .5rem .6rem; border-bottom: 2px solid var(--line); }
td { padding: .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:hover td { background: #fdfcfb; }

.badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
}
.badge--lead { background: #eef1ee; color: #556; }
.badge--contacted { background: #e8f0f7; color: #27618f; }
.badge--demo_scheduled { background: #f5eede; color: #8a6d1d; }
.badge--proposal_sent { background: #f3e8f7; color: #7c3a8f; }
.badge--pilot { background: var(--blush-light); color: var(--sage-dark); }
.badge--partner { background: #e2f2e7; color: var(--ok); }
.badge--alumni { background: #eee; color: #777; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
input, select, textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: -1px; border-color: var(--sage); }
label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .25rem; color: #666; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 420px; margin: 8vh auto; text-align: center; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2.5rem 2rem; }
.auth-card .brand { justify-content: center; margin-bottom: 1rem; }
.auth-card form { display: grid; gap: .8rem; margin-top: 1.25rem; }
.crisis-note {
  margin-top: 2rem; font-size: .82rem; color: #888;
  border-top: 1px solid var(--line); padding-top: 1rem;
}

/* ---------- Toast / status ---------- */
.status { font-size: .88rem; margin-top: .5rem; }
.status--ok { color: var(--ok); }
.status--err { color: var(--err); }

/* ---------- Modal-ish detail ---------- */
.detail-drawer {
  position: fixed; inset: 0; background: rgba(38,35,31,.4);
  display: grid; place-items: end center; z-index: 50;
}
.detail-drawer__card {
  background: #fff; width: min(680px, 100%); max-height: 88vh; overflow: auto;
  border-radius: 16px 16px 0 0; padding: 1.75rem;
}
.detail-drawer__head { display: flex; justify-content: space-between; align-items: start; }
.close-x { background: none; border: none; font-size: 1.4rem; color: #999; }
.touch { border-left: 3px solid var(--blush); padding: .4rem .9rem; margin: .7rem 0; }
.touch .meta { font-size: .78rem; color: #999; }

/* ---------- Dashboard hook card ---------- */
.hook-card {
  background: var(--blush-light);
  border: 1.5px solid var(--blush);
}
.hook-card__eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage-dark); margin-bottom: .5rem;
}
.hook-card__text {
  font-family: 'Fraunces', serif; font-size: 1.25rem; line-height: 1.4;
  color: var(--ink); margin-bottom: .6rem;
}
.hook-card__meta { font-size: .85rem; color: #777; }

/* ---------- Admin calendar grid ---------- */
.cal-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.cal-item {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem;
}
.cal-item.is-now { border-color: var(--sage); box-shadow: 0 8px 26px rgba(35,31,32,.08); }
.cal-item__when {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sage); margin-bottom: .4rem;
}
.cal-item.is-now .cal-item__when { color: var(--sage-dark); }
.cal-item h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.cal-item__desc { font-size: .85rem; color: #777; margin: .6rem 0 .8rem; }
.badge--pillar { background: var(--blush-light); color: var(--sage-dark); }
.cal-item__chapters { display: flex; flex-wrap: wrap; gap: .4rem; }
.cal-chip {
  font-size: .75rem; font-weight: 600;
  background: #eef1ee; color: var(--sage-dark);
  padding: .2rem .6rem; border-radius: 999px;
}
.cal-chip--empty { background: none; color: #aaa; font-weight: 500; font-style: italic; }

/* ---------- Portal toolkit tabs ---------- */
.tk-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.25rem; }
.tk-tab {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: .45rem 1rem; font-size: .88rem; font-weight: 600; color: var(--ink);
  transition: all .15s;
}
.tk-tab:hover { border-color: var(--sage); }
.tk-tab.active { background: var(--sage); border-color: var(--sage); color: #fff; }
.tk-pane { display: none; }
.tk-pane.active { display: block; }
.tk-section { margin-bottom: 1.75rem; }
.tk-section h3 { margin-bottom: .75rem; }
.tk-point {
  display: grid; grid-template-columns: 150px 1fr; gap: .75rem;
  padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem;
}
.tk-point strong { color: var(--sage-dark); }
.tk-point span { color: #555; }
.tk-footer {
  margin-top: .8rem; font-size: .85rem; color: var(--sage-dark);
  background: var(--blush-light); border-radius: 8px; padding: .7rem .9rem;
}
@media (max-width: 560px) {
  .tk-point { grid-template-columns: 1fr; gap: .15rem; }
}

/* ---------- Invite codes ---------- */
.invite-code {
  background: #eef1ee; border-radius: 6px; padding: .2rem .5rem;
  font-size: .82rem; font-weight: 600; color: var(--sage-dark);
}

/* ---------- Surveys ---------- */
.q-editor {
  position: relative; border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; margin-bottom: .8rem; background: #fdfcfb;
}
.q-editor .q-del { position: absolute; top: .6rem; right: .6rem; }
.survey-q { margin: 1.25rem 0; }
.survey-q__prompt { font-weight: 600; margin-bottom: .6rem; }
.scale-row { display: flex; gap: .5rem; justify-content: space-between; }
.scale-opt { flex: 1; }
.scale-opt input { position: absolute; opacity: 0; }
.scale-opt span {
  display: grid; place-items: center; height: 44px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-weight: 600; cursor: pointer; transition: all .12s;
}
.scale-opt input:checked + span { background: var(--sage); border-color: var(--sage); color: #fff; }
.scale-opt span:hover { border-color: var(--sage); }
.scale-ends { display: flex; justify-content: space-between; font-size: .75rem; color: #999; margin-top: .3rem; }
.choice-opt {
  display: block; padding: .55rem .8rem; border: 1.5px solid var(--line);
  border-radius: 10px; margin-bottom: .4rem; cursor: pointer; font-size: .92rem;
}
.choice-opt:has(input:checked) { border-color: var(--sage); background: var(--blush-light); }
.result-bar {
  height: 10px; background: #eef1ee; border-radius: 999px; overflow: hidden; margin: .3rem 0;
}
.result-bar__fill { height: 100%; background: var(--sage); border-radius: 999px; }

/* ---------- Row links + preview banner ---------- */
.row-link { cursor: pointer; }
.row-link:hover td { background: #f7f5f2; }
.preview-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: var(--sage-dark); color: var(--cream);
  border-radius: var(--radius); padding: .9rem 1.25rem; margin-bottom: 1.5rem;
  font-size: .92rem;
}
.preview-banner .btn--ghost { border-color: rgba(255,255,255,.4); color: #fff; }
.check-row { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.check-row label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 500; }
.check-row input { width: auto; }

/* ---------- Email outreach + follow-ups ---------- */
.email-list {
  max-height: 260px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: 10px; padding: .5rem;
}
.email-recip {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .5rem .6rem; border-radius: 8px; cursor: pointer; font-size: .88rem;
}
.email-recip:hover { background: #f7f5f2; }
.email-recip.selected { background: var(--blush-light); }
.email-recip input { width: auto; margin-top: .2rem; }
.email-recip .meta { color: #999; font-size: .78rem; }
.overdue { color: #b4453c; font-weight: 700; }

/* ---------- Partner Portal (public) ---------- */
.partner-page { max-width: 1000px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.partner-hero { text-align: center; padding: 2.5rem 1rem 2rem; }
.partner-hero .brand { justify-content: center; font-size: 1.4rem; }
.partner-hero__eyebrow {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage); font-weight: 700; margin: .5rem 0 1rem;
}
.partner-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .8rem; }
.partner-hero__sub { max-width: 640px; margin: 0 auto; color: #666; line-height: 1.6; }
.partner-hero__chapter { margin-top: 1rem; color: var(--sage-dark); }
.partner-section { margin: 2.5rem 0; text-align: center; }
.partner-section h2 { margin-bottom: 1.25rem; }
.partner-video {
  max-width: 560px; margin: 0 auto 1rem; aspect-ratio: 16/9;
  background: var(--sage-dark); color: var(--cream); border-radius: var(--radius);
  display: grid; place-items: center; text-align: center; padding: 1.5rem;
}
.partner-video span { font-size: 2.5rem; display: block; }
.partner-video p { font-size: .92rem; line-height: 1.5; }
.partner-packages { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: left; }
.partner-pkg {
  position: relative; background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column;
}
.partner-pkg.featured { border-color: var(--sage); box-shadow: 0 10px 30px rgba(35,31,32,.1); }
.partner-pkg__flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--sage); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .25rem .8rem; border-radius: 999px; white-space: nowrap;
}
.partner-pkg h3 { margin-bottom: .2rem; }
.partner-pkg__tag { font-size: .8rem; color: var(--sage); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.partner-pkg__best { font-size: .85rem; color: #777; margin: .5rem 0; }
.partner-pkg ul { margin: .5rem 0 1rem; padding-left: 1.1rem; font-size: .88rem; color: #555; flex: 1; }
.partner-pkg li { margin-bottom: .35rem; }
.partner-pkg__price { font-family: 'Fraunces', serif; font-size: 1.5rem; margin-bottom: 1rem; }
.partner-pkg__price span { font-size: .8rem; color: #999; font-family: 'Inter', sans-serif; }

/* Deck viewer */
.deck-overlay {
  position: fixed; inset: 0; background: rgba(35,31,32,.82); z-index: 60;
  display: grid; place-items: center; padding: 1rem;
  backdrop-filter: blur(3px);
}
.deck-card {
  position: relative; background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  max-width: 680px; width: 100%; padding: 3rem 2.5rem 1.5rem; text-align: center;
}
.deck-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--sage), var(--blush));
  border-radius: var(--radius) var(--radius) 0 0;
}
.deck-card .close-x { position: absolute; top: .75rem; right: 1rem; }
.deck-kicker {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage); font-weight: 700; margin-bottom: .75rem;
}
.deck-slide { min-height: 220px; display: flex; flex-direction: column; justify-content: center; }
.deck-slide h2 { font-size: 1.9rem; margin-bottom: 1rem; color: var(--ink); }
.deck-slide p { color: #555; line-height: 1.65; max-width: 480px; margin: 0 auto; }
.deck-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line);
}
.deck-nav span { font-size: .82rem; color: #999; font-weight: 600; }
.partner-footer { text-align: center; color: #999; font-size: .85rem; margin-top: 3rem; }

.empty { color: #999; font-style: italic; padding: 1rem 0; }
@media (max-width: 640px) {
  .topnav__inner { flex-wrap: wrap; }
  th:nth-child(4), td:nth-child(4) { display: none; }
}

/* ---------- Password visibility toggle ---------- */
.pw-field { position: relative; }
.pw-field input { padding-right: 4.4rem; }
.pw-toggle {
  position: absolute; top: 50%; right: .3rem; transform: translateY(-50%);
  background: none; border: 0; margin: 0; padding: .3rem .5rem; border-radius: 6px;
  font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--sage); line-height: 1.4;
}
.pw-toggle:hover { background: var(--blush-light); }
.pw-toggle:focus-visible { outline: 2px solid var(--sage); outline-offset: 1px; }
