@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap');
@font-face { font-family: "Merchant Expanded"; src: url('/merchant-expanded.woff') format('woff'); font-style: normal; font-weight: 400; font-display: swap; }
:root { --navy: #101d31; --navy-2: #172943; --gold: #c8a86b; --gold-light: #e5cc9a; --cream: #f4f1ea; --ink: #18202c; --muted: #748095; --line: rgba(200,168,107,.34); --white: #fffdfa; --danger: #b15d61; --shadow: 0 24px 70px rgba(9, 18, 33, .18); --font-display: "Merchant Expanded", "Merchant", "Playfair Display", Georgia, serif; --font-body: "Prompt", "DM Sans", Arial, sans-serif; }
* { box-sizing: border-box; }
html { background: var(--cream); color: var(--ink); font-family: var(--font-body); }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; padding: 28px 18px 54px; background: radial-gradient(circle at 12% 8%, rgba(255,255,255,.85), transparent 30rem), var(--cream); }
.wordmark { max-width: 680px; margin: 0 auto 22px; color: var(--navy); letter-spacing: .11em; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.ticket { width: min(100%, 680px); margin: auto; filter: drop-shadow(0 22px 34px rgba(16,29,49,.18)); animation: rise .65s ease-out both; }
.ticket-main, .ticket-stub { background: var(--navy); color: var(--white); }
.ticket-main { padding: 28px 26px 30px; border-radius: 18px 18px 0 0; position: relative; overflow: hidden; }
.ticket-main:before { content: ""; position: absolute; width: 240px; height: 240px; right: -90px; top: -80px; border: 1px solid rgba(229,204,154,.24); border-radius: 50%; box-shadow: 0 0 0 22px rgba(229,204,154,.035), 0 0 0 45px rgba(229,204,154,.035); }
.ticket-top { display: flex; justify-content: space-between; gap: 20px; position: relative; }
.eyebrow { color: var(--gold-light); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; }
.mark { color: var(--gold); font-family: var(--font-display); font-size: 25px; line-height: 1; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); }
h1 { max-width: 480px; margin: 58px 0 12px; color: var(--gold-light); font-size: clamp(40px, 12vw, 75px); font-weight: 500; letter-spacing: -.045em; line-height: .93; }
.lead { max-width: 360px; margin-bottom: 34px; color: #dce3ed; font-size: 15px; line-height: 1.6; }
.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route small, .meta small { display: block; margin-bottom: 5px; color: #9eabc0; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; }
.route strong { display: block; font-size: 16px; font-weight: 500; }
.route-line { width: 46px; height: 1px; background: var(--gold); position: relative; }
.route-line:after { content: ""; position: absolute; right: 0; top: -3px; border-left: 7px solid var(--gold); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.route p { margin: 0; font-size: 13px; }
.address { margin: 24px 0 0; color: #dce3ed; font-size: 13px; }
.ticket-stub { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 22px 26px 26px; border-top: 1px dashed rgba(229,204,154,.48); border-radius: 0 0 18px 18px; }
.ticket-stub:before, .ticket-stub:after { content: ""; position: absolute; width: 22px; height: 22px; top: -11px; background: var(--cream); border-radius: 50%; }
.ticket-stub:before { left: -11px; } .ticket-stub:after { right: -11px; }
.meta strong { color: var(--white); font-size: 15px; font-weight: 500; }
.number { text-align: right; }
.number strong { color: var(--gold); font-size: 15px; letter-spacing: .09em; }
.actions { display: grid; gap: 10px; padding: 24px 4px 0; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 49px; padding: 13px 18px; border: 1px solid transparent; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 13px; font-weight: 600; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-1px); background: var(--gold-light); }
.btn.secondary { border-color: rgba(200,168,107,.45); background: transparent; color: var(--navy); }
.btn.dark { border-color: rgba(16,29,49,.3); background: transparent; color: var(--navy); }
.link-button { border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.notice { width: min(100%, 680px); margin: 18px auto 0; padding: 15px 17px; border: 1px solid rgba(16,29,49,.1); border-radius: 12px; background: rgba(255,255,255,.56); color: var(--ink); font-size: 13px; line-height: 1.5; }
.error { border-color: rgba(177,93,97,.35); color: #813e43; }
.success { border-color: rgba(103,136,111,.35); color: #456b50; }
.footer { width: min(100%, 680px); margin: 28px auto 0; display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 11px; }
.footer a { color: inherit; }
.panel { min-height: 100vh; background: #eef0f2; padding-bottom: 60px; }
.panel-header { padding: 28px max(20px, calc((100vw - 1080px)/2)); background: var(--navy); color: var(--white); }
.panel-inner, .panel-header-inner { width: min(100%, 1080px); margin: auto; }
.panel-header-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; }
.panel h1 { margin: 15px 0 0; font-size: clamp(38px, 7vw, 58px); }
.panel-main { width: min(100%, 1080px); margin: 28px auto; padding: 0 20px; }
.grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 20px; }
.card { padding: 23px; border: 1px solid rgba(16,29,49,.09); border-radius: 16px; background: var(--white); box-shadow: 0 12px 30px rgba(16,29,49,.06); }
.card h2 { margin-bottom: 18px; font-family: var(--font-display); font-size: 25px; font-weight: 500; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.stat { padding: 16px; border-radius: 12px; background: var(--navy); color: var(--white); }
.stat span { display: block; color: var(--gold-light); font-size: 28px; font-weight: 600; } .stat small { color: #bbc7d9; font-size: 11px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
input, textarea, select { width: 100%; border: 1px solid #d7dce2; border-radius: 8px; padding: 11px 12px; background: #fff; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,168,107,.15); }
.toolbar input { flex: 1 1 220px; } .toolbar select { flex: 0 1 160px; }
label { display: grid; gap: 7px; margin-bottom: 14px; color: #536073; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
textarea { min-height: 90px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .span-2 { grid-column: span 2; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; } .row .btn { flex: 0 0 auto; }
.guest { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 15px 0; border-top: 1px solid #e6e8eb; }
.guest-name { font-weight: 600; } .guest-meta { margin-top: 3px; color: var(--muted); font-size: 12px; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pending { background: #eff0ed; color: #69705f; } .attending { background: #e6f0e8; color: #477152; } .declined { background: #f7e9e9; color: #994e53; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--navy); } .login .card { width: min(100%, 380px); } .login h1 { margin: 0 0 10px; color: var(--navy); font-size: 44px; } .login p { color: var(--muted); font-size: 13px; line-height: 1.6; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } .panel-header-inner { align-items: flex-start; flex-direction: column; } .panel-header .btn { align-self: stretch; } }
@media (max-width: 440px) { .ticket-main, .ticket-stub { padding-left: 21px; padding-right: 21px; } .route { gap: 7px; } .route-line { width: 24px; } .stats { gap: 6px; } .stat { padding: 12px 9px; } .stat span { font-size: 22px; } .form-grid { display: block; } .guest { grid-template-columns: 1fr; } }

/* Mobile panel ergonomics */
.panel-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.panel-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: #dce3ed; font-size: 11px; text-decoration: none; }
.link-button { min-height: 40px; padding: 7px 3px; border: 0; background: none; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.share-ready { display: block; margin-bottom: 9px; color: #456b50; font-weight: 600; }
.share-menu { margin-top: 10px; border-top: 1px solid rgba(16,29,49,.1); padding-top: 10px; }
.share-menu summary { cursor: pointer; color: var(--navy); font-size: 12px; font-weight: 600; }
.share-options { display: grid; gap: 7px; margin-top: 10px; }
.share-options a, .share-options button { display: flex; align-items: center; min-height: 42px; padding: 10px 12px; border: 1px solid #d7dce2; border-radius: 9px; background: #fff; color: var(--navy); font-size: 12px; text-decoration: none; }
.share-options button { width: 100%; cursor: pointer; font-weight: 500; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } .grid aside { order: -1; } .panel-header-inner { align-items: stretch; flex-direction: column; } .panel-header .btn { align-self: flex-start; } .panel-nav { margin-top: 16px; } .panel-main { margin-top: 18px; } }
@media (max-width: 440px) { .panel-header { padding: 20px 16px; } .panel-main { padding: 0 12px; } .panel .card { padding: 17px; border-radius: 14px; } .panel .card h2 { font-size: 23px; } .toolbar { display: grid; grid-template-columns: 1fr; gap: 9px; } .toolbar input, .toolbar select { min-height: 48px; } .panel .btn { min-height: 48px; width: 100%; } .panel-header .btn { width: auto; } label input, label textarea, label select { min-height: 47px; } .guest { grid-template-columns: 1fr; gap: 8px; } .guest .row { justify-content: space-between; gap: 8px; } .guest .row .badge { margin-right: auto; } .guest .link-button { padding-left: 8px; padding-right: 8px; } }

/* Invitation reveal */
.invite-flip { width: min(100%, 680px); margin: auto; perspective: 1600px; }
.invite-flip-inner { display: grid; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.2,.75,.2,1); }
.invite-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.invite-front { position: relative; z-index: 2; overflow: hidden; border-radius: 18px; background: var(--navy); color: var(--white); box-shadow: var(--shadow); }
.clinic-photo { display: block; width: 100%; height: clamp(190px, 42vw, 300px); object-fit: cover; object-position: center 62%; filter: saturate(.82) contrast(.95); }
.front-copy { padding: 28px 26px 30px; }
.front-copy .eyebrow { margin-bottom: 18px; }
.invite-front h1 { max-width: none; margin: 0 0 18px; color: var(--gold-light); font-size: clamp(42px, 11vw, 70px); line-height: .94; }
.front-rule { width: 56px; height: 1px; margin: 0 0 22px; background: var(--gold); }
.front-text { max-width: 520px; color: #dce3ed; font-size: 14px; line-height: 1.62; }
.front-text p { margin: 0 0 15px; }
.doctor-note { display: flex; align-items: flex-end; gap: 17px; margin: 24px 0 21px; padding-top: 20px; border-top: 1px solid var(--line); }
.doctor-portrait { width: 94px; height: 124px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; object-position: center 22%; border: 1px solid rgba(229,204,154,.55); filter: saturate(.86); }
.doctor-signature { display: grid; gap: 3px; align-items: end; }
.doctor-signature img { display: block; width: min(190px, 55vw); height: auto; opacity: .78; filter: brightness(0) invert(1); }
.doctor-signature span { color: #9eabc0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.front-cta { width: 100%; gap: 5px; margin-top: 10px; }
.front-cta span { display: inline-flex; align-items: center; margin-left: 0; font-family: var(--font-body); font-size: inherit; font-weight: 500; line-height: 1.2; transform: translateY(1px); }
.flip-loader { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; justify-items: center; gap: 17px; padding: 25px; background: rgba(16,29,49,.95); color: var(--gold-light); font-size: 12px; letter-spacing: .08em; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.plane-icon { width: 58px; height: 58px; fill: var(--gold); animation: plane-fly 1.1s ease-in-out infinite; }
.is-loading .flip-loader { opacity: 1; }
.is-revealed .invite-flip-inner { transform: rotateY(180deg); }
.invite-back { transform: rotateY(180deg); }
@keyframes plane-fly { 0%, 100% { transform: translateX(-26px) rotate(-3deg); opacity: .45; } 50% { transform: translateX(26px) rotate(3deg); opacity: 1; } }
@media (max-width: 440px) { .front-copy { padding: 23px 21px 24px; } .front-text { font-size: 13px; line-height: 1.55; } .front-text p { margin-bottom: 13px; } .doctor-note { gap: 13px; margin-top: 20px; padding-top: 17px; } .doctor-portrait { width: 78px; height: 104px; } .doctor-signature img { width: min(170px, 58vw); } }

@media print {
  @page { margin: 14mm; }
  html, body { background: #fff; }
  .shell { min-height: auto; padding: 0; background: #fff; }
  .wordmark, .actions, #notice, .footer { display: none !important; }
  .invite-flip { width: 100%; perspective: none; }
  .invite-flip-inner { display: block; transform: none !important; }
  .invite-front { display: none; }
  .invite-back { display: block; transform: none; }
  .ticket { width: 100%; max-width: 680px; filter: none; animation: none; }
  .ticket-main, .ticket-stub { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ticket-main { border-radius: 10px 10px 0 0; }
  .ticket-stub { border-radius: 0 0 10px 10px; }
}
