@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Outfit:wght@200;300;400;500;600&display=swap");

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --app-nav-height: 60px;
  --cream:        #faf6f1;
  --white:        #ffffff;
  --ink:          #1c1118;
  --plum:         #3d1f35;
  --terra:        #c4622d;
  --terra-light:  #e8845a;
  --blush:        #f0cfc0;
  --sage:         #7a8c6e;
  --muted:        #8a7d85;
  --border:       #e8ddd6;
}

html { scroll-behavior: smooth; }

body {
  background: #f2f0ed;
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

.serif { font-family: 'Libre Baskerville', Georgia, serif; }

/* ── App nav ── */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--app-nav-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.app-nav-logo {
  font-family: 'Libre Baskerville', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--plum);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.app-nav-logo span {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--terra);
  border-radius: 50%;
  margin-left: 3px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

.app-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.app-nav-user {
  font-size: 13px;
  color: var(--muted);
}

.app-nav-signout {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  padding: 0;
}
.app-nav-signout:hover { color: var(--ink); }

.btn-new-proposal {
  background: var(--terra);
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
  font-family: 'Outfit', sans-serif;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.btn-new-proposal:hover {
  background: var(--terra-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196,98,45,0.3);
}

/* ── App shell ── */
.app-main {
  padding-top: var(--app-nav-height);
  min-height: 100vh;
}

.app-flash-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 40px 0;
}

.app-flash {
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 8px;
  line-height: 1.5;
}

.app-flash--notice { background: #edf3ed; border: 1px solid #c4d4b8; color: #4a6b42; }
.app-flash--alert  { background: #fdf0ed; border: 1px solid var(--blush); color: var(--terra); }

/* ── Dashboard ── */
.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 40px;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
}

.dashboard-greeting {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  color: var(--plum);
  line-height: 1.1;
}

.dashboard-greeting em {
  font-style: italic;
  font-weight: 400;
  color: var(--terra);
}

.dashboard-sub {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}

/* ── Proposal grid ── */
.proposal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.proposal-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.proposal-card:hover {
  box-shadow: 0 8px 32px rgba(61,31,53,0.08);
  transform: translateY(-2px);
}

.proposal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.proposal-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--plum);
  line-height: 1.2;
}

.proposal-recipient {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.status-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-badge--draft    { background: #f0ede8; color: var(--muted); }
.status-badge--sent     { background: var(--blush); color: var(--terra); }
.status-badge--viewed   { background: rgba(61,31,53,0.08); color: var(--plum); }
.status-badge--accepted { background: #e4ede0; color: #3a6b30; }
.status-badge--declined { background: #f5e8e8; color: #8b3030; }

.proposal-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.proposal-activity {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--cream, #faf8f5);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.activity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.activity-icon { font-size: 10px; }

.activity-completed {
  color: #3a6b30;
  font-weight: 500;
}

.activity-unopened { font-style: italic; }

.activity-awaiting { color: var(--terra); font-weight: 500; }

.activity-progress-bar {
  flex-shrink: 0;
  width: 80px;
  height: 5px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.activity-progress-fill {
  height: 100%;
  background: var(--terra);
  border-radius: 100px;
  min-width: 6px;
}

.activity-progress-label { color: var(--muted); }

.activity-quiz-attempts {
  color: var(--terra);
  gap: 6px;
}

.activity-response {
  color: var(--plum);
  font-style: italic;
  line-height: 1.4;
}

.proposal-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.btn-card-secondary {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.btn-card-secondary:hover { color: var(--plum); }

.btn-card-primary {
  font-size: 13px;
  color: var(--terra);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.btn-card-primary:hover { color: var(--terra-light); }

/* ── New proposal modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 26, 23, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(35,26,23,0.18);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 22px;
  font-style: italic;
  color: var(--plum);
  line-height: 1.3;
}

.modal-close {
  background: none;
  border: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }

.modal-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-input-row {
  display: flex;
  gap: 10px;
}

.modal-input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #f2f0ed;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-input:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(61,31,53,0.07);
  background: var(--white);
}
.modal-input::placeholder { color: var(--muted); opacity: 0.5; }

.modal-submit {
  padding: 10px 20px;
  background: var(--terra);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.modal-submit:hover { background: var(--terra-light); }

.btn-card-delete {
  font-size: 13px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  padding: 0;
  transition: color 0.2s;
  margin-left: auto;
}
.btn-card-delete:hover { color: #b94040; }

/* ── Onboarding (no proposals) ── */
.onboarding-cards {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 8px;
}

.onboarding-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}

.onboarding-icon { font-size: 40px; margin-bottom: 24px; }

.onboarding-heading {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--plum);
  line-height: 1.2;
  margin-bottom: 8px;
}

.onboarding-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.onboarding-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.onboarding-input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #f2f0ed;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.onboarding-input:focus {
  border-color: var(--plum);
  box-shadow: 0 0 0 3px rgba(61,31,53,0.08);
  background: var(--white);
}
.onboarding-input::placeholder { color: var(--muted); opacity: 0.6; }

.onboarding-submit {
  background: var(--terra);
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  transition: all 0.25s;
  white-space: nowrap;
}
.onboarding-submit:hover {
  background: var(--terra-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196,98,45,0.3);
}

/* Onboarding checklist card */
.onboarding-checklist-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

.checklist-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.checklist-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.checklist-step:last-child { border-bottom: none; }

.checklist-step-indicator {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--muted);
  transition: all 0.3s;
}

.checklist-step--done .checklist-step-indicator {
  background: var(--terra);
  border-color: var(--terra);
  color: white;
}

.checklist-step-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
}

.checklist-step--done .checklist-step-label {
  color: var(--ink);
  font-weight: 400;
}

/* ── Progress strip (has proposals, not complete) ── */
.progress-strip {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 32px;
}

.progress-strip-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.progress-strip-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.progress-strip-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.progress-strip-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  color: transparent;
  flex-shrink: 0;
}

.progress-strip-step--done .progress-strip-dot {
  background: var(--terra);
  border-color: var(--terra);
  color: white;
}
.progress-strip-step--done .progress-strip-step-label { color: var(--ink); font-weight: 400; }

.progress-strip-connector {
  height: 1px; width: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Empty state ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px;
}

.empty-state-icon { font-size: 52px; margin-bottom: 24px; opacity: 0.6; }

.empty-state-heading {
  font-family: 'Libre Baskerville', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--plum);
  margin-bottom: 12px;
}

.empty-state-body {
  font-size: 15px;
  color: var(--muted);
  max-width: 360px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.btn-terra-lg {
  background: var(--terra);
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.25s;
  font-family: 'Outfit', sans-serif;
}
.btn-terra-lg:hover {
  background: var(--terra-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196,98,45,0.3);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .app-nav { padding: 0 20px; }
  .app-nav-user { display: none; }
  .app-flash-bar { padding: 12px 20px 0; }
  .dashboard { padding: 40px 20px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .proposal-grid { grid-template-columns: 1fr; }

  .onboarding-cards { grid-template-columns: 1fr; }
  .onboarding-card { padding: 28px 24px; }
  .onboarding-input-row { flex-direction: column; }
  .onboarding-submit { border-radius: 10px; }

  .progress-strip { flex-direction: column; align-items: flex-start; gap: 16px; }
  .progress-strip-steps { flex-wrap: wrap; }
}
