@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap");

:root {
  --dark: #0f3f3f;
  --bg: #f4f4f4;
  --alt: #d4d9d5;
  --text: #142222;
  --muted: #66706c;
  --line: #dfe4e0;
  --danger: #991b1b;
  font-family: Nunito, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden; font-size: 18px; scrollbar-gutter: stable; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
input, select { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
button { cursor: pointer; }
h1, h2, p { margin-top: 0; }
.brand { font-size: 32px; font-weight: 700; line-height: 1; color: #d9e0d9; letter-spacing: clamp(2px, .65vw, 8px); display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 12px; width: 100%; max-width: 100%; min-width: 0; padding: 12px 46px 12px 12px; border-radius: 14px; background: #093534; white-space: nowrap; overflow-wrap: normal; word-break: keep-all; }
.brand::before { content: ""; display: inline-block; width: 108px; height: 108px; flex: 0 0 108px; border-radius: 12px; background: #093534 url("/static/logo.jpg") center / contain no-repeat; }
.invite-brand { gap: 2px; padding-left: 0; padding-right: 0; flex-wrap: nowrap; overflow-wrap: normal; }
.invite-brand::before { width: 86px; height: 86px; flex-basis: 86px; }
.public-brand { gap: 4px; padding-left: 0; padding-right: 36px; }
.public-brand::before { width: 88px; height: 88px; flex-basis: 88px; }
.planguests-brand { gap: 18px; }
.primary, .secondary, .ghost { border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.primary { background: var(--dark); color: #fff; }
.secondary { background: var(--alt); color: var(--dark); }
.ghost { background: #fff; color: var(--dark); border: 1px solid var(--line); }
.disabled-action { opacity: .62; cursor: default; pointer-events: none; }
.danger { color: var(--danger); }
.muted { color: var(--muted); }
.flash-wrap { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 20; display: grid; gap: 8px; width: min(560px, calc(100% - 28px)); }
.flash { padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(15,63,63,.12); }
.flash.is-hiding { opacity: 0; transform: translateY(-8px); transition: opacity .35s ease, transform .35s ease; }
.flash.error { border-color: #ef4444; color: #991b1b; }
.flash.success { border-color: #22c55e; color: #166534; }
.login-page, .public-page { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.login-card, .public-card, .panel, .hero-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 18px 45px rgba(15,63,63,.08); }
.login-card { width: min(430px, 100%); display: grid; gap: 16px; }
.lcv-login-card { width: min(620px, 100%); text-align: center; }
.auth-title { display: grid; color: var(--dark); line-height: 1.05; margin: 28px 0 14px; }
.auth-title span { font-size: clamp(54px, 12vw, 76px); font-weight: 700; }
.auth-copy { text-align: left; }
.auth-copy h1 { margin-bottom: 0; font-size: 32px; }
.lcv-login-card input { padding: 16px; font-size: 22px; }
.lcv-login-card > .primary { font-size: 24px; }
.login-contact-email { width: calc(100% + 8px); margin: 120px -4px 8px; color: var(--muted); font-size: clamp(18px, 5vw, 24px); display: flex; justify-content: space-between; white-space: nowrap; }
.login-card h1 { margin: 0; color: var(--dark); }
.auth-switch { justify-self: center; color: var(--dark); font-weight: 800; text-decoration: underline; text-decoration-color: var(--alt); text-underline-offset: 5px; }
.login-card .brand { gap: 10px; }
.login-card .brand::before { width: 97px; height: 97px; flex-basis: 97px; }
label { display: grid; gap: 7px; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.password-wrap { position: relative; display: block; }
.password-wrap input { min-width: 0; padding-right: 54px; }
.password-toggle { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--dark); font-size: 21px; font-weight: 800; padding: 0; display: grid; place-items: center; }
.admin-page { width: min(1240px, calc(100% - 10px)); margin: 0 auto; padding: 24px; display: grid; gap: 18px; overflow-x: hidden; }
.admin-page.narrow { width: min(760px, 100%); }
.topbar { display: grid; grid-template-columns: 1fr; justify-items: start; gap: 10px; width: 100%; }
.topbar form { margin: 0; }
.topbar .ghost { width: auto; }
.topbar > .ghost, .topbar form .ghost { font-size: 20px; }
.hero-card h1 { font-size: clamp(32px, 6vw, 66px); margin: 0; color: var(--dark); overflow-wrap: anywhere; }
.hero-card p { margin: 10px 0 0; color: var(--muted); font-size: 22px; }
.event-hero { display: grid; gap: 4px; }
.big-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.owner-menu { grid-template-columns: 1fr; }
.big-button { background: #fff; border: 2px solid var(--dark); color: var(--dark); min-height: 150px; border-radius: 18px; display: grid; place-items: center; text-align: center; font-size: 28px; font-weight: 900; padding: 18px; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.big-button small { display: block; margin-top: 8px; color: var(--muted); font-size: 18px; line-height: 1.35; font-weight: 700; }
.big-button.full { min-height: 96px; }
.big-button.locked { background: var(--alt); }
.inactive-section { opacity: .48; pointer-events: none; filter: grayscale(.35); }
.page-title h1 { margin: 0 0 6px; font-size: clamp(32px, 7vw, 40px); color: var(--dark); overflow-wrap: anywhere; }
.page-title p { margin: 0; color: var(--muted); font-size: 20px; line-height: 1.45; }
.two-cols, .seating-grid, .import-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.stack { display: grid; gap: 13px; align-content: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: end; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.deadline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.file-picker { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--alt); color: var(--dark); font-weight: 800; text-align: center; cursor: pointer; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selected-file { min-width: 0; overflow-wrap: anywhere; font-size: 16px; }
.delete-list-section { display: flex; justify-content: center; padding: 8px 0 18px; }
.delete-list-section form { width: min(440px, 100%); }
.delete-list-button { width: 100%; border-color: #fecaca; background: #fff; }
.delete-list-button:hover { border-color: var(--danger); background: #fff7f7; }
.section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--dark); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.status { padding: 6px 10px; border-radius: 999px; font-weight: 800; font-size: 17px; background: var(--alt); color: var(--dark); white-space: nowrap; }
.status.attending, .status.active { background: #dcfce7; color: #166534; }
.status.not_attending, .status.passive { background: #fee2e2; color: #991b1b; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.summary-grid div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.summary-grid strong { display: block; font-size: 34px; color: var(--dark); }
.summary-grid span { color: var(--muted); }
.message-card { text-align: center; }
.message-card h1 { color: var(--dark); }
.invite-preview, .floorplan-preview { width: 100%; max-height: 320px; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.public-card { width: min(620px, 100%); display: grid; gap: 18px; text-align: center; }
.public-card h1 { margin: 0; color: var(--dark); }
.public-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.public-card .invite-message { font-size: 20px; }
.public-invite-img { width: 100%; max-height: 58vh; object-fit: contain; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.invite-actions form { display: grid; }
.participant-form { display: grid; gap: 14px; text-align: left; }
.checkline { display: flex; align-items: center; gap: 8px; }
.checkline input { width: auto; }
.participant-row { display: grid; gap: 12px; margin-bottom: 22px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f9fbfa; }
.card-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.data-card { display: grid; gap: 14px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15,63,63,.05); min-width: 0; max-width: 100%; }
.data-card strong { color: var(--dark); font-size: 23px; overflow-wrap: anywhere; }
.data-card span { overflow-wrap: anywhere; }
.card-main { display: grid; gap: 7px; min-width: 0; }
.card-actions { display: grid; gap: 8px; min-width: 0; max-width: 100%; }
.card-actions form, .card-actions a, .card-actions button { width: 100%; }
.person-card { grid-template-columns: minmax(0, 1fr); }
.pill { width: fit-content; max-width: 100%; padding: 6px 10px; border-radius: 999px; background: var(--alt); color: var(--dark); font-weight: 800; }
.seat-list { display: grid; gap: 10px; text-align: left; }
.seat-card { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.seat-card strong { color: var(--dark); font-size: 20px; }
.seat-card b { font-size: 24px; color: var(--dark); }
.public-floorplan-img { width: 100%; max-height: 55vh; object-fit: contain; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.floorplan-map { position: relative; width: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); touch-action: manipulation; }
.floorplan-map img { display: block; width: 100%; height: auto; }
.floorplan-map.editable { cursor: crosshair; }
.map-pin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 999px; background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.24), 0 8px 20px rgba(0,0,0,.25); transform: translate(-50%, -50%); z-index: 2; padding: 0; }
.map-pin::after { content: ""; position: absolute; inset: -10px; border: 2px solid rgba(220,38,38,.45); border-radius: 999px; animation: pinPulse 1.4s ease-out infinite; }
.map-pin span { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); min-width: max-content; max-width: 180px; padding: 7px 10px; border-radius: 10px; background: #fff; color: var(--dark); font-weight: 900; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.14); text-align: center; white-space: normal; overflow-wrap: anywhere; }
.map-pin.draft { background: #ef4444; }
@keyframes pinPulse {
  from { opacity: .75; transform: scale(.6); }
  to { opacity: 0; transform: scale(1.8); }
}
.qr-preview { width: 220px; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.seat-send-page .panel { width: 100%; max-width: 100%; min-width: 0; overflow-wrap: anywhere; }
.seat-send-page .card-list, .seat-send-page .data-card, .seat-send-page .card-actions { width: 100%; max-width: 100%; min-width: 0; }
.seat-send-page .qr-preview { justify-self: start; }
.demo-page { scroll-behavior: smooth; }
.demo-intro p { margin-bottom: 0; line-height: 1.55; }
.demo-public-card { margin: 0 auto; }
.demo-qr { width: 180px; height: 180px; display: grid; place-items: center; border-radius: 16px; border: 10px solid var(--dark); background: repeating-linear-gradient(45deg, #fff 0 10px, var(--alt) 10px 20px); color: var(--dark); font-weight: 900; font-size: 34px; }
.table-list { display: grid; gap: 10px; }
.table-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.assign-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.assignment-picker { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 22px; }
.assigned-title { margin-top: 10px; }
.management-page { width: min(720px, calc(100% - 10px)); }
.management-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.management-page summary { cursor: pointer; list-style: none; }
.management-page summary::-webkit-details-marker { display: none; }
.management-actions summary { font-size: 22px; }
.management-page input[type="email"] { font-size: 20px; }
.credential-box { display: grid; grid-template-columns: minmax(52px, auto) minmax(0, 1fr); gap: 6px 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; background: var(--bg); min-width: 0; max-width: 100%; }
.credential-box span { color: var(--muted); font-size: 16px; font-weight: 800; }
.credential-box code { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
.send-confirm { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.send-confirm p { margin: 0; font-weight: 800; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile-card { font-size: 20px; }
.profile-card h1 { font-size: 38px; }
.profile-card input, .profile-card select, .profile-card button { font-size: 20px; }
.seating-page input, .seating-page select, .seating-page button { font-size: 20px; }
code { background: var(--bg); padding: 2px 6px; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .admin-page > :not(.topbar), .login-card, .public-card { animation: pageEnter .3s ease both; }
  .admin-page > :nth-child(3) { animation-delay: .04s; }
  .admin-page > :nth-child(4) { animation-delay: .08s; }
  .primary, .secondary, .ghost, .big-button, .data-card { transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease; }
  .primary:hover, .secondary:hover, .ghost:hover, .big-button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,63,63,.12); }
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 861px) {
  body { background: linear-gradient(180deg, #eef2ef 0, var(--bg) 260px); }
  .admin-page { width: min(1280px, calc(100% - 64px)); padding: 28px 0 56px; gap: 22px; }
  .admin-page.narrow { width: min(820px, calc(100% - 64px)); }
  .management-page { width: min(1180px, calc(100% - 64px)); }
  .topbar { position: sticky; top: 12px; z-index: 10; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 10px 12px; border: 1px solid rgba(223,228,224,.92); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 12px 34px rgba(15,63,63,.09); backdrop-filter: blur(14px); }
  .topbar .brand { width: fit-content; padding: 4px 22px 4px 4px; border-radius: 12px; font-size: 24px; letter-spacing: 3px; gap: 8px; }
  .topbar .brand::before { width: 54px; height: 54px; flex-basis: 54px; border-radius: 9px; }
  .topbar > .ghost, .topbar > form, .topbar-actions { justify-self: end; }
  .topbar-actions { display: flex; align-items: center; gap: 8px; }
  .topbar-actions form { display: flex; }
  .topbar-link { padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 800; }
  .topbar-link.is-active, .topbar-link:hover { background: var(--alt); color: var(--dark); }
  .panel, .hero-card { padding: 28px; }
  .page-title { padding: 10px 4px 0; }
  .page-title h1 { font-size: 46px; }
  .hero-card h1 { font-size: clamp(42px, 5vw, 66px); }
  .owner-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .big-button { min-height: 160px; }
  .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .management-actions { gap: 18px; }
  .management-page > .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-card { padding: 20px; }
  .credential-box { padding: 14px; }
  .login-page { padding: 48px 24px; }
  .login-card { box-shadow: 0 24px 70px rgba(15,63,63,.12); }
  .login-card:not(.lcv-login-card) .brand { gap: 8px; padding: 6px 14px 6px 6px; font-size: 23px; letter-spacing: 2px; }
  .login-card:not(.lcv-login-card) .brand::before { width: 78px; height: 78px; flex-basis: 78px; }
}
@media (max-width: 860px) {
  .admin-page { padding: 14px; gap: 14px; }
  .login-page, .public-page { padding: 14px; align-items: start; }
  .login-card, .public-card, .panel, .hero-card { padding: 18px; border-radius: 16px; }
  .login-card .brand::before { width: 86px; height: 86px; flex-basis: 86px; }
  .big-menu, .two-cols, .summary-grid, .deadline-form, .seating-grid, .import-grid, .form-grid, .inline-form, .table-card, .assign-form, .assignment-picker, .management-actions, .invite-actions { grid-template-columns: 1fr; }
  .big-button { min-height: 112px; font-size: 25px; }
  .section-head { display: grid; }
  .topbar { align-items: flex-start; }
  .brand { font-size: clamp(23px, 7vw, 31px); gap: clamp(6px, 2vw, 10px); padding: 10px; letter-spacing: clamp(1px, .8vw, 4px); }
  .brand::before { width: clamp(72px, 20vw, 88px); height: clamp(72px, 20vw, 88px); flex-basis: clamp(72px, 20vw, 88px); }
  .login-card .brand { gap: 8px; padding: 10px; }
  .login-card .brand::before { width: clamp(68px, 19vw, 78px); height: clamp(68px, 19vw, 78px); flex-basis: clamp(68px, 19vw, 78px); }
  .invite-brand { gap: 2px; padding-left: 0; padding-right: 0; }
  .invite-brand::before { width: 76px; height: 76px; flex-basis: 76px; }
  .public-brand { padding-left: 0; padding-right: 36px; font-size: clamp(25px, 6.5vw, 29px); }
  .planguests-brand { gap: 42px; }
  .card-list { grid-template-columns: 1fr; }
  .primary, .secondary, .ghost { width: 100%; }
  .summary-grid div { padding: 14px; }
  .summary-grid strong { font-size: 30px; }
  .map-pin span { top: 28px; max-width: 132px; font-size: 16px; }
  .credential-box { grid-template-columns: 1fr; }
  .credential-box span { margin-top: 3px; }
}
