/* PartyPlan AI — "The event studio": editorial invitation character.
   Accent: champagne gold on ink. Serif display for the event masthead. */
:root {
  --paper: #faf8f3;
  --card: #ffffff;
  --ink: #1c1712;
  --ink-soft: #7d7264;
  --line: #e9e1d2;
  --gold: #a87c2f;
  --gold-deep: #85601f;
  --gold-soft: #f7efdc;
  --good: #4a7c2f;
  --bad: #b23a3a;
  --radius: 0;
  --shadow: 0 1px 2px rgba(28, 23, 18, .05), 0 10px 26px -14px rgba(28, 23, 18, .22);
  --serif: Georgia, "Times New Roman", "Playfair Display", serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--ink);
  background:
    radial-gradient(900px 380px at 88% -80px, #f1e7d2 0%, transparent 60%),
    var(--paper);
  line-height: 1.55; font-size: 16px;
}
h1, h2 { letter-spacing: -.02em; margin: 0 0 .5em; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 .75em; }
.small { font-size: .85rem; }
.muted { color: var(--ink-soft); }
code { font-size: .85em; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 1.25rem; }
.foot { text-align: center; color: var(--ink-soft); font-size: .82rem; padding: 1.6rem 0 2rem; }

/* ---------- masthead ---------- */
.masthead {
  background: #1c1712; color: #f5efe3;
  padding: 1.4rem 0 1.2rem; margin-bottom: 1.4rem;
  border-bottom: 3px solid var(--gold);
}
.masthead-inner { display: flex; align-items: center; gap: 1rem; }
.brandmark {
  width: 46px; height: 46px; border-radius: 0; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--gold); color: #1c1712;
  box-shadow: 0 6px 16px -6px rgba(168, 124, 47, .8);
}
.brand { font-family: var(--serif); font-size: 1.7rem; margin: 0; font-weight: 700; letter-spacing: .01em; }
.brand span {
  font-family: var(--sans); font-size: .62rem; font-weight: 700; vertical-align: .4em; letter-spacing: .1em;
  background: rgba(168, 124, 47, .22); color: #e8c87e;
  padding: .2em .55em; border-radius: 0; border: 1px solid rgba(168, 124, 47, .5);
}
.tag { margin: .15rem 0 0; font-size: .86rem; color: #b8a98e; max-width: 640px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 0; box-shadow: var(--shadow);
  padding: 1.25rem 1.35rem; margin-bottom: 1.1rem;
}
.event-card { border-top: 4px solid var(--gold); }
.field { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.event-picker { margin-bottom: .9rem; display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.event-picker .field { max-width: 420px; flex: 1 1 260px; }
.event-picker .btn { margin-left: auto; }

/* ---------- event masthead summary ---------- */
.summary { padding: .4rem 0 .8rem; }
.ev-mast { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.ev-name { font-family: var(--serif); font-size: 1.9rem; margin: 0; line-height: 1.15; }
.ev-type { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .2rem; }
.countdown { display: flex; align-items: baseline; gap: .5rem; margin-left: auto; }
.countdown .num {
  font-family: var(--serif); font-size: 2.6rem; font-weight: 700; color: var(--gold-deep);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.countdown .lbl { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.nudge {
  background: var(--gold-soft); border: 1px solid #e6d3a8; border-left: 5px solid var(--gold);
  border-radius: 0; padding: .8rem 1rem; margin: .8rem 0; font-size: .93rem;
}
.nudge.warn { background: #fdf3ec; border-color: #f0cdb8; border-left-color: #c2410c; }
.nudge .tip { margin-top: .35rem; }
.tip { font-size: .83rem; color: var(--ink-soft); }
.over-flag {
  font-size: .78rem; font-weight: 700; color: #9a3412;
  background: #fdf3ec; border: 1px solid #f0cdb8; border-radius: 0;
  padding: .3rem .6rem; margin-top: .4rem; display: inline-block;
}
.sched-time { font-variant-numeric: tabular-nums; min-width: 64px; flex: 0 0 auto !important; }
.grow-item .sched-title { flex: 1 1 200px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .3rem; overflow-x: auto; margin-bottom: 1rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
nav.tabs .tab {
  background: transparent; border: 1px solid transparent; color: var(--ink-soft);
  font-weight: 700; font-size: .93rem; padding: .55rem 1.15rem; border-radius: 0;
  white-space: nowrap; cursor: pointer; transition: all .15s; box-shadow: none; transform: none;
}
nav.tabs .tab:hover { color: var(--ink); background: #f3ecdd; transform: none; }
nav.tabs .tab.active { background: var(--ink); color: #f7f2e7; }
.panel { display: none; }
.panel.active { display: block; animation: fadeSlide .25s ease both; }

/* ---------- timeline ---------- */
#timelineList { position: relative; margin-top: 1rem; padding-left: 1.6rem; }
#timelineList::before {
  content: ""; position: absolute; left: .55rem; top: .6rem; bottom: .6rem; width: 2px;
  background: repeating-linear-gradient(var(--line) 0 6px, transparent 6px 12px);
}
.task { position: relative; display: flex; gap: .8rem; align-items: flex-start; padding: .7rem .8rem; border-radius: 0; transition: background .12s; }
.task:hover { background: #fbf7ec; }
.task::before {
  content: ""; position: absolute; left: -1.32rem; top: 1.15rem;
  width: 12px; height: 12px; border-radius: 50%; background: var(--card);
  border: 3px solid var(--line);
}
.task.overdue::before { border-color: var(--bad); background: var(--bad); }
.task.today::before { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.task.upcoming::before { border-color: var(--line); }
.task.done::before { border-color: var(--good); background: var(--good); }
.task.done .task-title { color: var(--ink-soft); text-decoration: line-through; }
.task-body { flex: 1; }
.task-title { font-weight: 650; font-size: .97rem; }
.task-meta { font-size: .8rem; color: var(--ink-soft); margin-top: .15rem; font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 0; background: #f0e8d6; color: var(--ink-soft);
}
.task.overdue .pill { background: #f9e2e2; color: var(--bad); }
.task.today .pill { background: var(--gold-soft); color: var(--gold-deep); }
.task.done .pill { background: #e3efdb; color: var(--good); }

/* ---------- stats / budget ---------- */
.statcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .8rem; margin: 1rem 0; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  box-shadow: var(--shadow); padding: .85rem 1rem; text-align: left;
}
.stat-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-lab { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); margin-top: .15rem; }
.bar { height: 10px; border-radius: 0; background: #f0e7d2; overflow: hidden; margin: .4rem 0 1rem; }
.bar-fill { height: 100%; border-radius: 0; background: var(--gold); transition: width .5s ease; }
.brow {
  display: grid; grid-template-columns: 1fr 130px 130px; gap: .7rem; align-items: center;
  padding: .65rem 0; border-bottom: 1px dashed var(--line);
}
.brow:last-of-type { border-bottom: none; }
.brow-label { font-weight: 650; font-size: .95rem; }

/* ---------- guests / vendors ---------- */
.grow { display: grid; gap: .7rem; margin-top: 1rem; }
.grow-item {
  display: flex; align-items: center; gap: .9rem; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 0;
  box-shadow: var(--shadow); padding: .8rem 1rem;
}
.grow-item > div:first-child { flex: 1 1 200px; }
.rsvp {
  font-weight: 700; font-size: .85rem; border-radius: 0; padding: .45rem .9rem; width: auto;
  border: 1.5px solid var(--line); cursor: pointer;
}
.rsvp-yes { background: #e3efdb; border-color: #c4d9b2; color: #3a6324; }
.rsvp-maybe { background: var(--gold-soft); border-color: #e6d3a8; color: var(--gold-deep); }
.rsvp-invited { background: #f4f0e6; color: var(--ink-soft); }
.rsvp-no { background: #f9e2e2; border-color: #eec3c3; color: var(--bad); }
.vstatus {
  font-weight: 700; font-size: .85rem; border-radius: 0; padding: .45rem .9rem; width: auto;
  border: 1.5px solid var(--line); background: #f4f0e6; color: var(--ink); cursor: pointer;
}
.vstatus-booked { background: #e3efdb; border-color: #c4d9b2; color: #3a6324; }
.vstatus-contacted { background: var(--gold-soft); border-color: #e6d3a8; color: var(--gold-deep); }

/* ---------- forms / buttons ---------- */
.form.inline { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.form.inline input, .form.inline select { flex: 1 1 150px; width: auto; }
.new-event { border-top: 1px dashed var(--line); padding-top: 1rem; }
.btn, button {
  font: inherit; font-weight: 650; cursor: pointer; border-radius: 0;
  border: 1px solid transparent; padding: .55rem 1.05rem;
  transition: transform .12s, box-shadow .15s, background .15s;
}
button.btn:not(.danger), .btn:not(.danger) {
  background: var(--gold); color: #1c1712;
  box-shadow: 0 6px 14px -8px rgba(168, 124, 47, .9);
}
button.btn:not(.danger):hover, .btn:not(.danger):hover { background: var(--gold-deep); color: #fff; transform: translateY(-1px); }
.btn.danger, button.danger { background: transparent; border-color: #eccaca; color: var(--bad); box-shadow: none; }
.btn.danger:hover, button.danger:hover { background: #f9e2e2; transform: none; }
.btn.small, button.small { font-size: .85rem; padding: .45rem .85rem; }
input, select, textarea {
  font: inherit; color: var(--ink); width: 100%;
  border: 1.5px solid var(--line); border-radius: 0;
  padding: .55rem .7rem; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, button:focus-visible {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 124, 47, .18);
}
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--gold); flex: 0 0 auto; margin-top: .15rem; cursor: pointer; }
label.check { display: flex; align-items: center; gap: .45rem; font-weight: 650; font-size: .9rem; white-space: nowrap; }
label.check input { width: 20px; }

/* ---------- animations ---------- */
@keyframes fadeSlide { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.grow-item { animation: rise .3s ease both; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .tag { display: none; }
  .ev-name { font-size: 1.5rem; }
  .countdown { margin-left: 0; }
  .brow { grid-template-columns: 1fr 1fr; }
  .brow-label { grid-column: 1 / -1; }
  .form.inline input, .form.inline select, .form.inline button { flex: 1 1 100%; }
}

/* ---------- second sweep: panels, invite preview ---------- */
.panel { margin-top: 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line, #e2e2e2); background: var(--card, #fff); }
.panel h3 { margin: 0 0 .7rem; font-size: 1.05rem; }
.invite-preview { white-space: pre-wrap; font-family: inherit; font-size: .95rem; background: var(--wash, #f7f5f1); border: 1px dashed var(--line, #e2e2e2); padding: .8rem .9rem; margin: .7rem 0 0; }
select.diet { font-size: .85rem; }

/* ---------- seating chart ---------- */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; margin: 1rem 0; }
.tcard {
  background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: 0; box-shadow: var(--shadow); padding: 1rem 1.1rem;
}
.tcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; }
.tcard-head h3 { margin: 0; font-family: var(--serif); font-size: 1.1rem; }
.tcard-head p { margin: .15rem 0 0; }
.tbar { height: 8px; background: #f0e7d2; border-radius: 0; overflow: hidden; margin: .6rem 0; }
.tbar i { display: block; height: 100%; background: var(--gold); }
.tguests { display: flex; flex-wrap: wrap; gap: .45rem; }
.tguest {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .82rem; font-weight: 650; background: var(--gold-soft);
  border: 1px solid #e6d3a8; color: var(--gold-deep); border-radius: 0;
  padding: .3rem .55rem;
}
.tguest button {
  background: none; border: none; padding: 0 .1rem; font-size: .85rem; line-height: 1;
  color: var(--gold-deep); cursor: pointer; box-shadow: none; transform: none;
}
.tguest button:hover { color: var(--bad); transform: none; }
.tassign { max-width: 220px; }
select.meal { font-size: .85rem; }

/* ---------- party page briefing ---------- */
.brief-hero{display:flex;gap:1.4rem;align-items:center;background:var(--ink);color:#f7f1e6;padding:1.6rem 1.8rem;margin-bottom:1.1rem}
.brief-count{text-align:center;flex:0 0 auto}
.brief-count .num{display:block;font-family:var(--serif);font-size:3.2rem;font-weight:700;color:var(--gold);line-height:1;font-variant-numeric:tabular-nums}
.brief-count .lbl{display:block;font-size:.68rem;text-transform:uppercase;letter-spacing:.16em;color:#cbbfae;margin-top:.3rem}
.brief-name{font-family:var(--serif);font-size:2rem;margin:.1rem 0 .3rem;color:#fff}
.brief-meta{color:#cbbfae;font-size:.95rem}
.brief-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.9rem}
@media(max-width:900px){.brief-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.brief-grid{grid-template-columns:1fr}}
.brief-grid .card h3{margin:0 0 .3rem;font-size:.78rem;text-transform:uppercase;letter-spacing:.12em;color:var(--ink-soft)}
.big-num{font-size:2.2rem;font-weight:800;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
.brief-grid .bar{height:8px;background:#eee4d2;margin-top:.6rem}
.brief-grid .bar-fill{height:100%;background:var(--gold)}
.rsvp-bar{display:flex;align-items:center;gap:.6rem;font-size:.8rem;margin-top:.35rem}
.rsvp-bar span{flex:0 0 76px;text-transform:capitalize}
.rsvp-bar i{display:block;height:8px}
@media print{
  body.printing-brief .event-card,body.printing-brief .tabs,body.printing-brief footer,
  body.printing-brief .row,body.printing-brief button{display:none!important}
  body.printing-brief .brief-hero{background:#fff!important;color:#000;border:2px solid #000}
  body.printing-brief .brief-name{color:#000}
  body.printing-brief .brief-meta,body.printing-brief .brief-count .lbl{color:#333}
}

/* ================= v2 redesign: elevated "event studio" polish ================= */

/* ---------- masthead: editorial double rule ---------- */
.masthead { border-bottom: 3px solid var(--gold); position: relative; }
.masthead::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 1px;
  background: rgba(168, 124, 47, .4);
}
.brand { letter-spacing: .015em; }
.brand span { letter-spacing: .14em; }
.tag { letter-spacing: .01em; }

/* ---------- party-page hero: layered program-cover composition ---------- */
.brief-hero {
  position: relative; overflow: hidden;
  border-left: 6px solid var(--gold);
  box-shadow: var(--shadow);
}
.brief-hero::before {
  content: ""; position: absolute; right: -70px; top: -90px; width: 180px; height: 180px;
  border: 1px solid rgba(168, 124, 47, .28); transform: rotate(18deg);
}
.brief-hero::after {
  content: ""; position: absolute; right: -45px; top: -60px; width: 120px; height: 120px;
  border: 1px solid rgba(168, 124, 47, .16); transform: rotate(18deg);
}
.brief-count .num { font-size: 3.6rem; letter-spacing: -.02em; }
.brief-count { position: relative; z-index: 1; }
.brief-hero > div:last-child { position: relative; z-index: 1; }

/* ---------- section kickers ---------- */
.kick {
  font-size: .68rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep); margin: 0 0 .25rem;
}

/* ---------- tabs: editorial underline voice ---------- */
nav.tabs { border-bottom: 1px solid var(--line); padding-bottom: 0; }
nav.tabs .tab { padding: .6rem 1.15rem .7rem; border-bottom: 3px solid transparent; margin-bottom: -1px; }
nav.tabs .tab:hover { color: var(--ink); background: #f3ecdd; }
nav.tabs .tab.active { background: transparent; color: var(--ink); border-bottom-color: var(--gold); box-shadow: inset 0 -1px 0 var(--gold); }
nav.tabs .tab.active:hover { background: #f3ecdd; }

/* ---------- custom-task composer ---------- */
.task-add {
  background: #fbf7ec; border: 1px dashed #d9c69a; border-radius: 0;
  padding: .8rem .9rem; margin: 1rem 0 .4rem;
}
.pill.own { background: var(--gold-soft); color: var(--gold-deep); margin-left: .4rem; }
.task .btn.danger.small { flex: 0 0 auto; align-self: center; }

/* ---------- brief cards: layered hierarchy ---------- */
.brief-grid .card { border-top: 3px solid var(--gold); }
.brief-grid .card h3 { border-bottom: 1px solid var(--line); padding-bottom: .35rem; }
.big-num { font-family: var(--serif); letter-spacing: -.015em; }

/* ---------- stat cards: tabular, composed ---------- */
.stat { border-top: 2px solid var(--line); }
.stat-num { font-family: var(--serif); letter-spacing: -.015em; }

/* ---------- seating cards: room-map feel ---------- */
.tcard { position: relative; }
.tcard-head h3 { letter-spacing: .02em; }
.tguest { letter-spacing: .01em; }
.over-flag { border-left: 4px solid #c2410c; }

/* ---------- print: seating chart hand-off ---------- */
@media print {
  body.printing-seating .event-card, body.printing-seating .tabs,
  body.printing-seating .masthead, body.printing-seating footer,
  body.printing-seating .panel, body.printing-seating .row,
  body.printing-seating button, body.printing-seating .form,
  body.printing-seating .statcards { display: none !important; }
  body.printing-seating #panel-seating { display: block !important; }
  body.printing-seating #seatingBox .tgrid { grid-template-columns: repeat(2, 1fr); }
  body.printing-seating .tcard { box-shadow: none; break-inside: avoid; }
  body.printing-seating .tcard-head button, body.printing-seating .tguest button { display: none !important; }
}
