:root {
  color-scheme: light;
  --forest: #23382c;
  --forest-deep: #17261e;
  --olive: #5e6d57;
  --sage: #9faa99;
  --gold: #c7a969;
  --gold-light: #eadab8;
  --paper: #f6f5f0;
  --white: #ffffff;
  --ink: #202820;
  --muted: #69716a;
  --line: #dfe3dc;
  --danger: #9b423f;
  --warning: #a06b17;
  --shadow: 0 20px 55px rgba(27, 43, 33, .09);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(199, 169, 105, .65); outline-offset: 3px; }

.eyebrow { margin: 0 0 7px; color: var(--olive); font-size: .72rem; font-weight: 850; letter-spacing: .19em; text-transform: uppercase; }
.login-screen { min-height: 100svh; display: grid; grid-template-columns: minmax(280px, .95fr) minmax(380px, 1.05fr); background: var(--white); }
.login-art { position: relative; display: grid; place-content: center; min-height: 100%; overflow: hidden; color: white; text-align: center; background: linear-gradient(145deg, rgba(23,38,30,.88), rgba(35,56,44,.68)), url("/resort-lagoon-v2.webp") center/cover; }
.login-art::before, .login-art::after { content: ""; position: absolute; width: 420px; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.login-art::before { left: -180px; top: -170px; }
.login-art::after { right: -190px; bottom: -210px; }
.login-monogram { display: grid; place-items: center; width: 180px; aspect-ratio: 1; margin: auto; border: 1px solid rgba(255,255,255,.42); border-radius: 50%; font-family: var(--serif); font-size: 3.5rem; background: rgba(23,38,30,.35); backdrop-filter: blur(6px); box-shadow: 0 30px 80px rgba(0,0,0,.24); }
.login-art p { margin: 24px 0 0; color: var(--gold-light); font-weight: 800; letter-spacing: .22em; }
.login-card { align-self: center; width: min(100% - 48px, 470px); margin: auto; padding: 54px; border: 1px solid var(--line); border-radius: 32px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(2.8rem, 6vw, 4.5rem); font-weight: 400; letter-spacing: -.05em; }
.login-copy { margin: 0 0 32px; color: var(--muted); line-height: 1.65; }
.login-card > label:not(.check-row) { display: block; margin-bottom: 9px; font-weight: 800; }
.password-row { display: grid; grid-template-columns: 1fr auto; border: 1px solid #cfd5ce; border-radius: 16px; overflow: hidden; transition: .2s ease; }
.password-row:focus-within { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(35,56,44,.08); }
.password-row input { min-width: 0; padding: 15px 16px; border: 0; outline: 0; }
.text-button { border: 0; padding: 0 16px; color: var(--forest); font-weight: 800; background: white; }
.check-row { display: flex; align-items: center; gap: 10px; margin: 18px 0 26px; color: var(--muted); }
.check-row input { width: 18px; height: 18px; accent-color: var(--forest); }
.form-message { min-height: 24px; margin: 18px 0 0; color: var(--danger); font-weight: 700; }

.app-shell { min-height: 100svh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 270px; padding: 24px 18px; color: white; background: linear-gradient(180deg, #1f3328, #17261e); }
.brand { display: flex; align-items: center; gap: 13px; margin: 2px 6px 34px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 48px; aspect-ratio: 1; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: var(--gold-light); font-family: var(--serif); }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }
.brand small { margin-top: 3px; color: rgba(255,255,255,.55); font-size: .76rem; }
.main-nav { display: grid; gap: 5px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; padding: 12px 13px; border: 0; border-radius: 13px; color: rgba(255,255,255,.72); text-align: left; background: transparent; transition: .2s ease; }
.nav-item span { display: grid; place-items: center; width: 23px; color: var(--gold-light); font-size: 1.1rem; }
.nav-item:hover { color: white; background: rgba(255,255,255,.07); }
.nav-item.active { color: var(--forest-deep); font-weight: 800; background: var(--gold-light); }
.nav-item.active span { color: var(--forest-deep); }
.sidebar-footer { display: grid; gap: 8px; margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer a, .sidebar-footer button { border: 0; padding: 7px 3px; color: rgba(255,255,255,.65); text-align: left; text-decoration: none; background: none; }
.sidebar-footer a:hover, .sidebar-footer button:hover { color: white; }
.mobile-header { display: none; }
.main-content { margin-left: 270px; min-height: 100svh; padding: 52px clamp(24px, 4vw, 68px) 80px; }
.page { display: none; max-width: 1450px; margin: 0 auto; animation: pageIn .34s ease both; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.page-heading h1 { margin: 0; font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.8rem); font-weight: 400; letter-spacing: -.05em; line-height: 1; }
.page-heading > div > p:last-child { margin: 13px 0 0; color: var(--muted); font-size: 1.03rem; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.primary-button, .secondary-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 19px; border-radius: 13px; font-weight: 850; text-decoration: none; transition: .2s ease; }
.primary-button { border: 1px solid var(--forest); color: white; background: var(--forest); box-shadow: 0 12px 25px rgba(35,56,44,.13); }
.primary-button:hover { transform: translateY(-1px); background: #192b21; }
.secondary-button { border: 1px solid #cfd5ce; color: var(--forest); background: white; }
.secondary-button:hover { border-color: var(--forest); }
.danger-button { border: 1px solid rgba(155,66,63,.25); color: var(--danger); background: #fff7f6; }
.wide { width: 100%; }
.link-button { border: 0; padding: 5px; color: var(--forest); font-weight: 850; background: transparent; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; color: var(--forest); background: white; }
.icon-button:hover { border-color: var(--forest); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 22px; }
.stat-card { position: relative; min-height: 155px; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 10px 35px rgba(27,43,33,.045); }
.stat-card::after { content: ""; position: absolute; width: 100px; aspect-ratio: 1; right: -35px; bottom: -55px; border: 18px solid rgba(199,169,105,.12); border-radius: 50%; }
.stat-card.dark { color: white; border-color: var(--forest); background: linear-gradient(135deg, var(--forest), #40543f); }
.stat-card p { margin: 0; color: var(--muted); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat-card.dark p { color: rgba(255,255,255,.68); }
.stat-card strong { display: block; margin: 16px 0 6px; font-family: var(--serif); font-size: 2.5rem; font-weight: 400; line-height: 1; }
.stat-card small { color: var(--muted); }
.stat-card.dark small { color: rgba(255,255,255,.68); }
.overview-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
.panel { padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 10px 35px rgba(27,43,33,.045); }
.panel.compact { padding: 18px 22px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.panel-heading h2 { margin: 0; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.progress-block { margin: 18px 0; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .9rem; }
.progress-meta strong { font-weight: 850; }
.progress-track { height: 10px; overflow: hidden; border-radius: 999px; background: #edf0eb; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--forest), var(--gold)); }
.activity-list { display: grid; gap: 3px; }
.activity-item { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid #edf0eb; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 9px; aspect-ratio: 1; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(199,169,105,.13); }
.activity-item strong, .activity-item small { display: block; }
.activity-item small { margin-top: 3px; color: var(--muted); }
.empty-state { padding: 35px 20px; color: var(--muted); text-align: center; border: 1px dashed #ccd3cb; border-radius: 18px; background: #fafbf9; }

.toolbar { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; }
.toolbar .search-field { flex: 1; }
.search-field { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border: 1px solid #cfd5ce; border-radius: 13px; background: white; }
.search-field:focus-within { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(35,56,44,.07); }
.search-field span { color: var(--muted); font-size: 1.3rem; }
.search-field input { width: 100%; min-width: 130px; border: 0; outline: 0; background: transparent; }
.toolbar select, .field select, .field input, .field textarea { min-height: 46px; padding: 11px 13px; border: 1px solid #cfd5ce; border-radius: 12px; color: var(--ink); background: white; outline: 0; }
.field textarea { min-height: 105px; resize: vertical; }
.toolbar select:focus, .field select:focus, .field input:focus, .field textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 4px rgba(35,56,44,.07); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 18px; }
.group-card { display: flex; flex-direction: column; min-height: 305px; padding: 23px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 10px 32px rgba(27,43,33,.045); }
.group-card.cancelled { opacity: .66; }
.group-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.group-card h3 { margin: 10px 0 5px; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; }
.group-card p { margin: 0; color: var(--muted); }
.status-pill, .tag { display: inline-flex; align-items: center; width: fit-content; padding: 6px 10px; border-radius: 999px; font-size: .75rem; font-weight: 850; text-transform: capitalize; }
.status-pill { color: #59625a; background: #edf0eb; }
.status-pill.accepted, .status-pill.attending { color: #255d3d; background: #e4f2e8; }
.status-pill.declined, .status-pill.cancelled { color: #8d3d3a; background: #f7e8e6; }
.status-pill.partial, .status-pill.opened { color: #805a18; background: #f6edd9; }
.status-pill.sent { color: #3f5f79; background: #e6eef5; }
.tag { color: var(--forest); background: var(--gold-light); }
.side-badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.side-badge.laura { color: #744763; background: #f4e8ef; }
.side-badge.james { color: #375a70; background: #e5eff5; }
.side-badge.shared { color: #52604b; background: #e9eee4; }
.mini-stat.side-laura { border-color: #e8cfdf; background: #fff9fc; }
.mini-stat.side-james { border-color: #cfe0ea; background: #f8fcff; }
.mini-stat.side-shared { border-color: #d7dfd1; background: #fbfdf9; }
.group-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }
.group-counts div { padding: 10px; border-radius: 12px; text-align: center; background: #f4f6f2; }
.group-counts strong, .group-counts span { display: block; }
.group-counts strong { font-family: var(--serif); font-size: 1.45rem; font-weight: 400; }
.group-counts span { margin-top: 2px; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.card-actions { display: flex; gap: 8px; margin-top: auto; flex-wrap: wrap; }
.card-actions button { flex: 1; min-width: 80px; }

.mini-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.mini-stat { min-width: 120px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.mini-stat strong { margin-right: 7px; font-size: 1.2rem; }
.mini-stat span { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: white; }
table { width: 100%; border-collapse: collapse; }
th { padding: 14px 18px; color: var(--muted); font-size: .75rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; background: #f1f3ef; }
td { padding: 15px 18px; border-top: 1px solid #ebeee9; vertical-align: middle; }
td:last-child { width: 100px; text-align: right; }
.name-cell strong, .name-cell small { display: block; }
.name-cell small { margin-top: 3px; color: var(--muted); }

.send-actions { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.send-actions .check-row { margin: 0; }
.send-actions > div { display: flex; gap: 9px; }
.send-list { display: grid; gap: 12px; }
.send-row { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(220px, 1.2fr) auto; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 17px; background: white; }
.send-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--forest); }
.send-row h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.28rem; font-weight: 400; }
.send-row p { margin: 0; color: var(--muted); font-size: .86rem; }
.link-preview { min-width: 0; padding: 10px 12px; overflow: hidden; border-radius: 10px; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; background: #f3f5f1; }
.send-row-actions { display: flex; gap: 7px; }

.response-list, .expense-list, .document-list { display: grid; gap: 14px; }
.response-card, .expense-card, .document-card { border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 8px 26px rgba(27,43,33,.035); }
.response-summary, .expense-summary { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(140px, .65fr) minmax(140px, .65fr) auto; align-items: center; gap: 18px; padding: 20px 22px; }
.response-summary h3, .expense-summary h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.45rem; font-weight: 400; }
.response-summary p, .expense-summary p { margin: 0; color: var(--muted); font-size: .87rem; }
.response-details, .expense-details { display: none; padding: 0 22px 22px; }
.response-card.open .response-details, .expense-card.open .expense-details { display: block; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 18px; border-top: 1px solid #eaede8; }
.detail-box { padding: 14px; border-radius: 12px; background: #f6f7f4; }
.detail-box strong, .detail-box span { display: block; }
.detail-box strong { margin-bottom: 5px; font-size: .77rem; text-transform: uppercase; }
.detail-box span { color: var(--muted); line-height: 1.5; white-space: pre-wrap; }
.money { font-family: var(--serif); font-size: 1.45rem; }
.money small { display: block; margin-top: 3px; color: var(--muted); font-family: var(--sans); font-size: .75rem; }
.balance.owing { color: var(--warning); }
.balance.paid { color: #2f6c48; }
.transaction-list { display: grid; gap: 8px; margin-top: 16px; }
.transaction-row { display: grid; grid-template-columns: 110px 1fr 120px auto; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 11px; background: #f5f6f3; }
.transaction-row strong { text-align: right; }
.expense-detail-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.document-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 18px 20px; }
.document-icon { display: grid; place-items: center; width: 48px; aspect-ratio: 1; border-radius: 14px; color: var(--forest); background: var(--gold-light); font-weight: 900; }
.document-card h3 { margin: 0 0 4px; font-size: 1rem; }
.document-card p { margin: 0; color: var(--muted); font-size: .82rem; }
.document-card-actions { display: flex; gap: 7px; }

.panel-help { margin: -10px 0 18px; color: var(--muted); line-height: 1.5; }
.seating-unseated { margin-bottom: 22px; }
.guest-chip-list { display: flex; flex-wrap: wrap; gap: 10px; min-height: 54px; }
.guest-chip { display: flex; align-items: center; gap: 12px; min-width: 210px; max-width: 100%; padding: 10px 11px 10px 14px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 4px 14px rgba(27,43,33,.04); cursor: grab; }
.guest-chip.dragging { opacity: .45; }
.guest-chip > div { min-width: 0; flex: 1; }
.guest-chip strong, .guest-chip small { display: block; }
.guest-chip strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.guest-chip small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.guest-chip .link-button { flex: 0 0 auto; font-size: .77rem; }
.seating-grid { display: grid; grid-template-columns: repeat(2, minmax(320px, 1fr)); gap: 18px; }
.seating-card { padding: 23px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 10px 32px rgba(27,43,33,.045); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.seating-card.drop-active { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 16px 34px rgba(35,56,44,.13); }
.seating-card-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; }
.seating-card-heading h2 { margin: 2px 0 3px; font-family: var(--serif); font-size: 1.65rem; font-weight: 400; }
.seating-card-heading p { margin: 0; color: var(--muted); font-size: .82rem; }
.seating-card-heading .eyebrow { font-size: .65rem; }
.seating-card-actions { display: flex; gap: 5px; }
.table-shape { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid var(--gold); color: var(--forest); background: var(--gold-light); }
.table-shape.round { border-radius: 50%; }
.table-shape.square { border-radius: 8px; }
.table-shape.rectangle { width: 72px; border-radius: 8px; }
.table-shape span { font-family: var(--serif); font-size: 1.25rem; }
.table-progress { margin: 17px 0; }
.table-notes { margin: -3px 0 15px; color: var(--muted); font-size: .84rem; line-height: 1.45; }
.table-guests { padding: 13px; border-radius: 15px; background: #f5f7f3; }
.table-guests .guest-chip { min-width: min(100%, 230px); }
.drop-hint { width: 100%; margin: 4px; color: var(--muted); text-align: center; font-size: .82rem; }
.seating-empty { grid-column: 1 / -1; }

.email-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(400px, 1.1fr); gap: 22px; align-items: start; }
.email-composer textarea { min-height: 280px; line-height: 1.6; }
.email-composer .inline-note { margin: 16px 0; }
.email-composer .form-message { color: var(--forest); }
.email-recipients-panel { max-height: 760px; overflow: hidden; }
.compact-check { margin: 0; font-size: .82rem; }
.email-toolbar { margin-bottom: 14px; }
.recipient-list { display: grid; gap: 7px; max-height: 570px; padding-right: 4px; overflow-y: auto; }
.recipient-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 13px; background: #fafbf9; cursor: pointer; }
.recipient-row:hover { border-color: #adb8ad; background: white; }
.recipient-row input { width: 19px; height: 19px; accent-color: var(--forest); }
.recipient-row span:nth-child(2) { min-width: 0; }
.recipient-row strong, .recipient-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recipient-row small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.campaign-history-panel { margin-top: 22px; }
.campaign-list { display: grid; gap: 9px; }
.campaign-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px; border-radius: 13px; background: #f5f7f3; }
.campaign-row strong, .campaign-row small { display: block; }
.campaign-row small { margin-top: 3px; color: var(--muted); font-size: .75rem; }
.campaign-row > :last-child { text-align: right; }
.email-type { display: inline-flex; padding: 6px 9px; border-radius: 999px; color: var(--forest); background: var(--gold-light); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.email-type.thank_you { color: #744763; background: #f4e8ef; }

.modal { width: min(94vw, 680px); max-height: min(92vh, 900px); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 35px 90px rgba(17,28,21,.3); }
.modal::backdrop { background: rgba(20,31,24,.62); backdrop-filter: blur(4px); }
.modal-inner { position: relative; padding: 30px; }
.modal-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 38px; aspect-ratio: 1; border: 0; border-radius: 50%; color: var(--muted); font-size: 1.6rem; background: #eef0ec; }
.modal h2 { margin: 0 45px 8px 0; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; letter-spacing: -.03em; }
.modal-intro { margin: 0 45px 24px 0; color: var(--muted); line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .84rem; font-weight: 850; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }
.modal .form-message { margin: 10px 0 0; }
.inline-note { padding: 13px 15px; border-radius: 12px; color: #735218; font-size: .86rem; line-height: 1.5; background: #f8f0dd; }

.toast-region { position: fixed; z-index: 80; right: 22px; bottom: 22px; display: grid; gap: 10px; width: min(390px, calc(100vw - 44px)); }
.toast { padding: 15px 17px; border-radius: 14px; color: white; background: var(--forest-deep); box-shadow: 0 18px 45px rgba(16,27,20,.25); animation: toastIn .25s ease; }
.toast.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
.loading { min-height: 160px; display: grid; place-items: center; color: var(--muted); }
.mobile-scrim { display: none; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .send-row { grid-template-columns: auto 1fr auto; }
  .send-row .link-preview { grid-column: 2 / -1; grid-row: 2; }
  .email-layout { grid-template-columns: 1fr; }
  .email-recipients-panel { max-height: none; }
}

@media (max-width: 860px) {
  .login-screen { grid-template-columns: 1fr; align-content: center; padding: 26px 0; background: linear-gradient(180deg, var(--forest-deep) 0 30%, white 30%); }
  .login-art { min-height: 180px; background: transparent; }
  .login-monogram { width: 105px; font-size: 2.1rem; }
  .login-art p { margin-top: 12px; }
  .login-card { width: min(100% - 28px, 470px); padding: 28px; }
  .sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  body.menu-open .sidebar { transform: translateX(0); }
  .mobile-header { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding: 9px 15px; border-bottom: 1px solid var(--line); background: rgba(246,245,240,.94); backdrop-filter: blur(12px); }
  .mobile-header strong, .mobile-header small { display: block; text-align: center; }
  .mobile-header strong { font-family: var(--serif); font-weight: 400; }
  .mobile-header small { color: var(--muted); font-size: .7rem; }
  .menu-button, .avatar-button { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: white; }
  .avatar-button { border-radius: 50%; color: white; font-family: var(--serif); font-size: .75rem; background: var(--forest); }
  .main-content { margin-left: 0; padding: 30px 17px 65px; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 19; background: rgba(12,20,15,.5); }
  body.menu-open .mobile-scrim { display: block; }
  .overview-grid { grid-template-columns: 1fr; }
  .seating-grid { grid-template-columns: 1fr; }
  .response-summary, .expense-summary { grid-template-columns: 1fr 1fr auto; }
  .response-summary > :first-child, .expense-summary > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .page-heading { align-items: stretch; flex-direction: column; margin-bottom: 25px; }
  .page-heading h1 { font-size: clamp(2.4rem, 14vw, 3.8rem); }
  .page-heading .primary-button { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 130px; padding: 18px; }
  .stat-card strong { font-size: 2rem; }
  .panel { padding: 20px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar .search-field, .toolbar select, .toolbar .secondary-button { width: 100%; }
  .card-grid { grid-template-columns: 1fr; }
  .table-wrap { border-radius: 15px; }
  th, td { padding: 12px 13px; white-space: nowrap; }
  .send-actions { align-items: stretch; flex-direction: column; }
  .send-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
  .send-row { grid-template-columns: auto 1fr; }
  .send-row-actions { grid-column: 1 / -1; }
  .send-row-actions button { flex: 1; }
  .send-row .link-preview { grid-column: 1 / -1; }
  .response-summary, .expense-summary { grid-template-columns: 1fr auto; padding: 17px; }
  .response-summary > :first-child, .expense-summary > :first-child { grid-column: 1 / -1; }
  .response-details, .expense-details { padding: 0 17px 17px; }
  .detail-grid { grid-template-columns: 1fr; }
  .transaction-row { grid-template-columns: 1fr auto; }
  .transaction-row > :first-child { grid-column: 1 / -1; }
  .document-card { grid-template-columns: auto 1fr; }
  .document-card-actions { grid-column: 1 / -1; }
  .document-card-actions a, .document-card-actions button { flex: 1; }
  .seating-card-heading { grid-template-columns: auto 1fr; }
  .seating-card-actions { grid-column: 1 / -1; }
  .guest-chip { width: 100%; min-width: 0; }
  .email-toolbar { display: grid; }
  .campaign-row { grid-template-columns: auto 1fr; }
  .campaign-row > :last-child { grid-column: 2; text-align: left; }
  .modal-inner { padding: 24px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
