/* Focused member delete modal polish. */
.delete-member-confirm{margin-top:20px}
.delete-member-person{display:flex!important;align-items:center!important;gap:14px!important;padding:14px 16px!important;border-radius:17px!important;background:#f5f8fc!important;border:1px solid #dce6f2!important;min-width:0!important}
.delete-member-person .member-photo,.delete-member-person .member-photo.fallback{display:grid!important;place-items:center!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;max-width:52px!important;max-height:52px!important;flex:0 0 52px!important;aspect-ratio:1/1!important;border-radius:15px!important;object-fit:cover!important;padding:0!important;margin:0!important;line-height:1!important;overflow:hidden!important;box-sizing:border-box!important;background:#e8f3ff!important;color:#2467c9!important;border:1px solid #d3e5f7!important;font-size:16px!important;font-weight:800!important}
.delete-member-person>div{min-width:0!important;flex:1!important}
.delete-member-person b,.delete-member-person span{display:block}
.delete-member-person b{font-size:16px}
.delete-member-person span{font-size:13px;color:#71809a;margin-top:3px;line-height:1.45}
.delete-member-title{background:transparent!important;border:0!important;padding:0!important}
.delete-member-title h2{margin:3px 0 0}
.delete-member-title .icon-btn{flex:0 0 40px}

html[data-theme="dark"] .modal-wrap{background:rgba(3,10,18,.82)!important;backdrop-filter:blur(10px)!important;padding:18px!important;display:grid!important;place-items:center!important}
html[data-theme="dark"] .modal{background:#0d1d2d!important;color:#edf5ff!important;border:1px solid #29445b!important;box-shadow:0 28px 80px rgba(0,0,0,.48)!important}
html[data-theme="dark"] .delete-member-title{background:transparent!important;color:#f3f8ff!important}
html[data-theme="dark"] .delete-member-title h2{color:#f5f8ff!important}
html[data-theme="dark"] .delete-member-title .eyebrow{color:#7f9bbb!important}
html[data-theme="dark"] .delete-member-title .icon-btn{background:#142b40!important;color:#dce8f5!important;border:1px solid #304d65!important;box-shadow:none!important}
html[data-theme="dark"] .delete-member-person{background:#11263a!important;border-color:#29465f!important}
html[data-theme="dark"] .delete-member-person b{color:#f2f7ff!important}
html[data-theme="dark"] .delete-member-person span{color:#9db0c5!important}
html[data-theme="dark"] .delete-member-person .member-photo.fallback{background:#15344c!important;color:#79b7ff!important;border:1px solid #31536b!important}
html[data-theme="dark"] .delete-member-confirm .btn:not(.danger){background:#142b40!important;color:#e4edf8!important;border-color:#304d65!important}
html[data-theme="dark"] .delete-member-confirm .btn.danger{background:#3a1c27!important;color:#ff94a4!important;border-color:#663040!important}

@media(max-width:900px){
  .modal:has(.delete-member-confirm){width:100%!important;max-width:520px!important;height:auto!important;min-height:0!important;max-height:calc(100dvh - 36px)!important;border-radius:24px!important;padding:20px!important;overflow:auto!important}
  .delete-member-person{padding:13px!important;gap:12px!important}
  .delete-member-person .member-photo,.delete-member-person .member-photo.fallback{width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;max-width:48px!important;max-height:48px!important;flex:0 0 48px!important}
  .delete-member-confirm .actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
  .delete-member-confirm .btn{min-height:48px!important}
}

/* Add/Edit Member + Add/Edit Bazar: premium full-width dark headers. */
html[data-theme="dark"] .modal:has(#memberForm),
html[data-theme="dark"] .modal:has(#bazarForm){background:linear-gradient(180deg,#0d2132 0%,#0a1b2a 100%)!important;border-color:#2d4d66!important;box-shadow:0 30px 90px rgba(0,0,0,.55)!important}
html[data-theme="dark"] .modal:has(#memberForm)>.modal-title,
html[data-theme="dark"] .modal:has(#bazarForm)>.final-bazar-modal-title{background:linear-gradient(118deg,#12344b 0%,#10443f 58%,#123b48 100%)!important;color:#f4f9ff!important;border:0!important;border-bottom:1px solid rgba(92,151,165,.28)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 10px 25px rgba(0,0,0,.14)!important}
html[data-theme="dark"] .modal:has(#memberForm)>.modal-title h2,
html[data-theme="dark"] .modal:has(#bazarForm)>.final-bazar-modal-title h2{color:#f7fbff!important;text-shadow:none!important;letter-spacing:-.025em!important}
html[data-theme="dark"] .modal:has(#memberForm)>.modal-title .eyebrow{color:#9fc0d2!important;opacity:1!important}
html[data-theme="dark"] .modal:has(#memberForm)>.modal-title .icon-btn,
html[data-theme="dark"] .modal:has(#bazarForm)>.final-bazar-modal-title .icon-btn{display:grid!important;place-items:center!important;width:42px!important;height:42px!important;flex:0 0 42px!important;padding:0!important;border:1px solid rgba(132,183,199,.24)!important;border-radius:14px!important;background:rgba(9,35,52,.72)!important;color:#b8d8ec!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 7px 18px rgba(0,0,0,.18)!important;backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;font-size:20px!important;line-height:1!important}
html[data-theme="dark"] .modal:has(#memberForm)>.modal-title .icon-btn:active,
html[data-theme="dark"] .modal:has(#bazarForm)>.final-bazar-modal-title .icon-btn:active{transform:scale(.96)!important;background:rgba(16,52,72,.9)!important}
html[data-theme="dark"] .modal:has(#memberForm) .photo-picker{background:linear-gradient(135deg,#112a3e,#10332f)!important;border:1px solid #2e4c62!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important}
html[data-theme="dark"] .modal:has(#memberForm) .photo-picker small{color:#9cb0c3!important}
html[data-theme="dark"] .modal:has(#memberForm) .photo-btn{background:#15334a!important;color:#edf6ff!important;border-color:#35556d!important}
html[data-theme="dark"] .modal:has(#bazarForm) .final-bazar-meta{background:linear-gradient(145deg,#10263a,#0d2132)!important;border-color:#2d4b62!important}
html[data-theme="dark"] .modal:has(#bazarForm) .final-items-title{border-color:#29465c!important}

/* Date/month controls deliberately have no global size/width override here.
   Each page owns its date control so compact chips, meal controls and form fields cannot override one another. */
input[type="date"],input[type="month"]{font-variant-numeric:tabular-nums}

@media(max-width:760px){
  html[data-theme="dark"] .modal-wrap:has(#memberForm),
  html[data-theme="dark"] .modal-wrap:has(#bazarForm){padding:0!important;align-items:stretch!important;place-items:stretch!important}
  html[data-theme="dark"] .modal:has(#memberForm),
  html[data-theme="dark"] .modal:has(#bazarForm){width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding:16px 14px calc(16px + env(safe-area-inset-bottom))!important;overflow-y:auto!important}
  html[data-theme="dark"] .modal:has(#memberForm)>.modal-title,
  html[data-theme="dark"] .modal:has(#bazarForm)>.final-bazar-modal-title{position:sticky!important;top:-16px!important;z-index:30!important;margin:-16px -14px 16px!important;padding:calc(18px + env(safe-area-inset-top)) 18px 16px!important;border-radius:0!important;align-items:center!important}
  html[data-theme="dark"] .modal:has(#memberForm)>.modal-title>div{min-width:0!important;flex:1!important}
  html[data-theme="dark"] .modal:has(#memberForm)>.modal-title h2{margin:3px 0 0!important;font-size:25px!important;line-height:1.08!important}
  html[data-theme="dark"] .modal:has(#bazarForm)>.final-bazar-modal-title h2{margin:0!important;font-size:25px!important;line-height:1.08!important}
}
