﻿:root {
  --bg: #f6f4f0;
  --panel: #ffffff;
  --text: #2c2b28;
  --muted: #6d6a63;
  --accent: #d5a33b;
  --accent-2: #f4c95d;
  --danger: #b23a48;
  --shadow: 0 10px 25px rgba(44, 43, 40, 0.08);
  --radius: 14px;
  --mono: "Fira Code", "Consolas", "Courier New", monospace;
  --sans: "Sora", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(246, 244, 240, 0.86) 0%, rgba(240, 236, 230, 0.9) 50%, rgba(239, 232, 223, 0.92) 100%),
    url("/legacy-assets/tlo.png") center / cover no-repeat fixed;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  position: sticky;
  top: 0;
  background: rgba(246, 244, 240, 0.9);
  backdrop-filter: blur(6px);
  z-index: 10;
  gap: 16px;
}

.brand .logo {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.countdown {
  display: inline-flex;
  margin-left: 12px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #d5a33b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.brand .subtitle {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 10px;
}

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

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d8d2c8;
  transition: 0.2s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
  background: var(--accent);
}

.switch input:checked + .slider:before {
  transform: translateX(20px);
}

button, .ghost {
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button.primary {
  background: var(--accent);
  color: #2b200a;
  box-shadow: var(--shadow);
}

button.primary:hover {
  transform: translateY(-1px);
}

button.ghost, .ghost {
  background: #fff;
  border: 1px solid #e2ded7;
  color: var(--text);
}

.ghost.file {
  position: relative;
  overflow: hidden;
}

.ghost.file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.panel {
  margin: 6px 32px 12px;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 8px 20px 16px;
  box-shadow: var(--shadow);
}

.tabs-header {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.top-tabs {
  margin-bottom: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.seating-layout-tabs {
  margin: 0 0 4px;
}

.seating-layout-tabs .tab-btn {
  min-width: 96px;
  justify-content: center;
}

.layout-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-right: 4px;
  border: 1px solid #e2ded7;
  background: #fff;
  border-radius: 999px;
}

.layout-tab-item .layout-tab-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  padding-right: 8px;
}

.layout-tab-item.active {
  background: var(--accent);
  border-color: transparent;
  box-shadow: var(--shadow);
}

.layout-tab-item.active .layout-tab-btn {
  color: #2b200a;
}

.layout-tab-close {
  border: none;
  background: transparent;
  color: var(--muted);
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  line-height: 1;
  font-size: 16px;
  cursor: pointer;
}

.layout-tab-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text);
}

.layout-tab-item.active .layout-tab-close {
  color: #5a430f;
}

.seating-layout-tabs .layout-add-btn {
  min-width: 44px;
  padding-left: 0;
  padding-right: 0;
  font-size: 18px;
  line-height: 1;
}

.seating-summary-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 2px 0 4px;
}

.seating-totals {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.seating-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.pinecones-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(154, 104, 38, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8e9 0%, #f5e2bd 100%);
  color: #5b3b12;
  font-size: 13px;
}

.pinecone-mark {
  color: #9a6826;
  font-size: 14px;
  transform: rotate(45deg);
}

.group-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
}

.group-tool.active {
  border-color: #c88b2e;
  background: #f7e2b4;
  color: #4c310b;
  box-shadow: 0 0 0 3px rgba(200, 139, 46, 0.14);
}

.group-editor {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 36px;
  padding-left: 4px;
}

.group-editor[hidden] {
  display: none;
}

#group-selection-count {
  color: var(--muted);
  font-size: 12px;
}

.group-editor button {
  padding: 7px 10px;
  font-size: 12px;
}

.group-editor button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.tabs-total {
  display: inline-flex;
  align-items: center;
  margin: 6px 0 8px;
  background: color-mix(in srgb, var(--panel) 85%, #fff 15%);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  min-height: 30px;
}
.seating-summary-row .tabs-total {
  margin: 0;
}
#total-count {
  font-size: 13px;
}
#overall-count {
  font-size: 15px;
}
.tabs-total input[type="number"] {
  width: 48px;
  padding: 2px 6px;
  margin: 0 4px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  font-size: 12px;
  text-align: center;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2ded7;
  background: #fff;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.tab-btn.active {
  background: var(--accent);
  color: #2b200a;
  border-color: transparent;
  box-shadow: var(--shadow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#search {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #e5e1da;
}

.stats {
  color: var(--muted);
  font-size: 14px;
}

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

.menu-list {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.notes-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.notes-list {
  display: grid;
  gap: 12px;
}

.task-notify-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.task-notify-toolbar input[type="text"] {
  min-width: 260px;
  flex: 1 1 280px;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fffdfa;
  font-size: 13px;
}

.task-push-status {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.task-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.tasks-list {
  display: grid;
  gap: 12px;
}

.task-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #eadfce;
  background: linear-gradient(180deg, #fffdfa 0%, #fff7ee 100%);
  box-shadow: 0 8px 20px rgba(44, 43, 40, 0.08);
  display: grid;
  gap: 10px;
}

.task-card--done {
  opacity: 0.8;
}

.task-row {
  display: grid;
  gap: 6px;
}

.task-row label {
  font-size: 12px;
  color: var(--muted);
}

.task-row input[type="text"],
.task-row input[type="datetime-local"],
.task-row textarea {
  width: 100%;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fffdfa;
  font-size: 13px;
}

.task-row textarea {
  min-height: 64px;
  resize: vertical;
}

.task-row--top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.task-meta {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.task-info {
  font-size: 12px;
  color: var(--muted);
}

.note-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #eadfce;
  background: linear-gradient(180deg, #fffdfa 0%, #fff7ee 100%);
  box-shadow: 0 8px 20px rgba(44, 43, 40, 0.08);
  display: grid;
  gap: 10px;
}

.note-row {
  display: grid;
  gap: 6px;
}

.note-row label {
  font-size: 12px;
  color: var(--muted);
}

.note-row input[type="text"],
.note-row textarea,
.note-row input[type="number"] {
  width: 100%;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fffdfa;
  font-size: 13px;
}

.note-money {
  display: flex;
  align-items: center;
  gap: 8px;
}

.note-money input {
  flex: 1 1 auto;
}

.note-money span {
  font-size: 12px;
  color: var(--muted);
}

.note-row textarea {
  min-height: 70px;
  resize: vertical;
}

.note-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

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

.note-delete {
  border: none;
  background: #f2d9d5;
  color: #7a2b2b;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}

.menu-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.menu-section {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #eadfce;
  background: linear-gradient(180deg, #fffdfa 0%, #fff7ee 100%);
  box-shadow: 0 8px 20px rgba(44, 43, 40, 0.08);
}

.menu-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.menu-header h3 {
  margin: 0;
  font-size: 16px;
}

.menu-note {
  color: var(--muted);
  font-size: 13px;
}

.menu-counter {
  margin-left: auto;
  background: #f3eadb;
  color: #5a4b33;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.menu-options {
  display: grid;
  gap: 8px;
}

.menu-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.menu-option--edit {
  gap: 8px;
}

.menu-text-input {
  flex: 1 1 auto;
  border: 1px solid #e5e1da;
  border-radius: 10px;
  padding: 6px 10px;
  background: #fffdfa;
  font-size: 13px;
}

.menu-delete {
  border: none;
  background: #f2d9d5;
  color: #7a2b2b;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  line-height: 20px;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.menu-add {
  margin-top: 10px;
  border: 1px dashed rgba(213, 163, 59, 0.55);
  background: rgba(213, 163, 59, 0.12);
  color: rgba(92, 63, 0, 0.85);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.8;
}

.menu-add:hover {
  opacity: 1;
}

.menu-option--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.menu-option input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
}

#guest-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

#guest-table th, #guest-table td {
  border-bottom: 1px solid #eee8df;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

#guest-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
}

#guest-table td[contenteditable="true"] {
  background: #fffdfa;
  border-radius: 6px;
}

#guest-table td[contenteditable="true"]:focus {
  outline: 2px solid rgba(43, 122, 120, 0.2);
}

#guest-table select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e5e1da;
  background: #fffdfa;
}

#guest-table .delete {
  color: #fff;
  background: var(--danger);
  border-radius: 8px;
  padding: 6px 10px;
}

.tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.seating-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 8px;
  margin-top: 4px;
  padding-bottom: 8px;
}

.seating-card {
  background: linear-gradient(180deg, #fffdfa 0%, #fff7ee 100%);
  border: 1px solid #eadfce;
  border-radius: 14px;
  padding: 12px 10px;
  position: relative;
  box-shadow: 0 10px 24px rgba(44, 43, 40, 0.08);
  min-height: 240px;
}

.seating-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.seating-title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.seating-count {
  background: #f3eadb;
  color: #5a4b33;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.seating-layout {
  display: flex;
  gap: 6px;
  align-items: start;
  min-width: 0;
}

.seat-col {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 0;
}

.seat {
  padding: 4px 6px;
  border-radius: 6px;
  background: #f8f4ee;
  border: 1px solid #efe6d9;
  font-size: 13px;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.seat.grouped {
  position: relative;
  overflow: visible;
}

.seat-group-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 16px;
  padding: 0 2px;
  height: 16px;
  border-radius: 50%;
  background: hsl(var(--group-hue) 70% 88%);
  color: hsl(var(--group-hue) 62% 34%);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.seat.group-linked-before .seat-group-badge::before {
  content: "🔗";
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 0 2px;
  background: var(--panel);
  color: hsl(var(--group-hue) 62% 38%);
  font-size: 9px;
  line-height: 12px;
}

.seat.group-selectable {
  cursor: pointer;
  outline: 1px dashed rgba(200, 139, 46, 0.55);
  outline-offset: 1px;
}

.seat.group-selectable .seat-actions {
  pointer-events: none;
  opacity: 0.35;
}

.seat.group-selectable:hover {
  outline: 2px solid rgba(200, 139, 46, 0.8);
  background: #fff9e9;
}

.seat.group-selected {
  outline: 3px solid #d79a35;
  outline-offset: 1px;
  background: #fff0c8;
  box-shadow: 0 0 0 5px rgba(215, 154, 53, 0.12);
}

.seat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  max-width: 100%;
}

.seat-name-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 1px solid rgba(213, 163, 59, 0.75);
  border-radius: 5px;
  padding: 3px 5px;
  background: #fffdfa;
  color: var(--text);
  font: inherit;
}

.seat-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  flex: 0 0 auto;
}

.seat-delete {
  border: none;
  background: #f2d9d5;
  color: #7a2b2b;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.seat-delete:hover {
  background: #e9c7c2;
}

.seat-lock {
  border: none;
  background: linear-gradient(180deg, #f6e4b8 0%, #d9b165 100%);
  color: #4a2f00;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  box-shadow: 0 0 0 2px rgba(255, 191, 0, 0.25);
}

.seat-lock:hover {
  background: linear-gradient(180deg, #f9eac7 0%, #e0bf79 100%);
}

.seat-lock.is-locked::before {
  content: "\1F512";
}

.seat-lock.is-unlocked::before {
  content: "\1F513";
}

.seat-status {
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  line-height: 18px;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #2b200a;
  background: #f4ead7;
  box-shadow: inset 0 0 0 1px rgba(90, 75, 51, 0.2);
}

.seat-status.status-accepted {
  background: #dff3e3;
  color: #1f5b2f;
  box-shadow: inset 0 0 0 1px rgba(31, 91, 47, 0.25);
}

.seat-status.status-pending {
  background: #fff1c7;
  color: #6c4b10;
  box-shadow: inset 0 0 0 1px rgba(108, 75, 16, 0.25);
}

.seat-status.status-not_invited {
  background: #ffffff;
  color: #6d6a63;
  box-shadow: inset 0 0 0 1px rgba(109, 106, 99, 0.25);
}

.seat-status.status-rejected {
  background: #f1dde9;
  color: #7a2b53;
  box-shadow: inset 0 0 0 1px rgba(122, 43, 83, 0.25);
}

.seat.locked {
  border-color: #b6c7e6;
  background: #eef3fb;
}

.seat.locked .seat-lock {
  background: linear-gradient(180deg, #d5a33b 0%, #b77a14 100%);
  color: #2b1a00;
  box-shadow: 0 0 0 2px rgba(183, 122, 20, 0.35);
}

.seat.status-accepted {
  background: #e9f7ec;
  border-color: #bcdac6;
}

.seat.status-pending {
  background: #fff6da;
  border-color: #e6d19b;
}

.seat.status-not_invited {
  background: #ffffff;
  border-color: #e6e1d8;
  color: #6d6a63;
}

.seat.status-rejected {
  background: #f5e2ec;
  border-color: #ddb6c8;
}

.seat.empty {
  background: #fcfaf7;
  border-style: dashed;
  color: #b0a99f;
  font-style: italic;
}

.seat.add-seat {
  background: rgba(213, 163, 59, 0.12);
  border: 1px dashed rgba(213, 163, 59, 0.55);
  color: rgba(92, 63, 0, 0.8);
  font-weight: 600;
  justify-content: center;
  cursor: pointer;
  opacity: 0.4;
}

.seat.add-seat:hover {
  opacity: 1;
  background: rgba(213, 163, 59, 0.25);
}

.seat.empty.removable {
  border-style: dashed;
  color: #9a5b5b;
  cursor: pointer;
}

.seat.dragging {
  opacity: 0.6;
}

.seat.drop-target {
  outline: 2px dashed #d5a33b;
  outline-offset: 2px;
}

.table-block {
  height: 100%;
  min-height: 160px;
  border-radius: 10px;
  background: linear-gradient(180deg, #cfe0f6 0%, #b7cdeb 100%);
  border: 2px solid #2f2f2f;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.4);
  flex: 0 0 20px;
}

.seating-card.table-1 .table-block {
  background: linear-gradient(180deg, #fde7d7 0%, #f7d9c2 100%);
}

.seating-card.table-2 .table-block {
  background: linear-gradient(180deg, #cfe0f6 0%, #b9d2f0 100%);
}

.seating-card.table-3 .table-block {
  background: linear-gradient(180deg, #fff2cc 0%, #f7e6b5 100%);
}

.table-card {
  padding: 12px;
  border-radius: 12px;
  background: #fff9ef;
  border: 1px solid #f0e2cc;
}

.table-card h3 {
  margin: 0 0 6px;
}

.table-card input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #e5e1da;
}

.table-actions {
  margin-top: 12px;
}

.conflicts {
  margin-top: 10px;
  color: var(--danger);
  font-weight: 600;
}

.footer {
  padding: 14px 32px 28px;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
}

.modal.show {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 27, 22, 0.45);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  width: min(420px, 92vw);
  box-shadow: 0 18px 40px rgba(44, 43, 40, 0.18);
  z-index: 1;
}

.pin-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 14, 12, 0.72);
  backdrop-filter: blur(4px);
  z-index: 40;
}

.pin-gate.hidden {
  display: none;
}

.pin-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  width: min(360px, 92vw);
  text-align: center;
  box-shadow: 0 20px 50px rgba(30, 26, 20, 0.25);
}

.pin-card h3 {
  margin: 0 0 6px;
}

.pin-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

#pin-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e1da;
  text-align: center;
  font-size: 18px;
  letter-spacing: 6px;
  margin-bottom: 10px;
}

#pin-submit {
  width: 100%;
}

.pin-error {
  margin-top: 8px;
  font-size: 12px;
  color: var(--danger);
  min-height: 16px;
}

.modal-card h3 {
  margin: 0 0 10px;
}

.modal-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

#guest-name {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e1da;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .countdown {
    margin-left: 0;
    margin-top: 6px;
  }
  .top-tabs {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .actions {
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
  }
  .brand .logo {
    font-size: 22px;
  }
  .actions {
    justify-content: flex-start;
  }
  .panel {
    margin: 6px 8px;
    padding: 8px 10px 12px;
  }
  .panel.tabs {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .seating-card {
    padding: 8px 6px;
  }
  .seating-title-row,
  .seating-layout {
    margin-left: 0;
  }
  .tabs-header {
    gap: 6px;
    flex-wrap: wrap;
  }
  .tab-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
  .tabs-total {
    font-size: 11px;
    padding: 4px 8px;
  }
  .seating-tools {
    align-items: stretch;
    justify-content: flex-start;
    margin-left: 0;
  }
  .seating-summary-row {
    align-items: stretch;
    flex-direction: column;
  }
  .seating-totals {
    width: 100%;
  }
  .group-editor {
    width: 100%;
    padding-left: 0;
  }
  #group-selection-count {
    flex: 1 1 100%;
  }
  .seating-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .seating-layout {
    gap: 6px;
    width: 100%;
    overflow: visible;
    flex-direction: column;
    align-items: stretch;
  }
  .seat-col {
    gap: 6px;
  }
  .table-block {
    display: none;
  }
  .seating-card.table-1 .seating-layout,
  .seating-card.table-2 .seating-layout,
  .seating-card.table-3 .seating-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .seating-card.table-1 .table-block,
  .seating-card.table-2 .table-block,
  .seating-card.table-3 .table-block {
    display: block;
    flex: 0 0 8px;
    min-width: 8px;
    max-width: 8px;
    min-height: 120px;
  }
  .seating-card.table-1 .seat-col,
  .seating-card.table-2 .seat-col,
  .seating-card.table-3 .seat-col {
    flex: 1 1 0;
  }
  .seat {
    font-size: 12px;
    min-height: 34px;
    padding: 6px 6px;
    min-width: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .seat-name {
    width: 0;
    flex: 1 1 0;
    min-width: 0;
  }
  .seat-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
  }
  .seat-col {
    min-width: 0;
  }
  .seat-name {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
  }
  .seat-actions {
    gap: 3px;
  }
  .seat-lock,
  .seat-delete,
  .seat-status {
    width: 16px;
    height: 16px;
    line-height: 14px;
    font-size: 9px;
  }
  .theme-switch {
    font-size: 11px;
    gap: 6px;
  }
  .switch {
    width: 38px;
    height: 20px;
  }
  .slider:before {
    width: 14px;
    height: 14px;
    top: 3px;
    left: 3px;
  }
  .switch input:checked + .slider:before {
    transform: translateX(18px);
  }
  .modal-card {
    width: min(360px, 92vw);
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 8px 10px;
  }
  .brand .logo {
    font-size: 20px;
  }
  .panel {
    margin: 6px 6px;
    padding: 8px 8px 10px;
  }
  .panel.tabs {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .seating-card {
    padding: 6px 4px;
  }
  .seating-title-row,
  .seating-layout {
    margin-left: 0;
  }
  .tabs-header {
    gap: 4px;
  }
  .tab-btn {
    padding: 5px 8px;
    font-size: 11px;
  }
  .tabs-total {
    font-size: 10px;
    padding: 3px 6px;
  }
  .seating-layout {
    gap: 6px;
    width: 100%;
    overflow: visible;
    flex-direction: column;
    align-items: stretch;
  }
  .seat-col {
    gap: 6px;
  }
  .table-block {
    display: none;
  }
  .seating-card.table-1 .seating-layout,
  .seating-card.table-2 .seating-layout,
  .seating-card.table-3 .seating-layout {
    flex-direction: row;
    align-items: flex-start;
  }
  .seating-card.table-1 .table-block,
  .seating-card.table-2 .table-block,
  .seating-card.table-3 .table-block {
    display: block;
    flex: 0 0 6px;
    min-width: 6px;
    max-width: 6px;
    min-height: 110px;
  }
  .seating-card.table-1 .seat-col,
  .seating-card.table-2 .seat-col,
  .seating-card.table-3 .seat-col {
    flex: 1 1 0;
  }
  .seat {
    font-size: 11px;
    min-height: 32px;
    padding: 5px 5px;
    min-width: 0;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
  }
  .seat-name {
    width: 0;
    flex: 1 1 0;
    min-width: 0;
  }
  .seat-actions {
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
  }
  .seat-col {
    min-width: 0;
  }
  .seat-name {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
  }
  .seat-lock,
  .seat-delete,
  .seat-status {
    width: 14px;
    height: 14px;
    line-height: 12px;
    font-size: 9px;
  }
  .theme-switch {
    font-size: 10px;
    gap: 4px;
  }
  .switch {
    width: 34px;
    height: 18px;
  }
  .slider:before {
    width: 12px;
    height: 12px;
    top: 3px;
    left: 3px;
  }
  .switch input:checked + .slider:before {
    transform: translateX(16px);
  }
}

/* Dark theme override (clean) */
html.theme-dark,
body.theme-dark {
  background:
    linear-gradient(160deg, rgba(12, 15, 20, 0.78) 0%, rgba(10, 12, 17, 0.88) 45%, rgba(8, 10, 14, 0.94) 100%),
    url("/legacy-assets/tlo.png") center / cover no-repeat fixed !important;
  color: #e7e9ee !important;
}

html.theme-dark .topbar,
body.theme-dark .topbar { background: rgba(15, 17, 21, 0.85) !important; }

html.theme-dark .panel,
body.theme-dark .panel { background: #151922 !important; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important; }

html.theme-dark .seating-card,
body.theme-dark .seating-card { background: linear-gradient(180deg, #191f2a 0%, #151922 100%) !important; border-color: #2a303d !important; }

html.theme-dark .seat,
body.theme-dark .seat { background: #1c2330 !important; border-color: #2a303d !important; }

html.theme-dark .pinecones-count,
body.theme-dark .pinecones-count { background: linear-gradient(135deg, #2d261a 0%, #3b2d18 100%) !important; border-color: #60451f !important; color: #f1dfbd !important; }

html.theme-dark .group-tool.active,
body.theme-dark .group-tool.active { background: #3b2d18 !important; border-color: #b88635 !important; color: #f1dfbd !important; }

html.theme-dark .seat-group-badge,
body.theme-dark .seat-group-badge { background: hsl(var(--group-hue) 35% 25%) !important; color: hsl(var(--group-hue) 70% 72%) !important; }

html.theme-dark .seat.group-linked-before .seat-group-badge::before,
body.theme-dark .seat.group-linked-before .seat-group-badge::before { background: #151922 !important; color: hsl(var(--group-hue) 70% 70%) !important; }

html.theme-dark .seat.group-selectable:hover,
body.theme-dark .seat.group-selectable:hover { background: #2b261d !important; }

html.theme-dark .seat.group-selected,
body.theme-dark .seat.group-selected { background: #3b2d18 !important; outline-color: #e0a747 !important; box-shadow: 0 0 0 5px rgba(224, 167, 71, 0.15) !important; }

html.theme-dark .seat.empty,
body.theme-dark .seat.empty { background: #141a23 !important; color: #8b93a2 !important; }

html.theme-dark .seat.status-accepted,
body.theme-dark .seat.status-accepted { background: #1f2f27 !important; border-color: #2f4d3b !important; color: #d7f1de !important; }

html.theme-dark .seat.status-pending,
body.theme-dark .seat.status-pending { background: #2b2417 !important; border-color: #544121 !important; color: #f5e8c8 !important; }

html.theme-dark .seat.status-not_invited,
body.theme-dark .seat.status-not_invited { background: #151922 !important; border-color: #2a303d !important; color: #c9cdd6 !important; }

html.theme-dark .seat.status-rejected,
body.theme-dark .seat.status-rejected { background: #2f1c28 !important; border-color: #563446 !important; color: #f1d7e3 !important; }

html.theme-dark .seat-status,
body.theme-dark .seat-status { box-shadow: inset 0 0 0 1px rgba(231, 233, 238, 0.18) !important; }

html.theme-dark .ghost,
body.theme-dark .ghost,
html.theme-dark button.ghost,
body.theme-dark button.ghost { background: #1a1f29 !important; border-color: #2a303d !important; color: #e7e9ee !important; }

html.theme-dark .menu-section,
body.theme-dark .menu-section { background: linear-gradient(180deg, #191f2a 0%, #151922 100%) !important; border-color: #2a303d !important; }

html.theme-dark .menu-counter,
body.theme-dark .menu-counter { background: #1f2530 !important; color: #e7e9ee !important; }

html.theme-dark .menu-text-input,
body.theme-dark .menu-text-input { background: #141a23 !important; border-color: #2a303d !important; color: #e7e9ee !important; }

html.theme-dark .seat-name-input,
body.theme-dark .seat-name-input { background: #141a23 !important; border-color: #d5a33b !important; color: #e7e9ee !important; }

html.theme-dark .menu-delete,
body.theme-dark .menu-delete { background: #4a2b2b !important; color: #f0d8d8 !important; }

html.theme-dark .menu-add,
body.theme-dark .menu-add { background: rgba(213, 163, 59, 0.16) !important; border-color: rgba(213, 163, 59, 0.6) !important; color: #f1e4c7 !important; }

html.theme-dark .note-card,
body.theme-dark .note-card { background: linear-gradient(180deg, #191f2a 0%, #151922 100%) !important; border-color: #2a303d !important; }

html.theme-dark .task-card,
body.theme-dark .task-card { background: linear-gradient(180deg, #191f2a 0%, #151922 100%) !important; border-color: #2a303d !important; }

html.theme-dark .note-row input[type="text"],
body.theme-dark .note-row input[type="text"],
html.theme-dark .note-row textarea,
body.theme-dark .note-row textarea,
html.theme-dark .note-row input[type="number"],
body.theme-dark .note-row input[type="number"] { background: #141a23 !important; border-color: #2a303d !important; color: #e7e9ee !important; }

html.theme-dark .task-row input[type="text"],
body.theme-dark .task-row input[type="text"],
html.theme-dark .task-row input[type="datetime-local"],
body.theme-dark .task-row input[type="datetime-local"],
html.theme-dark .task-row textarea,
body.theme-dark .task-row textarea,
html.theme-dark .task-notify-toolbar input[type="text"],
body.theme-dark .task-notify-toolbar input[type="text"] { background: #141a23 !important; border-color: #2a303d !important; color: #e7e9ee !important; }

html.theme-dark .task-push-status,
body.theme-dark .task-push-status { color: #c7cdda !important; }

html.theme-dark .pin-card,
body.theme-dark .pin-card { background: #151922 !important; color: #e7e9ee !important; border: 1px solid #2a303d !important; }

html.theme-dark #pin-input,
body.theme-dark #pin-input { background: #141a23 !important; border-color: #2a303d !important; color: #e7e9ee !important; }

.home-star{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 36px;
  height: 36px;
  opacity: 0.5;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-star img{
  width: 28px;
  height: 28px;
  display: block;
}
