/* Midnight navy, cool silver and generous spacing; native admin remains usable. */
:root, html[data-theme="light"], html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #b6c4da; --secondary: #111e35; --accent: #edf2fb;
  --primary-fg: #081124; --body-fg: #e7edf7; --body-bg: #080f21;
  --body-quiet-color: #acbdd5; --body-medium-color: #c6d1e4; --body-loud-color: #f3f6fc;
  --header-color: #d5dfef; --header-branding-color: #e7edf7; --header-bg: #0d172b; --header-link-color: #e7edf7;
  --breadcrumbs-fg: #b5c3da; --breadcrumbs-link-fg: #e0e8f5; --breadcrumbs-bg: #0a1325;
  --link-fg: #cbdaf0; --link-hover-color: #fff; --link-selected-fg: #fff;
  --hairline-color: #25344c; --border-color: #33435c; --darkened-bg: #0c172b;
  --selected-bg: #1b2c47; --selected-row: #152b43; --error-fg: #ffbdbd;
  --message-success-bg: #16342e; --message-warning-bg: #382f1b; --message-error-bg: #3c232b;
  --button-fg: #071123; --button-bg: #c2d0e4; --button-hover-bg: #e7effc;
  --default-button-bg: #c2d0e4; --default-button-hover-bg: #e7effc;
  --close-button-bg: #24344e; --close-button-hover-bg: #374c6d;
  --delete-button-bg: #713844; --delete-button-hover-bg: #8a4352;
  --object-tools-fg: #e3ecfa; --object-tools-bg: #263952; --object-tools-hover-bg: #3c5270;
  --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-monospace: ui-monospace, SFMono-Regular, monospace;
}
* { box-sizing: border-box; }
body { font-family: var(--font-family-primary); font-size: 15px; line-height: 1.55; background: radial-gradient(ellipse at 75% 0, #19294066, transparent 55%), var(--body-bg); }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #c8defd; outline-offset: 4px; }
h1, h2, h3 { color: #f0f4fc; }
h1 { font-family: Georgia, serif; font-weight: 400; font-size: clamp(28px, 5vw, 38px); line-height: 1.2; }
#container { min-height: 100dvh; width: 100%; }
#header { padding: 16px max(18px, calc((100vw - 1120px) / 2)); gap: 18px; flex-wrap: wrap; border-bottom: 1px solid #7184a12b; }
.portal-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.portal-brand img { object-fit: contain; }
.portal-brand span { color: #eef3fc; font: 400 25px/1.2 Georgia, serif; }
.portal-brand small { display: block; color: #9cafcd; font: 11px/1.5 var(--font-family-primary); letter-spacing: .04em; margin-top: 4px; }
#user-tools { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin: 0; padding: 0; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
#user-tools a, #logout-form button { border: 0; min-height: 44px; display: inline-flex; align-items: center; color: #c8d5e9; font: inherit; text-transform: none; text-decoration: none; }
#logout-form { margin: 0; display: inline; }
#logout-form button { padding: 0; background: none; cursor: pointer; }
#content { width: 100%; max-width: 1160px; margin: 0 auto; padding: 28px 18px 40px; }
.dashboard #content { width: 100%; max-width: 1160px; }
#content-main { float: none; width: 100%; }
#content > h1 { margin-bottom: 24px; }
.portal-footer { margin-top: auto; padding: 24px 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 30px; border-top: 1px solid #7184a12b; color: #8fa3c2; font-size: 12px; }
.breadcrumbs { padding: 14px max(18px, calc((100vw - 1120px) / 2)); font-size: 12px; }
.eyebrow { color: #9fb2d0; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: .13em; line-height: 1.7; margin: 0 0 8px; }
.muted { color: #aebed5; font-size: 14px; line-height: 1.7; }
.primary, .secondary, button.primary, input[type=submit] { min-height: 46px; border-radius: 10px; padding: 12px 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font: 600 13px/1.4 var(--font-family-primary); cursor: pointer; white-space: normal; }
.primary, button.primary { color: #091225; background: linear-gradient(120deg, #ecf2fb, #b3c3dd); border: 1px solid #e0e8f6; box-shadow: 0 4px 18px #0002; }
.primary:link, .primary:visited { color: #091225; }
.primary:hover { color: #091225; background: #fff; }
.secondary { color: #d8e4f5; border: 1px solid #425674; background: #112039; }
.secondary:hover { background: #1b2e4b; color: #fff; }
.welcome { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 4px 0 24px; }
.welcome h1 { margin: 0 0 12px; overflow-wrap: anywhere; }
.welcome h1 span { color: #b0c4e4; }
.welcome .muted { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 24px 0; }
.stats > div { display: flex; flex-direction: column; padding: 18px 12px; background: #111d32; border: 1px solid #667a9a3b; border-radius: 12px; }
.stats strong { color: #e6eefb; font: 400 30px/1.2 Georgia, serif; }
.stats span { color: #a5b8d3; font-size: 11px; margin-top: 8px; }
.person-card { border: 1px solid #6f86a548; border-radius: 16px; padding: 18px; background: linear-gradient(140deg, #152239, #0e192b); }
.self-card { border-color: #a4b8d777; }
.person-top { display: flex; align-items: flex-start; gap: 12px; }
.avatar { background: #20334f; color: #cedcf1; border: 1px solid #89a1c544; border-radius: 50%; flex: 0 0 42px; height: 42px; display: grid; place-items: center; font: 400 20px Georgia, serif; }
.person-name { min-width: 0; flex: 1; }
.person-name h2, .person-name h3 { font-size: 16px; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; }
.person-name .eyebrow { margin-bottom: 5px; }
.status { display: inline-block; padding: 3px 8px; border: 1px solid #7287a455; border-radius: 20px; font-size: 10px; color: #afc0d9; }
.status-yes { color: #bce8d8; border-color: #5b9c8755; background: #17342f; }
.status-no { color: #dfc2d1; border-color: #a4748f55; background: #302236; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; color: #d1dff4; font-size: 12px; text-decoration: underline; text-underline-offset: 5px; }
.rsvp-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.rsvp { border: 1px solid #3b5070; border-radius: 9px; background: #0c182c; color: #c3d1e7; font: 500 12px/1.4 var(--font-family-primary); cursor: pointer; padding: 12px 6px; min-height: 46px; }
.rsvp:hover { background: #243853; }
.rsvp.selected { background: #cedcf0; color: #0b172b; border-color: #f1f5ff; }
.section-heading { display: flex; flex-direction: column; gap: 14px; margin: 32px 0 18px; }
.section-heading h2 { font: 400 25px Georgia, serif; margin: 0; }
.guest-grid { display: grid; gap: 16px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 34px 20px; border: 1px dashed #667d9e77; border-radius: 16px; color: #9fb3d0; }
.empty-star { display: block; font-size: 38px; color: #b7cbe9; }
.empty-state h3 { font-weight: 500; font-size: 16px; margin: 12px 0; }
.empty-state p { max-width: 420px; margin: 0 auto 12px; font-size: 13px; }
.organizer-tools { padding: 24px 0 0; margin-top: 36px; border-top: 1px solid #3d506e; }
.organizer-tools h2 { font-size: 17px; }
.organizer-tools p { color: #9db0cc; font-size: 13px; }
.organizer-tools .secondary { margin: 0 8px 10px 0; }
.auth-page #content { max-width: 540px; padding-top: 24px; }
.auth-page #content-main { width: 100%; }
.auth-card { width: 100%; max-width: 490px; margin: 0 auto; border: 1px solid #6b83a24d; border-radius: 20px; padding: 24px 20px; background: #101b2fed; box-shadow: 0 20px 80px #0003; }
.auth-card h1 { font: 400 28px/1.25 Georgia, serif; margin: 10px 0; }
.auth-logo { display: block; width: 210px; max-width: 85%; height: auto; object-fit: contain; margin: 0 auto 30px; }
.auth-page { background-image: linear-gradient(#080f21ed, #080f21f5), url("../images/garden.85236745fdc8.png"); background-size: cover; background-position: center; }
.portal-form { margin-top: 24px; }
.portal-form .field { margin-bottom: 20px; }
.portal-form label { display: block; color: #d9e4f4; font-weight: 500; font-size: 13px; margin: 0 0 8px; }
.portal-form input:not([type=hidden]), .portal-form select, .portal-form textarea { width: 100%; max-width: 100%; font: 400 16px/1.5 var(--font-family-primary); border: 1px solid #506685; border-radius: 9px; padding: 12px; background: #091427; color: #e5edfa; min-height: 48px; }
.portal-form .primary { width: 100%; margin-bottom: 12px; }
.portal-form .secondary { margin-top: 8px; }
.portal-form .help, .portal-form .help li { color: #90a4c3; font-size: 11px; line-height: 1.6; }
.portal-form .help { margin-top: 7px; }
.portal-form .help ul { padding-left: 18px; margin: 8px 0; }
.errorlist { color: #ffc9cd; padding: 8px 0; margin: 0; list-style: none; font-size: 12px; }
.errornote { color: #ffd7dc; background: #3c2532; border-color: #98627b; border-radius: 10px; }
.auth-alternative { margin: 24px 0 0; font-size: 13px; text-align: center; color: #9db1cd; }
.auth-alternative a { color: #e1ebfa; text-decoration: underline; text-underline-offset: 4px; }
.form-card { max-width: 650px; padding: 24px; border: 1px solid #6b83a24d; border-radius: 16px; background: #101b2f; }
/* Native Django model forms, changelists, delete and password pages. */
.module { border: 1px solid #33435c; border-radius: 12px; overflow: hidden; background: #101b2f; margin-bottom: 20px; }
.module h2, .module caption, .inline-group h2 { background: #1a2b44; color: #e7effb; font-size: 13px; }
input, textarea, select, .vTextField { background: #091427; color: #e4edfa; border: 1px solid #506685; border-radius: 8px; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select { min-height: 44px; }
input[type=submit], .button, a.button { color: #071123; }
input[type=submit].default { background: #d4e0f2; }
.aligned label { color: #cbd8ec; }
.aligned .form-row input, .aligned .form-row select, .vTextField { max-width: 100%; }
.form-row { padding: 18px; border-bottom-color: #26364e; }
.submit-row { background: #111f35; border: 1px solid #33435c; border-radius: 12px; display: flex; flex-wrap: wrap; gap: 10px; }
.submit-row > * { margin: 0 !important; }
.submit-row a.deletelink { min-height: 44px; border-radius: 8px; }
.object-tools a { padding: 12px 16px; border-radius: 9px; }
#changelist .results { overflow-x: auto; }
#changelist table { min-width: 400px; }
ul.messagelist { padding: 12px 18px 0; }
ul.messagelist li { border-radius: 10px; padding-top: 14px; padding-bottom: 14px; }
#toolbar, #changelist-filter { background: #101c31; }
#changelist-filter h2 { background: #1a2b44; }
.help, p.help, form .help, div.help, form div.help { color: #9fb3d0; }
@media (min-width: 700px) {
  #content { padding: 42px 24px 60px; }
  .welcome, .section-heading { flex-direction: row; align-items: center; justify-content: space-between; }
  .welcome .secondary { flex-shrink: 0; }
  .stats { gap: 18px; }
  .stats > div { padding: 22px; }
  .stats strong { font-size: 38px; }
  .stats span { font-size: 12px; }
  .guest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-card { padding: 24px; }
  .self-card { max-width: 100%; }
  .auth-card { padding: 34px; }
}
@media (max-width: 380px) {
  #header { padding-inline: 14px; }
  #content { padding-inline: 14px; }
  .person-card { padding: 14px; }
  .stats > div { padding: 16px 9px; }
  .stats span { font-size: 10px; }
  .portal-brand small { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
/* Admin's responsive form rows must fit inside their padded card. */
.aligned .form-row > div { min-width: 0; width: 100%; max-width: 100%; }
.aligned .form-row .flex-container { min-width: 0; max-width: 100%; }
@media (max-width: 767px) {
  .aligned .form-row { display: block; }
  .aligned .form-row input:not([type=checkbox]):not([type=radio]),
  .aligned .form-row select, .aligned .form-row textarea { width: 100%; max-width: 100%; }
}

.welcome { flex-wrap: wrap; }
.welcome-actions { display: grid; grid-template-columns: 1.2fr 1fr; align-items: stretch; gap: 10px; width: 100%; max-width: 100%; }
.welcome-actions > a { height: 46px; min-height: 46px; min-width: 0; margin: 0; padding: 10px 6px; gap: 6px; text-align: center; white-space: nowrap; font-size: clamp(10px, 2.8vw, 13px); }
.welcome-actions svg { display: block; flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 700px) {
  .welcome-actions { width: auto; grid-template-columns: repeat(2, max-content); }
  .welcome-actions > a { padding: 12px 16px; gap: 8px; font-size: 13px; }
}

.logout-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.logout-actions > a { text-align: center; }
@media (max-width: 480px) { .logout-actions > a { width: 100%; } }
