@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500;600&family=Great+Vibes&display=swap');

:root {
  --cream: #fbf6f1; --paper: #fffdfb; --blush: #f6e4df; --rose: #d9a5a0; --rose-d: #b87470;
  --sage: #a9b8a1; --sage-d: #7f9378; --gold: #c2a36b; --ink: #4a3f3d; --muted: #9a8d8a; --line: #eddfd9;
  --ok: #7f9378; --warn: #d4a35c; --bad: #c46a6a;
  --shadow: 0 8px 30px rgba(184, 116, 112, .12); --r: 18px;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Jost', system-ui, sans-serif; --script: 'Great Vibes', cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: linear-gradient(160deg, #fdf8f4, #f8ebe6 60%, #f3e9e4); min-height: 100vh; font-weight: 400; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0 0 .4em; letter-spacing: .01em; }
h1 { font-size: 2.3rem; } h2 { font-size: 1.7rem; } h3 { font-size: 1.3rem; }
a { color: var(--rose-d); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.hidden { display: none !important; }

/* layout */
#app { display: flex; min-height: 100vh; }
.side { width: 250px; flex: none; background: rgba(255, 253, 251, .75); backdrop-filter: blur(10px); border-right: 1px solid var(--line); padding: 26px 16px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { text-align: center; margin-bottom: 22px; }
.brand .names { font-family: var(--script); font-size: 2.2rem; color: var(--rose-d); line-height: 1.1; }
.brand .date { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.nav a { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 14px; color: var(--ink); text-decoration: none; margin-bottom: 3px; font-size: .95rem; }
.nav a:hover { background: var(--blush); }
.nav a.on { background: var(--rose); color: #fff; box-shadow: var(--shadow); }
.nav .ico { width: 22px; text-align: center; }
.main { flex: 1; min-width: 0; padding: 30px 34px 80px; max-width: 1300px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { margin: 0; flex: 1; }
.menu-btn { display: none; }

/* components */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }
.btn { font: inherit; border: 0; border-radius: 999px; padding: 10px 20px; background: var(--rose); color: #fff; cursor: pointer; transition: .2s; font-weight: 500; }
.btn:hover { background: var(--rose-d); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--rose-d); border: 1px solid var(--rose); }
.btn.ghost:hover { background: var(--blush); }
.btn.sage { background: var(--sage); } .btn.danger { background: var(--bad); }
.btn.sm { padding: 6px 14px; font-size: .85rem; }
.icon-btn { border: 0; background: transparent; cursor: pointer; font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--blush); color: var(--rose-d); }
input, select, textarea { font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; width: 100%; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(217, 165, 160, .2); }
input[type=checkbox] { width: auto; accent-color: var(--rose-d); }
input[type=color] { padding: 2px; height: 38px; }
input[type=range] { padding: 0; accent-color: var(--rose-d); }
label.f { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .06em; }
label.f > * { margin-top: 5px; text-transform: none; letter-spacing: 0; font-size: 1rem; }
label.f.chk { display: flex; gap: 8px; align-items: center; } label.f.chk > * { margin: 0; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.fgrid .full { grid-column: 1 / -1; }
.tag { display: inline-block; padding: 2px 11px; border-radius: 999px; font-size: .78rem; background: var(--blush); color: var(--rose-d); }
.tag.ok { background: #e3ece0; color: var(--ok); } .tag.warn { background: #f8ecd6; color: #a8782a; } .tag.bad { background: #f6dcdc; color: var(--bad); }
.progress { height: 9px; background: var(--blush); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--gold)); border-radius: 99px; transition: width .5s; }
.stat { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--rose-d); }
.stat-l { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 6px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { font: inherit; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 18px; cursor: pointer; color: var(--ink); }
.tabs button.on { background: var(--rose); color: #fff; border-color: var(--rose); }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); font-family: var(--serif); font-size: 1.2rem; }
.money b { font-weight: 600; } .money small { color: var(--muted); display: block; font-size: .78rem; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item.done .t { text-decoration: line-through; color: var(--muted); }
.item .t { flex: 1; min-width: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blush); color: var(--rose-d); display: grid; place-items: center; font-family: var(--serif); font-weight: 600; flex: none; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(74, 63, 61, .45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--paper); border-radius: 22px; padding: 26px; width: min(640px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal h2 { margin-bottom: 16px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 22px; border-radius: 99px; z-index: 99; opacity: 0; transition: .3s; pointer-events: none; }
#toast.show { opacity: 1; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: min(420px, 100%); text-align: center; padding: 38px 32px; }
.auth .names { font-family: var(--script); font-size: 3rem; color: var(--rose-d); }

/* timeline */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-i { position: relative; padding: 0 0 22px 18px; }
.tl-i::before { content: ''; position: absolute; left: -24px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--rose); }
.tl-time { font-family: var(--serif); font-size: 1.5rem; color: var(--rose-d); }

/* canvas (seating / invite) */
.stage-wrap { overflow: auto; background: #f3ebe6; border: 1px solid var(--line); border-radius: var(--r); padding: 20px; max-height: 76vh; }
.stage { position: relative; background: #fff; box-shadow: 0 4px 20px rgba(0, 0, 0, .08); transform-origin: 0 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 40px 40px; }
.box { position: absolute; cursor: move; user-select: none; touch-action: none; }
.box.sel { outline: 2px dashed var(--rose-d); outline-offset: 3px; }
.box .hnd { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--rose-d); border-radius: 50%; display: none; z-index: 5; }
.box.sel .hnd { display: block; }
.hnd.se { right: -9px; bottom: -9px; cursor: nwse-resize; } .hnd.rot { left: 50%; top: -34px; margin-left: -7px; cursor: grab; background: var(--rose-d); }
.hnd.rot::after { content: ''; position: absolute; left: 4px; top: 12px; width: 2px; height: 18px; background: var(--rose-d); }
.tbl { width: 100%; height: 100%; background: #fff; border: 2px solid var(--rose); display: grid; place-items: center; text-align: center; font-size: 13px; line-height: 1.2; overflow: visible; }
.tbl.round { border-radius: 50%; } .tbl.full { background: #f1f6ee; border-color: var(--sage-d); }
.tbl.dance { background: repeating-conic-gradient(#f6e4df 0 25%, #fff 0 50%) 0 0/28px 28px; border-color: var(--gold); }
.tbl.pres { background: #fff6e4; border-color: var(--gold); } .tbl.bar { background: #e9eef6; border-color: #8aa0c0; }
.seat { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--sage-d); }
.seat.o { background: var(--rose); border-color: var(--rose-d); }
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
.panel { position: sticky; top: 16px; }

/* mobile */
@media (max-width: 900px) {
  .side { position: fixed; left: -280px; z-index: 40; transition: .3s; width: 260px; box-shadow: var(--shadow); background: var(--paper); }
  .side.open { left: 0; }
  .menu-btn { display: inline-block; }
  .main { padding: 18px 14px 80px; }
  h1 { font-size: 1.8rem; }
  .layout { grid-template-columns: 1fr; } .panel { position: static; }
  .fgrid { grid-template-columns: 1fr; }
  .resp-hide { display: none; }
}
