:root {
  /* Romantic, warm palette */
  --bg: #faf6f1;
  --bg-elev: #f5efe7;
  --surface: #ffffff;
  --surface-2: #fbf7f2;
  --ink: #2a221d;
  --ink-2: #4a3e36;
  --ink-3: #8a7b70;
  --ink-4: #b8a89a;
  --line: #ece3d7;
  --line-2: #ddd1c1;

  /* Accent palette */
  --rose: #c08a8a;
  --rose-soft: #e8cdcd;
  --rose-bg: #f7e9e9;
  --rose-deep: #8d5a5a;

  --sage: #8aa090;
  --sage-soft: #cfd9d1;
  --sage-bg: #e8efe9;
  --sage-deep: #5a6f60;

  --gold: #c9a86a;
  --gold-soft: #e9d9b6;
  --gold-bg: #f5ecd9;
  --gold-deep: #8a6f3a;

  --lavender: #a89dc0;
  --lavender-bg: #ece8f1;

  --danger: #b85a5a;
  --danger-bg: #f6e3e3;
  --warn: #b88a3a;
  --warn-bg: #f6eccf;
  --ok: #6b8c70;
  --ok-bg: #dfeae0;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-sm: 0 1px 2px rgba(60, 40, 30, 0.04), 0 1px 1px rgba(60, 40, 30, 0.03);
  --shadow: 0 4px 14px rgba(60, 40, 30, 0.06), 0 1px 2px rgba(60, 40, 30, 0.04);
  --shadow-lg: 0 14px 40px rgba(60, 40, 30, 0.10), 0 2px 6px rgba(60, 40, 30, 0.04);

  --font-serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; }
h1 { font-family: var(--font-serif); font-weight: 500; font-size: 36px; letter-spacing: -0.01em; line-height: 1.1; }
h2 { font-family: var(--font-serif); font-weight: 500; font-size: 28px; letter-spacing: -0.005em; line-height: 1.15; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; }
h4 { font-size: 13px; font-weight: 600; }
p { margin: 0; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Layout --- */
.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
}

.sidebar {
  background: linear-gradient(180deg, #f8f1e7 0%, #f3ead9 100%);
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
@media (max-width: 900px) {
  .sidebar { position: relative; height: auto; flex-direction: row; flex-wrap: wrap; overflow-x: auto; }
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 10px 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.sidebar-brand .mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 26px;
  color: var(--rose-deep);
  letter-spacing: 0.01em;
}
.sidebar-brand .couple {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
}
.sidebar-brand .date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(192, 138, 138, 0.08); color: var(--ink); }
.nav-item.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.nav-item.active .nav-icon { color: var(--rose-deep); }
.nav-icon { color: var(--ink-3); flex-shrink: 0; display: inline-flex; }
.nav-badge {
  margin-left: auto;
  background: var(--rose-bg);
  color: var(--rose-deep);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 99px;
  font-feature-settings: "tnum";
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 12px 12px 6px;
}

/* --- Content --- */
.content {
  padding: 36px 44px 64px;
  max-width: 1320px;
  width: 100%;
}
@media (max-width: 900px) {
  .content { padding: 24px 18px 60px; }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-header .eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 4px;
}
.page-header h1 { font-size: 38px; }
.page-header .subtitle { color: var(--ink-3); margin-top: 6px; font-size: 14px; max-width: 60ch; }
.page-actions { display: flex; gap: 10px; align-items: center; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card.tight { padding: 16px; }
.card.flat { box-shadow: none; }
.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  gap: 12px;
}
.card-title-row h2 { font-size: 22px; }
.card-title-row h3 { font-size: 15px; }

.section-eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 8px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-4); background: var(--surface-2); }
.btn:active { transform: translateY(0.5px); }
.btn-primary {
  background: var(--rose-deep);
  color: #fff;
  border-color: var(--rose-deep);
}
.btn-primary:hover { background: #784a4a; border-color: #784a4a; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-icon { padding: 7px; }

/* --- Inputs --- */
.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(192, 138, 138, 0.15);
}
.textarea { font-family: inherit; resize: vertical; min-height: 60px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11px; color: var(--ink-3); }

/* --- Pills / tags / chips --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 99px;
  background: var(--bg-elev);
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.pill.rose { background: var(--rose-bg); color: var(--rose-deep); }
.pill.sage { background: var(--sage-bg); color: var(--sage-deep); }
.pill.gold { background: var(--gold-bg); color: var(--gold-deep); }
.pill.lavender { background: var(--lavender-bg); color: #5b4f78; }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.outline { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); }

.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 99px;
  background: var(--ink-4);
}

/* --- Dashboard KPI cards --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kpi-grid { grid-template-columns: 1fr; } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.kpi .label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
}
.kpi .value {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.kpi .value .unit { font-size: 18px; color: var(--ink-3); margin-left: 4px; }
.kpi .meta { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.kpi .accent {
  position: absolute;
  top: 18px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
}
.kpi.rose .accent { background: var(--rose-bg); color: var(--rose-deep); }
.kpi.sage .accent { background: var(--sage-bg); color: var(--sage-deep); }
.kpi.gold .accent { background: var(--gold-bg); color: var(--gold-deep); }
.kpi.lavender .accent { background: var(--lavender-bg); color: #5b4f78; }

/* --- Countdown hero --- */
.countdown-hero {
  background: linear-gradient(135deg, #f3e7d8 0%, #ecdada 60%, #e5d6dc 100%);
  border-radius: var(--r-xl);
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid #ead8d0;
}
.countdown-hero .ornament {
  position: absolute;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 200px;
  color: #fff;
  opacity: 0.4;
  right: -10px;
  bottom: -90px;
  pointer-events: none;
  line-height: 1;
}
.countdown-hero .eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--rose-deep);
}
.countdown-hero h1 {
  font-size: 48px;
  font-style: italic;
  font-weight: 500;
  margin-top: 8px;
  color: var(--ink);
}
.countdown-hero .date-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 10px;
}
.countdown-numbers { display: flex; gap: 18px; z-index: 1; }
.countdown-numbers .num {
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--r-lg);
  padding: 14px 22px;
  min-width: 88px;
  backdrop-filter: blur(8px);
}
.countdown-numbers .num .n {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1;
  font-weight: 500;
  color: var(--ink);
}
.countdown-numbers .num .l {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 600;
}

/* --- Two-column dashboard grid --- */
.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.list-item .dot-icon {
  width: 34px; height: 34px; border-radius: 99px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elev);
  color: var(--ink-2);
  flex-shrink: 0;
}
.list-item .body { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; font-size: 13.5px; color: var(--ink); }
.list-item .meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.list-item .right { font-size: 12px; color: var(--ink-3); text-align: right; flex-shrink: 0; }

.alert {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--warn-bg);
  border: 1px solid #ead7a8;
  color: #6a4d1d;
  font-size: 13px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.alert.danger { background: var(--danger-bg); border-color: #e5bdbd; color: var(--danger); }
.alert .a-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }

/* --- Progress bar --- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--bg-elev);
  border-radius: 99px;
  overflow: hidden;
}
.progress .bar {
  height: 100%;
  background: linear-gradient(90deg, var(--rose) 0%, var(--rose-deep) 100%);
  border-radius: 99px;
  transition: width 0.3s;
}
.progress.sage .bar { background: linear-gradient(90deg, var(--sage) 0%, var(--sage-deep) 100%); }
.progress.gold .bar { background: linear-gradient(90deg, var(--gold) 0%, var(--gold-deep) 100%); }
.progress.over .bar { background: linear-gradient(90deg, var(--danger) 0%, #7a3030 100%); }

/* --- Tables --- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table tr:hover td { background: var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.table .row-actions { display: flex; gap: 4px; opacity: 0.6; }
.table tr:hover .row-actions { opacity: 1; }

.scroll-x { overflow-x: auto; }

/* --- Toolbar --- */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar .input { width: 240px; }
.toolbar .grow { flex: 1; }

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 15, 0.4);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal.wide { max-width: 720px; }
.modal-header {
  padding: 20px 22px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { font-family: var(--font-serif); font-size: 22px; font-weight: 500; }
.modal-body { padding: 8px 22px 14px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 22px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* --- Budget category card --- */
.budget-cat {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.budget-cat .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.budget-cat .name { font-weight: 600; font-size: 14px; }
.budget-cat .nums { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.budget-cat .nums .used { color: var(--ink); font-weight: 600; }

/* --- Guest list specific --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--r-sm);
  font-size: 10.5px;
  font-weight: 600;
  background: var(--bg-elev);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.diet { background: #f3e9d9; color: #6a4d1d; }
.tag.access { background: #e1ebe9; color: #406058; }
.tag.kid { background: #f3e3ea; color: #84385c; }

.checkmark-row { display: flex; gap: 6px; }
.checkmark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: var(--ink-3);
}
.checkmark.checked {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: #fff;
}

/* --- Seating --- */
.seating-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  min-height: 600px;
}
@media (max-width: 900px) { .seating-layout { grid-template-columns: 1fr; } }
.seating-pool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  max-height: 700px;
  overflow-y: auto;
}
.seating-canvas {
  background:
    radial-gradient(circle at 1px 1px, rgba(180, 160, 140, 0.25) 1px, transparent 0) 0 0 / 22px 22px,
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
  min-height: 600px;
  overflow: auto;
}
.seating-canvas-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 600px;
}
.pool-guest {
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  margin-bottom: 6px;
  cursor: grab;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.pool-guest:hover { background: var(--bg-elev); }
.pool-guest.dragging { opacity: 0.4; }
.pool-guest .marks { display: flex; gap: 4px; }
.table-shape {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  user-select: none;
  font-family: var(--font-serif);
  cursor: grab;
}
.table-shape.rect {
  border-radius: 10px;
}
.table-shape .t-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.table-shape .t-seats {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-sans);
  font-weight: 600;
  margin-top: 2px;
}
.seat {
  position: absolute;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px dashed var(--line-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 9.5px; color: var(--ink-3);
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 2px;
  line-height: 1.1;
}
.seat.occupied {
  background: var(--rose-bg);
  border: 1.5px solid var(--rose);
  color: var(--rose-deep);
  font-size: 9px;
}
.seat.occupied.diet { background: var(--gold-bg); border-color: var(--gold); color: var(--gold-deep); }
.seat.occupied.access { background: var(--sage-bg); border-color: var(--sage); color: var(--sage-deep); }
.seat.conflict { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(184, 90, 90, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(184, 90, 90, 0); }
}

/* --- Tasks --- */
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: all 0.15s;
  margin-bottom: 8px;
}
.task-row:hover { border-color: var(--line-2); }
.task-row.done .title-text { text-decoration: line-through; color: var(--ink-3); }
.task-row .body { flex: 1; min-width: 0; }
.task-row .meta-row { display: flex; gap: 10px; align-items: center; margin-top: 5px; flex-wrap: wrap; }

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
}
.cal-head {
  background: var(--surface-2);
  padding: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
}
.cal-day {
  background: var(--surface);
  min-height: 90px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  position: relative;
}
.cal-day.other-month { background: var(--surface-2); color: var(--ink-4); }
.cal-day.today .cal-num { background: var(--rose-deep); color: #fff; }
.cal-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cal-task {
  font-size: 10.5px;
  padding: 2px 6px;
  background: var(--rose-bg);
  color: var(--rose-deep);
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-task.done { background: var(--ok-bg); color: var(--ok); text-decoration: line-through; }
.cal-task.overdue { background: var(--danger-bg); color: var(--danger); }

/* --- Document grid --- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.doc-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.doc-card:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.doc-card .ico {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: var(--rose-bg);
  color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center;
}
.doc-card .name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.doc-card .meta { font-size: 11.5px; color: var(--ink-3); }

/* --- Folder pills --- */
.folder-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.folder-chip {
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.folder-chip:hover { background: var(--surface-2); }
.folder-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.folder-chip .count { color: var(--ink-3); font-weight: 500; }
.folder-chip.active .count { color: rgba(255,255,255,0.6); }

/* People */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.person-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.person-card .avatar {
  width: 44px; height: 44px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--rose-soft), var(--gold-soft));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
  font-weight: 500;
}
.person-card .name { font-weight: 600; font-size: 15px; }
.person-card .role { font-size: 12px; color: var(--ink-3); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.person-card .contact { font-size: 12.5px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.person-card .contact span { display: flex; align-items: center; gap: 6px; }

/* --- Contracts --- */
.contract-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contract-card .top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.contract-card .vendor { font-weight: 600; font-size: 15px; }
.contract-card .cat { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.contract-card .row { display: flex; justify-content: space-between; font-size: 12.5px; }
.contract-card .row .l { color: var(--ink-3); }

/* utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.text-mono { font-family: var(--font-mono); }
.text-serif { font-family: var(--font-serif); }
.text-muted { color: var(--ink-3); }
.text-muted-2 { color: var(--ink-2); }
.text-right { text-align: right; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.fill { width: 100%; }
.tnum { font-feature-settings: "tnum"; }
.cursor-pointer { cursor: pointer; }
.muted-bg { background: var(--surface-2); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-3);
}
.empty-state .ico {
  width: 56px; height: 56px;
  background: var(--bg-elev);
  border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.empty-state h3 { color: var(--ink-2); margin-bottom: 4px; font-size: 16px; }

/* scrollbar */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ── Login ─────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px;
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 10px 40px rgba(60, 40, 30, 0.08);
}
.login-card .login-mark {
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.login-card h1 { font-family: var(--font-serif); font-size: 26px; margin: 0; }
.login-card p { color: var(--ink-3); font-size: 13px; margin: -8px 0 4px; }
.login-error {
  display: flex; align-items: center; gap: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
}

/* ── Sidebar user ──────────────────────────────────────── */
.sidebar-user {
  border-top: 1px solid var(--line);
  margin-top: 8px;
  padding-top: 8px;
}
.sidebar-user .who {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--ink-3);
  padding: 4px 12px 6px;
}

/* Hero edit button */
.countdown-hero h1 .hero-edit {
  margin-left: 10px;
  vertical-align: middle;
  opacity: 0.45;
}
.countdown-hero h1 .hero-edit:hover { opacity: 1; }

/* Icon picker popover */
.icon-picker-pop {
  position: absolute;
  top: 40px; left: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 30px);
  gap: 4px;
  box-shadow: 0 8px 24px rgba(60, 40, 30, 0.14);
}

/* Task notes */
.task-note {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.task-note .head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.task-note .who {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
}
.task-note .when { font-size: 11.5px; color: var(--ink-3); }
.task-note .text { font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }

/* ── File drop zone & attachment chips ─────────────────── */
.filedrop {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px dashed var(--line-2);
  border-radius: 10px;
  padding: 22px 16px;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  background: var(--surface-2);
  transition: border-color .15s, background .15s;
}
.filedrop:hover { border-color: var(--rose); color: var(--ink-2); }
.filedrop.drag { border-color: var(--rose); background: var(--rose-bg); color: var(--rose-deep); }
.filedrop.compact { padding: 10px 12px; font-size: 12.5px; }

.att-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--ink-2);
  max-width: 100%;
}
.att-chip a { color: var(--rose-deep); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.att-chip a:hover { text-decoration: underline; }
.att-chip .sz { color: var(--ink-4); font-size: 11px; }
.att-chip button {
  border: none; background: transparent; cursor: pointer;
  color: var(--ink-3); display: inline-flex; padding: 1px; border-radius: 99px;
}
.att-chip button:hover { color: var(--danger); }

/* ── Wishes / "Kvelden" kanban board ───────────────────── */
.wish-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .wish-board { grid-template-columns: 1fr; } }
.wish-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  min-height: 160px;
  transition: background .12s, border-color .12s;
}
.wish-col.drop { border-color: var(--rose); background: var(--rose-bg); }
.wish-col-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; }
.wish-col-head .t { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.wish-col-head .h { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.wish-col-head .c { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 600; }
.wish-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: var(--shadow-sm);
  transition: background .12s, box-shadow .12s;
}
.wish-card:hover { background: var(--bg-elev); box-shadow: var(--shadow); }
.wish-card.dragging { opacity: 0.4; }
.wish-card .wc-top { display: flex; align-items: center; gap: 8px; }
.wish-card .wc-ico {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--rose-bg); color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center;
}
.wish-card .wc-title { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; }
.wish-card .wc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.wish-col-empty {
  font-size: 12px; color: var(--ink-4); text-align: center;
  padding: 18px 0; border: 1px dashed var(--line-2); border-radius: var(--r);
}
.wish-suggest { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Gift registry (admin) ─────────────────────────────── */
.registry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.registry-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.rg-img { width: 100%; height: 150px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.rg-img-none { display: flex; align-items: center; justify-content: center; color: var(--ink-4); }
.rg-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.rg-title { font-weight: 600; font-size: 14px; }
.rg-sub { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rg-desc { font-size: 12.5px; color: var(--ink-2); }
.rg-link { font-size: 12px; color: var(--rose-deep); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.rg-link:hover { text-decoration: underline; }
.rg-resv { margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.rg-reservers { display: flex; flex-wrap: wrap; gap: 5px; }
.rg-reserver {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 99px; padding: 2px 4px 2px 8px;
}
.rg-reserver button { border: none; background: transparent; cursor: pointer; color: var(--ink-3); display: inline-flex; padding: 1px; border-radius: 99px; }
.rg-reserver button:hover { color: var(--danger); }

/* ── Public registry page (/onskeliste/<token>) ────────── */
.pub-wrap { max-width: 1000px; margin: 0 auto; padding: 32px 20px 64px; }
.pub-loading { text-align: center; color: var(--ink-3); padding: 80px 0; font-size: 14px; }
.pub-mark { font-family: var(--font-serif); font-size: 13px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--rose-deep); }
.pub-hero { text-align: center; padding: 28px 0 22px; }
.pub-hero h1 { font-family: var(--font-serif); font-size: 44px; font-weight: 600; color: var(--ink); margin: 6px 0 2px; }
.pub-date { font-size: 14px; color: var(--ink-3); letter-spacing: 0.04em; }
.pub-intro { max-width: 620px; margin: 16px auto 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-2); }
.pub-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; }
.pub-empty { text-align: center; max-width: 520px; margin: 40px auto; }
.pub-empty h1 { font-family: var(--font-serif); font-size: 26px; margin-bottom: 8px; }
.pub-empty p { color: var(--ink-3); font-size: 14px; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 12px; }
.pub-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.pub-item:hover { box-shadow: var(--shadow); }
.pub-item.taken { opacity: 0.66; }
.pub-img { width: 100%; height: 180px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.pub-img-none { display: flex; align-items: center; justify-content: center; color: var(--ink-4); }
.pub-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pub-title { font-weight: 600; font-size: 15.5px; color: var(--ink); }
.pub-desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.pub-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pub-price { font-weight: 600; font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.pub-price.soft { font-weight: 500; color: var(--ink-3); }
.pub-qty { font-size: 12px; color: var(--ink-3); }
.pub-link { font-size: 12.5px; color: var(--rose-deep); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.pub-link:hover { text-decoration: underline; }
.pub-actions { margin-top: auto; padding-top: 8px; display: flex; align-items: center; gap: 8px; }
.pub-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.pub-badge.mine { background: var(--sage-bg); color: var(--sage-deep); }
.pub-badge.taken { background: var(--surface-2); color: var(--ink-3); }
.pub-foot { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 36px; }
@media (max-width: 600px) { .pub-hero h1 { font-size: 34px; } }

