/* SeatFlow — offline event theme. No external fonts or CDNs.
   Two looks share one component set:
   - Guest pages: dark, elegant, colors driven by the admin-chosen swatch (inline vars).
   - Admin + login: warm event-studio palette with evergreen controls. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* guest defaults (overridden inline per theme) */
  --accent: #c9a227;
  --bg: #14120f;
  --card: rgba(22, 22, 28, 0.55);
  --card-edge: rgba(255, 255, 255, 0.14);
  --input-bg: rgba(0, 0, 0, 0.32);
  --input-border: rgba(255, 255, 255, 0.16);
  --input-border-hover: rgba(255, 255, 255, 0.3);
  --input-border-focus: var(--accent);
  --input-ring: color-mix(in srgb, var(--accent) 28%, transparent);
  --placeholder: rgba(244, 241, 234, 0.45);
  --text: #f4f1ea;
  --muted: #a89f8d;
  --danger: #e5725f;
  --ok: #7fd0a0;
  --radius: 16px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body.admin-page {
  /* bright modern palette */
  --accent: #4f46e5;
  --accent-2: #6d5df1;
  --accent-soft: #eef2ff;
  --bg: #f4f6fb;
  --card: #ffffff;
  --card-edge: #e7ebf4;
  --input-bg: #f3f5f9;
  --input-border: transparent;
  --input-border-hover: #d5dcea;
  --input-border-focus: #a5b0f5;
  --input-ring: rgba(79, 70, 229, 0.13);
  --placeholder: #98a2b3;
  --text: #101828;
  --muted: #667085;
  --danger: #dc2626;
  --ok: #067647;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 10px 32px rgba(16, 24, 40, 0.07);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: var(--accent); }
.mt { margin-top: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- shared form bits ---------- */

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 7px;
}

input:not([type]), input[type="text"], input[type="url"], input[type="password"], input[type="search"], input[type="number"],
select, textarea {
  width: 100%;
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: var(--sans);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--input-border-hover); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 4px var(--input-ring);
}
.admin-page input:focus, .admin-page select:focus, .admin-page textarea:focus {
  background-color: #ffffff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
textarea { resize: vertical; }

input[type="color"] {
  width: 52px; height: 36px; padding: 2px;
  border: 1px solid var(--card-edge); border-radius: 8px;
  background: var(--input-bg); cursor: pointer;
}

.btn-primary {
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent-2, var(--accent)), var(--accent));
  color: #fff;
  min-height: 50px;
  padding: 0 22px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-ghost {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--card-edge);
  border-radius: 12px;
  min-height: 46px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
.admin-page .btn-ghost { box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: var(--accent); }

.btn-mini {
  background: transparent;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-mini:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.btn-mini.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-mini.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); }

.inline { display: inline; }

.form-error { color: var(--danger); margin-bottom: 10px; font-size: 0.94rem; }
.flash {
  background: var(--accent-soft, rgba(79, 70, 229, 0.1));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.guest-page .flash { background: rgba(255, 255, 255, 0.08); }

/* ---------- guest page ---------- */

.guest-page { display: flex; align-items: center; justify-content: center; }

.guest-wrap {
  width: 100%;
  max-width: 520px;
  padding: 48px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.guest-head { text-align: center; }
.event-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}
.tagline { color: var(--muted); margin-top: 6px; font-size: 1.02rem; }

.card {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#name-input {
  font-size: clamp(1.2rem, 5.5vw, 1.45rem);
  padding: 16px;
  text-align: center;
}
.lookup-card .btn-primary { width: 100%; margin-top: 14px; }

#result { margin-top: 18px; }

.seat-card { text-align: center; animation: rise 0.45s ease both; }
.seat-welcome { font-size: 1.05rem; color: var(--muted); }
.seat-name { font-family: var(--serif); font-size: clamp(1.5rem, 7vw, 2rem); margin: 6px 0 14px; }
.seat-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.seat-table {
  font-family: var(--serif);
  font-size: clamp(3rem, 20vw, 4.6rem);
  line-height: 1.05;
  color: var(--accent);
  text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 45%, transparent);
}
.seat-table small { font-size: 0.42em; color: var(--muted); display: block; letter-spacing: 0.1em; }
.seat-meta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.92rem;
}
.seat-note { margin-top: 12px; color: var(--muted); font-style: italic; }
.checked-line { margin-top: 16px; color: var(--ok); font-size: 0.9rem; }

.msg-card { text-align: center; animation: rise 0.35s ease both; }
.msg-card .sad { font-size: 1.6rem; }
.msg-card p { margin-top: 8px; color: var(--muted); }

.cand-title { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); text-align: center; }
.cand-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; animation: rise 0.35s ease both; }
.cand-btn {
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 1.05rem;
  cursor: pointer;
  padding: 8px 16px;
}
.cand-btn .cand-note { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.cand-btn:hover, .cand-btn:focus { border-color: var(--accent); outline: none; }

.search-again {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  width: 100%;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.guest-foot { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--muted); }
.guest-foot a { color: var(--muted); text-decoration: none; }
.guest-foot a:hover { color: var(--accent); }

/* ---------- login ---------- */

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 400px;
  background: #fff;
  border: 1px solid #e7ebf4;
  border-radius: 20px;
  padding: 32px 26px;
  box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 18px 50px rgba(16,24,40,.1);
}
.login-title {
  font-family: var(--serif);
  font-weight: 500;
  text-align: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
  background: linear-gradient(90deg, #4f46e5, #9333ea);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card .btn-primary { width: 100%; margin-top: 6px; }

/* ---------- admin ---------- */

.admin-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid #e7ebf4;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}
.admin-brand {
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  background: linear-gradient(90deg, #4f46e5, #9333ea);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.admin-links { display: flex; gap: 4px; flex-wrap: wrap; }
.admin-links a, .linklike {
  color: #475467;
  text-decoration: none;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.15s, color 0.15s;
}
.admin-links a:hover, .linklike:hover { color: #1a2033; background: #f2f4f9; }
.admin-links a.active { color: #4f46e5; background: #eef2ff; font-weight: 600; }
.admin-nav > div:last-child { margin-left: auto; }

.admin-main { max-width: 1120px; margin: 0 auto; padding: 26px 18px 60px; }
.page-title { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; margin-bottom: 18px; color: #101828; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.stat-num { font-size: 2rem; font-weight: 700; color: #4f46e5; line-height: 1.15; }
.stat-num .stat-sub { font-size: 1rem; color: var(--muted); font-weight: 500; }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.stat-label a { color: var(--muted); }
.stat-alert { border-color: #fecaca; background: #fff5f5; }
.stat-alert .stat-num { color: #dc2626; }

.panel {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.panel h3 { font-weight: 650; font-size: 1.02rem; margin-bottom: 14px; color: #101828; }
.hint { color: var(--muted); font-size: 0.82rem; font-weight: 400; }
.muted { color: var(--muted); }
.ok { color: var(--ok); }
code { background: #f2f4f9; color: #344054; padding: 1px 6px; border-radius: 6px; font-size: 0.86em; }

.fill-track { height: 8px; background: #eef1f7; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.fill-bar { height: 100%; background: linear-gradient(90deg, #4f46e5, #8b5cf6); border-radius: 999px; transition: width 0.5s ease; }

.table-fill-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 12px; }
.table-fill { background: #fbfcfe; border: 1px solid #e7ebf4; border-radius: 14px; padding: 13px; }
.table-fill.over { border-color: #fecaca; background: #fff8f8; }
.tf-head { display: flex; justify-content: space-between; align-items: baseline; }
.tf-sub { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.data-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 9px 10px;
  border-bottom: 1px solid var(--card-edge);
  position: sticky; top: 0;
  background: #fbfcfe;
  z-index: 1;
}
.data-table td { padding: 10px; border-bottom: 1px solid #f0f3f9; }
.data-table tr:hover td { background: #f7f9ff; }
.nowrap { white-space: nowrap; }
.table-scroll { overflow-x: auto; max-height: 65vh; overflow-y: auto; border-radius: 10px; }

.over-badge {
  background: #fee2e2;
  color: #b91c1c;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
}

.grid-2 { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; margin-bottom: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 12px; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search-input { margin-bottom: 12px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.panel-head h3 { margin-bottom: 0; }
.panel-actions { display: flex; gap: 8px; align-items: center; }

.confirm-strip { display: none; } /* legacy */

.btn-danger {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 12px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}
.btn-danger:disabled { opacity: 0.45; cursor: default; box-shadow: none; }

/* delete-all popup */
.danger-dialog {
  border: none;
  border-radius: 18px;
  padding: 24px;
  width: min(430px, calc(100vw - 40px));
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.3);
  color: #101828;
}
.danger-dialog::backdrop {
  background: rgba(16, 24, 40, 0.5);
  backdrop-filter: blur(2px);
}
.danger-dialog[open] { animation: pop 0.18s ease; }
.danger-dialog h4 { font-size: 1.18rem; margin-bottom: 6px; }
.danger-dialog p { color: #667085; font-size: 0.92rem; margin-bottom: 14px; }
.danger-dialog input { margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

@keyframes pop {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- settings page ---------- */

.settings-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }

.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.swatch-card {
  border: 2px solid var(--card-edge);
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  background: #fbfcfe;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  display: block;
}
.swatch-card:hover { border-color: #c7cdfb; }
.swatch-card.selected {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px #eef2ff, var(--shadow);
}
.swatch-card input { position: absolute; opacity: 0; pointer-events: none; }
.swatch-chip {
  height: 74px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}
.swatch-aa { font-family: var(--serif); font-size: 1.7rem; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; position: absolute; bottom: 8px; right: 10px; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.swatch-name { font-weight: 600; font-size: 0.9rem; margin-top: 8px; }
.swatch-desc { color: var(--muted); font-size: 0.78rem; margin-top: 1px; }
.swatch-custom-colors { display: none; }
.swatch-card.selected .swatch-custom-colors {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px;
}
.swatch-custom-colors label { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }

.bg-options { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bg-option {
  border: 2px solid var(--card-edge);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.bg-option input { position: absolute; opacity: 0; pointer-events: none; }
.bg-option:hover { border-color: #c7cdfb; }
.bg-option.selected {
  border-color: #4f46e5;
  color: #4f46e5;
  background: #eef2ff;
}
.bg-config-row { margin-bottom: 12px; }
.bg-config-row .field-label { display: flex; align-items: center; gap: 10px; }
.bg-current { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.bg-current img {
  width: 150px; height: 84px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--card-edge);
}
.remove-bg { font-size: 0.85rem; color: var(--danger); display: flex; gap: 6px; align-items: center; }

/* mini guest-page preview */
.gp-preview {
  border-radius: 20px;
  padding: 26px 18px;
  text-align: center;
  background: #14120f;
  color: #f4f1ea;
  border: 1px solid var(--card-edge);
  transition: background 0.25s;
}
.gp-preview-tagline { font-size: 0.8rem; color: #a89f8d; margin-bottom: 2px; min-height: 1em; }
.gp-preview-name { font-family: var(--serif); font-size: 1.25rem; }
.gp-preview-table { font-family: var(--serif); font-size: 2.6rem; line-height: 1.2; margin: 6px 0 10px; color: #c9a227; }
.gp-preview-btn {
  display: inline-block;
  background: #c9a227;
  color: #191409;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 9px 22px;
}

/* ---------- mobile ---------- */

/* Phone nav: brand + utils on one row, tabs scroll horizontally below. */
@media (max-width: 700px) {
  .admin-brand { order: 1; }
  .nav-utils { order: 2; margin-left: auto; }
  .admin-tabs {
    order: 3;
    flex-basis: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 4px;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-links a, .linklike { padding: 8px 12px; white-space: nowrap; }
}

@media (max-width: 560px) {
  .admin-nav { padding: 8px 12px; gap: 8px; }
  .admin-brand { font-size: 0.98rem; }
  .admin-main { padding: 14px 10px 60px; }
  .page-title { font-size: 1.25rem; margin-bottom: 12px; }

  .panel { padding: 14px; border-radius: 14px; margin-bottom: 14px; }

  .hide-sm { display: none; }
  .data-table { font-size: 0.86rem; }
  .data-table td, .data-table th { padding: 9px 6px; }

  .btn-mini { padding: 9px 13px; font-size: 0.84rem; }

  .stat-grid { gap: 10px; }
  .stat-tile { padding: 14px; border-radius: 14px; }
  .stat-num { font-size: 1.75rem; }

  .table-fill-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
  .swatch-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }

  .grid-2 { grid-template-columns: 1fr; }
  .row-actions .btn-primary { flex: 1 1 auto; }

  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions .btn-ghost, .dialog-actions .btn-danger { flex: 1 1 auto; }

  .settings-grid { gap: 14px; }
  .bg-current img { width: 110px; height: 64px; }
}

/* Event invitations */
.qr-image { display:block; max-width:100%; height:auto; background:white; margin:16px 0; }
.invitation-url { overflow-wrap:anywhere; }

.event-row { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:12px 0; border-bottom:1px solid var(--card-edge); flex-wrap:wrap; }
.event-row > div { min-width:0; overflow-wrap:anywhere; }

/* Clear, consistent workspace surfaces and accessible controls. */
body.admin-page {
  --accent: #285448; --accent-2: #285448; --accent-soft: #edf3ee;
  --bg: #f6f3ee; --text: #243b33; --muted: #62685f;
  --card-edge: #dcded4; --input-bg: #fff; --input-border: #858c80;
  --input-border-hover: #62685f; --input-border-focus: #285448;
  --placeholder: #696e63; --danger: #b42318; --ok: #116149;
  --shadow: 0 2px 5px rgba(20,38,65,.035);
  font-size: 15px; line-height: 1.6;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid #285448; outline-offset: 3px; }
.admin-page input:focus, .admin-page textarea:focus, .admin-page select:focus { border-color:#285448; outline: 2px solid #285448; outline-offset: 1px; box-shadow: 0 0 0 4px #dfebe4; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.skip-link { position:fixed; top:8px; left:12px; z-index:100; background:#fff; color:#243b33; padding:10px 16px; border-radius:8px; transform:translateY(-160%); }
.skip-link:focus { transform:translateY(0); }
.workspace-bar { min-height:76px; background:#fcfaf6; color:#fff; display:flex; align-items:center; padding:0 max(24px, calc((100vw - 1200px)/2)); gap:40px; }
.workspace-brand { color:#fff; display:flex; align-items:center; gap:10px; font-size:20px; font-weight:750; text-decoration:none; letter-spacing:-.5px; }
.brand-mark { width:34px; height:34px; background:#e1e8da; color:#284b3b; border-radius:10px; display:grid; place-items:center; font-size:20px; }
.workspace-links { display:flex; gap:8px; align-self:stretch; align-items:center; }
.workspace-links a, .workspace-logout { color:#394e43; text-decoration:none; font-size:14px; padding:10px 16px; border-radius:8px; font-weight:600; min-height:44px; }
.workspace-links a[aria-current="page"] { background:#e9eee6; color:#fff; }
.workspace-links a:hover, .workspace-logout:hover { background:#e9eee6; color:#fff; }
.workspace-bar > form, .workspace-bar > .workspace-logout { margin-left:auto; }
.workspace-logout { background:none; border:1px solid #919a8c; cursor:pointer; }
.workspace-bar :focus-visible { outline-color:#e1e8da; }
.admin-main { max-width:1248px; padding:36px 24px 72px; }
.page-heading { margin-bottom:8px; }
.page-heading h1, .page-title { font-family:var(--sans); font-size:30px; line-height:1.25; font-weight:750; letter-spacing:-.8px; }
.page-title { margin-bottom:28px; }
.eyebrow { font-size:11px; font-weight:750; text-transform:uppercase; letter-spacing:1.5px; color:#62685f; margin-bottom:8px; }
.page-description { color:#62685f; margin-bottom:28px; font-size:16px; }
.admin-page h2 { font-size:20px; font-weight:700; line-height:1.35; letter-spacing:-.3px; }
.admin-page .page-title { font-size:30px; }
.admin-page h3 { font-size:16px; line-height:1.4; }
.panel { padding:26px; border-radius:14px; margin-bottom:24px; }
.panel-head { margin-bottom:20px; }
.panel-head h2 { display:flex; align-items:center; gap:10px; }
.section-heading { margin-bottom:22px; }
.section-heading h2, .section-heading h3 { margin-bottom:6px; }
.section-heading p:not(.eyebrow) { color:var(--muted); font-size:14px; }
.stack { gap:12px; }
.stack > label, .field-label { color:#39493e; font-size:14px; font-weight:650; text-transform:none; letter-spacing:0; }
.stack > label + input { margin-top:-6px; }
.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), .admin-page select, .admin-page textarea { border-radius:8px; padding:11px 13px; min-height:46px; }
.admin-page input[type="checkbox"], .admin-page input[type="radio"] { accent-color:#285448; width:18px; height:18px; vertical-align:middle; margin-right:6px; }
.hint { font-size:13px; line-height:1.6; }
.btn-primary, .btn-ghost, .btn-mini, .btn-danger { display:inline-flex; align-items:center; justify-content:center; gap:7px; text-decoration:none; font-family:var(--sans); letter-spacing:0; border-radius:8px; font-size:14px; font-weight:650; min-height:44px; line-height:1.3; padding:10px 16px; }
.admin-page .btn-primary { background:#285448; color:white; box-shadow:none; border:1px solid #285448; }
.admin-page .btn-primary:hover { background:#193e34; border-color:#193e34; }
.admin-page .btn-ghost, .admin-page .btn-mini { color:#39493e; background:#fff; border-color:#858c80; box-shadow:none; }
.admin-page .btn-ghost:hover, .admin-page .btn-mini:hover { background:#edf3ee; color:#285448; border-color:#285448; }
.admin-page .btn-mini.danger { color:#b42318; border-color:#d8a6a2; background:#fff; }
.admin-page .btn-mini.danger:hover { background:#fff1f0; border-color:#b42318; }
.btn-danger { background:#b42318; border:1px solid #b42318; box-shadow:none; }
.btn-danger:hover:not(:disabled) { background:#8d1b12; }
button:disabled { opacity:1 !important; background:#e4e9f0 !important; border-color:#c9cec2 !important; color:#62685f !important; cursor:not-allowed !important; box-shadow:none !important; }
.flash { border:1px solid #a0b8a5; border-left:4px solid #285448; background:#edf3ee; color:#2c5141; padding:14px 18px; border-radius:8px; margin:0 0 24px; }
.events-layout { display:grid; grid-template-columns:minmax(0, 1.75fr) minmax(320px, 1fr); gap:28px; align-items:start; }
.events-layout > * { min-width:0; }
.count-badge { display:inline-grid; place-items:center; background:#e7eddf; border-radius:6px; color:#4e624e; font-size:13px; min-width:27px; padding:3px 8px; letter-spacing:0; }
.event-row { padding:22px 0; gap:16px; border-bottom:1px solid #dcded4; align-items:flex-start; }
.event-row:last-of-type { border-bottom:0; padding-bottom:4px; }
.event-identity { display:flex; gap:14px; align-items:center; width:100%; }
.event-avatar { flex:none; width:44px; height:44px; border-radius:12px; background:#ecdfd4; color:#725641; display:grid; place-items:center; font-size:14px; font-weight:750; }
.event-details { min-width:0; }
.event-details h3 { margin:0 0 5px; }
.event-details h3 a { color:#243b33; text-decoration:none; }
.event-details h3 a:hover { color:#285448; text-decoration:underline; }
.event-code { color:#62685f; font-size:12px; font-family:ui-monospace,Consolas,monospace; overflow-wrap:anywhere; }
.event-actions { display:flex; flex-wrap:wrap; gap:8px; padding-left:58px; }
.event-actions .js-delete-event { border-color:transparent; }
.event-actions .js-delete-event:hover { border-color:#d8a6a2; }
.domain-summary { border:1px solid #dcded4; background:#eeeee4; border-radius:12px; padding:20px 24px; font-size:13px; }
.domain-summary h3 { font-size:13px; margin-bottom:6px; }
.domain-summary p { overflow-wrap:anywhere; color:#62685f; margin-bottom:12px; }
.domain-summary a { font-weight:650; }
.url-preview { background:#f1f1e9; border:1px solid #dcded4; border-radius:8px; padding:12px 14px; margin:4px 0; }
.url-preview span { display:block; color:#62685f; font-size:11px; text-transform:uppercase; letter-spacing:.7px; font-weight:700; margin-bottom:4px; }
.url-preview output { display:block; color:#39493e; font-size:13px; overflow-wrap:anywhere; }
.empty-state { padding:40px 12px; text-align:center; color:#62685f; }
.empty-state h3 { color:#243b33; margin-bottom:8px; }
.empty-symbol { display:grid; place-items:center; margin:0 auto 16px; width:48px; height:48px; border-radius:14px; background:#eeeee4; color:#725641; font-size:24px; }
.info-note { padding:12px 14px; border-left:3px solid #5b8069; background:#edf3ee; color:#4e624e; font-size:13px; }
.settings-single { max-width:800px; }
.admin-nav { background:#fff; border-bottom:1px solid #d8dbce; padding:14px 24px; gap:12px; box-shadow:none; }
.admin-brand, .login-title { background:none; color:#285448; -webkit-text-fill-color:currentColor; font-family:var(--sans); letter-spacing:-.3px; }
.admin-brand { text-decoration:none; font-size:15px; padding:8px 0; }
.event-context { font-size:13px; color:#62685f; max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.admin-links a, .linklike { min-height:44px; display:inline-flex; align-items:center; font-size:14px; color:#4f5d51; }
.admin-links a.active { background:#e9eee6; color:#193e34; }
.stat-num { color:#285448; letter-spacing:-1px; }
.stat-label { color:#62685f; margin-top:8px; font-size:13px; }
.fill-bar { background:#547a65; }
.fill-track { background:#e2e6dc; }
.data-table th { color:#4f5d51; font-size:12px; background:#eef0e7; padding:12px; }
.data-table td { border-color:#e2e4dc; padding:14px 12px; }
.data-table tbody tr:nth-child(even) { background:#fbfbf7; }
.data-table tbody tr:hover td { background:#edf3ee; }
.table-fill { background:#f7f8f2; border-color:#dcded4; }
.tf-sub { font-size:13px; color:#62685f; margin-top:6px; }
.panel-actions { flex-wrap:wrap; }
.swatch-card:focus-within, .bg-option:focus-within { outline:3px solid #285448; outline-offset:3px; }
.swatch-card input[type="color"] { position:static; opacity:1; pointer-events:auto; }
.danger-dialog { margin:auto; max-height:calc(100dvh - 40px); overflow:auto; border:1px solid #c9cec2; border-radius:16px; padding:28px; width:min(480px,calc(100vw - 32px)); }
.danger-dialog p { color:#4f5d51; font-size:14px; margin:0; line-height:1.65; }
.danger-dialog input { margin-bottom:8px; }
.danger-label { color:#b42318; font-size:11px; text-transform:uppercase; letter-spacing:1px; font-weight:750; }
.danger-dialog::backdrop { background:rgba(14,27,46,.65); }
.login-card { border-color:#d8dbce; padding:36px; }
.login-title { color:#243b33; font-size:24px; font-weight:750; }
.qr-panel { display:grid; grid-template-columns:320px minmax(0,1fr); gap:40px; align-items:center; padding:36px; }
.qr-art { display:flex; flex-direction:column; align-items:center; background:#f3eee4; border:1px solid #dcded4; border-radius:14px; padding:20px; }
.qr-image { margin:0 0 14px; border-radius:4px; }
.qr-details { min-width:0; display:flex; flex-direction:column; gap:16px; }
.qr-details h2 { font-size:28px; }
.qr-details > p { color:#62685f; }
.qr-details .eyebrow, .qr-details .field-label { margin:0; }
.copy-row { display:flex; gap:8px; }
.copy-row input { min-width:0; }
.copy-row button { flex-shrink:0; }
.qr-secondary { display:flex; flex-wrap:wrap; gap:12px 24px; font-size:14px; border-top:1px solid #dcded4; padding-top:18px; }
/* Guest content stays readable against custom event backgrounds. */
.guest-page { --card:#17202e; --card-edge:#56657a; --muted:#c3cddd; --input-bg:#101824; --input-border:#79889e; --placeholder:#b2bfd0; }
.guest-page .event-name, .guest-page .tagline, .guest-page .guest-foot, .guest-page .guest-foot a { color:var(--page-ink,#fff); }
.guest-head { background:var(--header-surface,transparent); border-radius:14px; padding:12px; }
.guest-page .event-name { text-shadow:none; }
.guest-page .card { backdrop-filter:none; box-shadow:0 10px 32px #0003; }
.guest-page .btn-primary { background:var(--accent); color:var(--button-ink,#141b29); box-shadow:none; }
.guest-page .seat-table { color:var(--readable-accent,#f4d675); text-shadow:none; }
.guest-page .field-label { color:#c3cddd; }
.guest-page .search-again, .guest-foot a { min-height:44px; display:flex; align-items:center; justify-content:center; }
.guest-page :focus-visible { outline:3px solid #e2e8f0; outline-offset:3px; }
@media (max-width:1000px) { .events-layout { grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr); gap:20px; } .qr-panel { grid-template-columns:260px minmax(0,1fr); gap:24px; padding:24px; } }
@media (max-width:760px) {
 .workspace-bar { padding:12px 18px; gap:16px; flex-wrap:wrap; min-height:68px; }
 .workspace-brand { font-size:18px; }
 .workspace-links { gap:0; }
 .workspace-links a, .workspace-logout { padding:10px 12px; }
 .admin-main { padding:26px 16px 48px; }
 .events-layout, .qr-panel { grid-template-columns:1fr; }
 .events-sidebar { display:grid; gap:0; }
 .panel { padding:20px; }
 .page-heading h1, .admin-page .page-title { font-size:26px; }
 .page-description { font-size:14px; }
 .event-context { order:2; max-width:45%; }
 .admin-nav { padding:10px 16px; }
 .admin-nav .nav-utils { order:3; margin-left:auto; }
 .admin-tabs { order:4; flex-basis:100%; overflow-x:auto; flex-wrap:nowrap; scrollbar-width:thin; }
 .admin-tabs a { white-space:nowrap; }
 .qr-art { max-width:360px; width:100%; justify-self:center; }
 .qr-details h2 { font-size:24px; }
 .settings-grid { grid-template-columns:1fr; }
}
@media (max-width:420px) {
 .workspace-bar { gap:10px; }
 .workspace-brand { flex:1; }
 .workspace-links { order:3; flex-basis:100%; }
 .event-actions { padding-left:0; }
 .panel-head > .hint { width:100%; }
 .copy-row { flex-direction:column; }
 .qr-details .row-actions > * { flex:1; }
 .danger-dialog { padding:22px; }
 .guest-foot { flex-wrap:wrap; justify-content:center; gap:4px 20px; align-items:center; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

.guest-foot { background:var(--header-surface); border-radius:12px; padding:4px 12px; }

/* Event studio: stationery-inspired details, with practical planning controls. */
.public-header-note { margin-left:auto; color:var(--muted); font-size:13px; }
.home-welcome { border-top:1px solid #d8dbce; padding:40px 0 20px; }
.home-welcome > h2 { font-family:var(--serif); font-size:36px; font-weight:400; margin-bottom:16px; }
.home-welcome > p:not(.eyebrow) { max-width:520px; color:var(--muted); }
.welcome-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-top:32px; }
.welcome-steps article { background:#fffdf9; border:1px solid #d8dbce; border-radius:14px; padding:26px; }
.welcome-steps article > span { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#e7eddf; color:#285448; font-size:12px; margin-bottom:20px; }
.welcome-steps h3 { margin-bottom:10px; }
.welcome-steps p, .home-footer p { font-size:14px; color:var(--muted); }
.home-footer { border-top:1px solid #d8dbce; margin-top:30px; padding-top:24px; display:flex; gap:16px; flex-wrap:wrap; }
.home-footer > span { font-weight:700; }
.home-footer p:last-child { margin-left:auto; }
.guest-foot { justify-content:center; }
@media(max-width:760px) { .welcome-steps { grid-template-columns:1fr; gap:14px; } .home-footer { flex-direction:column; gap:8px; } .home-footer p:last-child { margin-left:0; } }
@media(max-width:560px) { .public-header-note { display:none; } .home-welcome { padding-top:28px; } .home-welcome > h2 { font-size:30px; } }
.grid-2 > *, .grid-4 > *, .settings-grid > *, .panel { min-width:0; }
.admin-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="hidden"]), .admin-page select, .admin-page textarea { min-width:0; max-width:100%; }
.admin-page input[type="file"] { width:100%; }
.table-scroll { max-width:100%; }
@media (max-width:560px) {
 .grid-4 { grid-template-columns:1fr; }
 .stat-grid, .table-fill-grid, .swatch-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .tf-head { flex-wrap:wrap; }
 .table-fill, .stat-tile { overflow-wrap:anywhere; }
 .data-table td, .data-table th { padding:10px 8px; }
 .data-table .nowrap { white-space:normal; }
 .data-table .nowrap .btn-mini { margin:3px 0; }
 .panel-actions, .panel-actions form { max-width:100%; }
 .panel-actions input { width:100%; }
}
.workspace-bar { color:#243b33; border-bottom:1px solid #dcded4; }
.workspace-brand { color:#243b33; position:relative; padding-right:24px; }
.brand-caption { font-size:9px; letter-spacing:1.8px; line-height:1.4; font-weight:650; width:55px; border-left:1px solid #c6ccbe; padding-left:13px; margin-left:5px; }
.brand-mark { border-radius:50% 50% 8px 8px; width:32px; height:37px; background:#285448; }
.brand-mark span { width:14px; height:19px; border:1px solid #f6f3ee; border-radius:50% 50% 2px 2px; position:relative; }
.brand-mark span::after { content:''; position:absolute; left:-4px; right:-4px; bottom:5px; border-top:1px solid #f6f3ee; }
.workspace-links a[aria-current="page"], .workspace-links a:hover, .workspace-logout:hover { color:#243b33; }
.workspace-bar :focus-visible { outline-color:#285448; }
.studio-hero { display:grid; grid-template-columns:1.1fr 1fr; align-items:center; min-height:280px; gap:30px; margin:0 0 30px; }
.hero-copy .eyebrow { display:flex; align-items:center; gap:10px; color:#526248; margin-bottom:17px; }
.eyebrow-line { display:inline-block; width:25px; height:1px; background:#708364; }
.page-heading h1, .admin-page .page-title { font-family:var(--serif); font-weight:400; letter-spacing:-1px; }
.studio-hero h1 { font-size:58px; line-height:1.06; letter-spacing:-2px; margin-bottom:20px; }
.studio-hero h1 em { color:#7e5843; font-weight:400; }
.hero-copy > p:last-child { color:#62685f; font-size:14px; line-height:1.8; }
.place-setting { position:relative; height:280px; width:100%; max-width:450px; justify-self:end; }
.setting-orbit { position:absolute; width:290px; height:250px; border:1px solid #d2d8c9; border-radius:50%; top:10px; left:35px; transform:rotate(-25deg); }
.plate { position:absolute; height:232px; width:232px; left:30px; top:24px; border-radius:50%; background:#e0e5d8; border:1px solid #c8d1be; box-shadow:inset 0 0 0 10px #e9ecdf,0 12px 20px #3e4e3010; padding:31px; }
.plate-inner { width:100%; height:100%; border:1px solid #bcc9b1; border-radius:50%; display:grid; place-items:center; box-shadow:inset 0 0 0 6px #d9e0d0; }
.plate-flower { color:#819176; font-size:60px; font-weight:300; }
.invitation { position:absolute; width:171px; height:222px; right:34px; top:24px; background:#fcf9f2; border:1px solid #ccbaab; padding:24px 18px; display:flex; flex-direction:column; align-items:center; text-align:center; transform:rotate(9deg); box-shadow:0 10px 24px #52483416; }
.invitation::before { content:''; position:absolute; inset:8px; border:1px solid #e4d7c8; pointer-events:none; }
.invitation-kicker { font-size:8px; letter-spacing:2px; color:#7e5843; margin-bottom:17px; }
.invitation-title { font-family:var(--serif); color:#415b42; font-size:35px; line-height:1.05; font-style:italic; }
.invitation-rule { width:32px; height:1px; background:#b59b7d; margin:19px 0 15px; }
.invitation-footer { font-size:6px; letter-spacing:1px; color:#7e5843; }
.setting-dot { position:absolute; background:#bd9178; border-radius:50%; }
.dot-one { width:9px; height:9px; top:12px; left:12px; }
.dot-two { width:6px; height:6px; bottom:3px; right:49px; }
.planning-path { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0; border-top:1px solid #d8dbce; border-bottom:1px solid #d8dbce; margin-bottom:32px; }
.planning-path > span { display:flex; gap:11px; align-items:center; color:#526248; font-size:13px; }
.planning-path b { font-size:10px; font-weight:600; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; border:1px solid #b6c1ac; }
.events-panel { background:transparent; border:0; padding:0; box-shadow:none; }
.events-panel .panel-head { margin-bottom:17px; }
.events-panel .panel-head h2 { font-size:24px; font-family:var(--serif); font-weight:400; }
.events-panel .search-input { background:#fcfaf6; margin-bottom:18px; }
.event-row, .event-row:last-of-type { padding:24px; background:#fffdf9; border:1px solid #d9dacc; border-radius:12px; margin-bottom:14px; gap:22px; box-shadow:0 3px 7px #34422c04; }
.event-identity { gap:20px; }
.event-avatar { width:64px; height:77px; border-radius:40px 40px 6px 6px; font-family:var(--serif); font-size:22px; font-weight:400; border:1px solid #d8bca5; background:#f0e2d7; }
.event-overline { color:#707362; font-size:9px; letter-spacing:1.7px; margin:0 0 7px; font-weight:650; }
.admin-page .event-details h3 { font-family:var(--serif); font-size:23px; font-weight:400; line-height:1.25; margin-bottom:8px; }
.event-actions { padding-left:0; width:100%; padding-top:19px; border-top:1px solid #e3e4d9; }
.event-actions a:first-child { background:#285448; color:#fff; border-color:#285448; }
.event-actions a:first-child:hover { background:#193e34; }
.event-actions .js-delete-event { margin-left:auto; background:transparent; }
.create-event-panel { border-top:3px solid #285448; background:#fffdf9; }
.create-event-panel h2 { font-family:var(--serif); font-size:26px; font-weight:400; letter-spacing:-.5px; }
.create-event-panel .eyebrow { color:#6c705d; font-size:9px; }
.create-event-panel .section-heading p:not(.eyebrow) { font-size:13px; }
.domain-summary { position:relative; padding-right:46px; }
.domain-icon { position:absolute; top:17px; right:20px; font-size:24px; color:#5f7554; }
.qr-details h2 { font-family:var(--serif); font-weight:400; font-size:34px; }
.qr-art { border-radius:150px 150px 12px 12px; padding-top:40px; }
@media (max-width:1000px) {
 .studio-hero h1 { font-size:52px; }
 .invitation { right:6px; }
 .plate { left:0; }
 .setting-orbit { left:0; }
 .event-row, .event-row:last-of-type { padding:20px; }
 .event-actions .js-delete-event { margin-left:0; }
}
@media (max-width:760px) {
 .studio-hero { grid-template-columns:1fr .75fr; min-height:235px; gap:12px; }
 .studio-hero h1 { font-size:44px; }
 .place-setting { height:220px; }
 .plate { width:170px; height:170px; padding:25px; top:28px; }
 .plate-flower { font-size:45px; }
 .setting-orbit { width:200px; height:190px; }
 .invitation { width:130px; height:178px; padding:20px 12px; top:24px; }
 .invitation-kicker { font-size:6px; margin-bottom:12px; }
 .invitation-title { font-size:29px; }
 .invitation-rule { margin:12px 0; }
 .invitation-footer { font-size:5px; letter-spacing:.5px; }
 .planning-path { gap:12px; }
 .planning-path > span { font-size:11px; gap:7px; }
 .planning-path b { flex-shrink:0; width:24px; height:24px; }
 .events-panel { padding:0; }
}
@media (max-width:560px) {
 .workspace-brand { padding-right:0; }
 .brand-caption { font-size:8px; }
 .studio-hero { display:block; position:relative; min-height:0; padding:5px 0 10px; margin-bottom:16px; }
 .studio-hero h1 { font-size:47px; }
 .hero-copy { position:relative; z-index:1; }
 .hero-copy > p:last-child { font-size:13px; }
 .place-setting { display:none; }
 .planning-path { padding:15px 0; gap:10px; align-items:flex-start; margin-bottom:25px; }
 .planning-path > span { flex:1; display:flex; flex-direction:column; align-items:flex-start; font-size:11px; }
 .event-identity { gap:14px; }
 .event-avatar { width:52px; height:65px; font-size:19px; }
 .admin-page .event-details h3 { font-size:21px; }
 .event-row, .event-row:last-of-type { padding:18px; }
 .event-actions { gap:8px; }
 .event-actions .js-delete-event { padding-left:8px; padding-right:8px; font-size:12px; }
 .event-actions .btn-mini { font-size:12px; padding:10px 12px; }
 .events-panel .panel-head { gap:6px; }
}
