:root {
  --green-950: #063d31;
  --green-900: #075b45;
  --green-800: #087155;
  --green-700: #17826b;
  --green-100: #dff2e9;
  --green-50: #eef8f3;
  --gold-600: #bc8611;
  --gold-500: #d9a514;
  --gold-400: #f2c94c;
  --gold-100: #fff1bd;
  --ivory: #faf8f0;
  --cream: #f4efe1;
  --ink: #12372d;
  --muted: #566660;
  --line: #dfe5e1;
  --blue: #368fd7;
  --red: #c94b40;
  --white: #fff;
  --shadow: 0 16px 45px rgba(17, 55, 45, 0.09);
  --shadow-sm: 0 6px 18px rgba(17, 55, 45, 0.08);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--ivory);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-width: 320px; min-height: 100vh; background: var(--ivory);
  color: var(--ink); font-size: 1rem; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(217, 165, 20, 0.38);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--green-950); line-height: 1.2; }
h1 { letter-spacing: -0.045em; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.eyebrow {
  margin-bottom: 6px;
  color: var(--gold-600);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-icon {
  display: grid; width: 40px; height: 40px; place-items: center;
  border: 1px solid currentColor; border-radius: 12px; color: var(--gold-400);
}
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 1rem; font-weight: 750; }
.brand small { margin-top: 4px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
.brand-dark { color: var(--green-900); }
.brand-light { color: white; }

.mobile-header {
  position: fixed; z-index: 20; top: 0; right: 0; left: 0;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 10px clamp(18px, 4vw, 48px);
  background: rgba(250, 248, 240, 0.87); border-bottom: 1px solid rgba(7, 91, 69, 0.08);
  backdrop-filter: blur(18px);
}
.header-actions { display: flex; gap: 9px; }
.icon-button, .avatar-button {
  display: inline-grid; width: 42px; height: 42px; padding: 0; place-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--green-900);
}
.avatar-button { border-radius: 50%; background: var(--green-900); color: white; font-weight: 800; }
.screen { display: none; min-height: 100vh; padding: 102px clamp(18px, 5vw, 72px) 120px; }
.screen.active { display: block; animation: screen-in 0.35s ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }

.welcome-screen {
  position: relative; overflow: hidden; padding-top: 120px; text-align: center;
  background:
    radial-gradient(circle at 72% 16%, rgba(242, 201, 76, 0.18), transparent 21%),
    linear-gradient(155deg, #fffdf7 0%, var(--ivory) 54%, #eaf5ef 100%);
}
.welcome-screen.active { display: flex; align-items: center; justify-content: center; }
.welcome-content { position: relative; z-index: 2; max-width: 680px; margin-top: -30px; }
.hero-mark {
  display: grid; width: 92px; height: 92px; margin: 0 auto 24px; place-items: center;
  border: 1px solid rgba(217, 165, 20, 0.32); border-radius: 28px;
  background: rgba(255,255,255,0.76); box-shadow: var(--shadow-sm); color: var(--green-900);
}
.hero-mark svg { width: 62px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.welcome-content h1 {
  margin-bottom: 18px; font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 4.7rem); line-height: 1.03; letter-spacing: -0.04em;
}
.welcome-content h1 span { color: var(--green-700); font-style: normal; }
.hero-copy { max-width: 440px; margin: 0 auto 20px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.16rem); }
.period-pill {
  display: inline-flex; align-items: center; min-height: 38px; margin-bottom: 28px; padding: 8px 16px;
  border: 1px solid rgba(217, 165, 20, 0.42); border-radius: 999px; background: rgba(255,255,255,.76);
  color: var(--gold-600); font-size: .85rem; font-weight: 700;
}
.skeleton { animation: pulse 1.2s infinite alternate; }
@keyframes pulse { to { opacity: .55; } }
.personal-space-button {
  display: flex; min-height: 46px; margin: 10px auto 0; padding: 10px 18px; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid #b9d0c7; border-radius: 13px; background: rgba(255,255,255,.72);
  color: var(--green-900); font-weight: 800;
}
.personal-space-button:hover { border-color: var(--green-700); background: white; }
.primary-button, .secondary-button, .text-button {
  display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 12px;
  border-radius: 13px; padding: 11px 18px; font-weight: 750; text-decoration: none;
}
.primary-button {
  border: 1px solid var(--green-900); background: var(--green-900); color: white;
  box-shadow: 0 8px 20px rgba(7, 91, 69, .2);
}
.primary-button:hover { background: var(--green-800); transform: translateY(-1px); }
.secondary-button { border: 1px solid #b9cec5; background: white; color: var(--green-900); }
.text-button { min-height: 40px; border: 0; background: transparent; color: var(--green-800); }
.wide { width: 100%; }
.privacy-note { margin-top: 24px; color: var(--muted); font-size: .78rem; }
.privacy-note span { color: var(--gold-500); }
.mosque-silhouette {
  position: absolute; z-index: 0; right: 0; bottom: 0; left: 0; height: 150px;
  opacity: .12; background: linear-gradient(0deg, var(--green-900) 0 38px, transparent 38px);
}
.mosque-silhouette span { position: absolute; bottom: 36px; left: 50%; display: block; background: var(--green-900); }
.dome { width: 190px; height: 105px; border-radius: 110px 110px 5px 5px; transform: translateX(-50%); }
.dome.large::before { content: ""; position: absolute; top: -22px; left: 92px; width: 6px; height: 28px; background: var(--green-900); }
.dome.small { width: 110px; height: 62px; transform: translateX(-185px); }
.dome.small.right { transform: translateX(75px); }
.minaret { width: 24px; height: 128px; transform: translateX(-265px); }
.minaret::before { content:""; position:absolute; top:-30px; left:-6px; border-right:18px solid transparent; border-bottom:30px solid var(--green-900); border-left:18px solid transparent; }
.minaret.right { transform: translateX(240px); }

.page-heading {
  display: flex; max-width: 1240px; margin: 0 auto 24px; align-items: center; gap: 16px;
}
.page-heading h2 { margin: 2px 0 0; font-size: clamp(1.55rem, 3vw, 2.3rem); }
.edit-mode-banner {
  display: flex; max-width: 1240px; margin: 0 auto 18px; padding: 13px 16px; align-items: center; gap: 12px;
  border: 1px solid #d8bf71; border-radius: 15px; background: #fff9e9; color: #67531f;
}
.edit-mode-banner > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #f7e6ad; }
.edit-mode-banner div { display: flex; flex-direction: column; }
.edit-mode-banner small { margin-top: 2px; color: #766742; }
.edit-mode-banner #participant-space-logout { min-height: 36px; margin-left: auto; padding: 6px 10px; color: var(--green-900); }
.my-assignments-card {
  max-width: 1240px; margin: 0 auto 18px; padding: 16px; border: 1px solid #bdd8ca;
  border-radius: 17px; background: white; box-shadow: var(--shadow-sm);
}
.my-assignments-card > div:first-child { display: flex; align-items: center; gap: 11px; }
.my-assignments-card > div:first-child > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--green-100); color: var(--green-800); }
.my-assignments-card strong, .my-assignments-card small { display: block; }
.my-assignments-card small { margin-top: 2px; color: var(--muted); }
.my-assignments-list { display: flex; margin-top: 13px; flex-wrap: wrap; gap: 8px; }
.my-assignment { padding: 9px 12px; border-radius: 12px; background: var(--green-50); font-size: .78rem; }
.my-assignment b { color: var(--green-950); }
.my-assignment em { margin-left: 6px; color: var(--green-700); font-style: normal; font-weight: 750; }
.step-label { color: var(--gold-600); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.back-button {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--green-900);
}
.card {
  border: 1px solid rgba(18, 55, 45, .1); border-radius: 22px; background: rgba(255,255,255,.93);
  box-shadow: var(--shadow-sm);
}
.participant-grid {
  display: grid; max-width: 1240px; margin: 0 auto; grid-template-columns: .8fr 1.2fr; gap: 22px; align-items: start;
}
.participant-grid > *, .field { min-width: 0; }
.profile-card, .calendar-card, .extras-card { padding: clamp(20px, 3vw, 30px); }
.section-title { display: flex; margin-bottom: 24px; align-items: flex-start; gap: 13px; }
.section-title h3 { margin-bottom: 5px; font-size: 1.08rem; }
.section-title p { margin: 0; color: var(--muted); font-size: .86rem; }
.section-number {
  display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center;
  border-radius: 11px; background: var(--green-100); color: var(--green-900); font-weight: 800;
}
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field-help { margin-top: -5px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.range-picker {
  margin-bottom: 20px; padding: 16px; border: 1px solid #c9ded6; border-radius: 16px;
  background: linear-gradient(135deg, #f3faf7, #fffdf6);
}
.range-picker-heading { display: flex; margin-bottom: 13px; align-items: center; justify-content: space-between; gap: 12px; }
.range-picker-heading div { display: grid; gap: 2px; }
.range-picker-heading strong { color: var(--green-950); font-size: .9rem; }
.range-picker-heading small { color: var(--muted); font-size: .72rem; }
.range-picker-heading > span { color: var(--gold-600); font-size: 1.4rem; }
.range-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.range-fields .field span { font-size: .7rem; }
.range-fields input { min-width: 0; }
.field span, .mission-fieldset legend { color: #3e514a; font-size: .84rem; font-weight: 700; }
.field input, .field textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 13px; background: #fbfdfc; color: var(--ink);
}
.field select {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 34px 11px 13px; background: #fbfdfc; color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--green-700); background: white; }

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-toolbar strong { text-transform: capitalize; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.weekdays { margin-bottom: 7px; color: var(--muted); font-size: .66rem; font-weight: 800; text-align: center; text-transform: uppercase; }
.calendar-day {
  position: relative; min-height: 66px; padding: 8px; border: 1px solid var(--line); border-radius: 12px;
  background: #f9fbfa; color: var(--ink); text-align: left;
}
.calendar-day:hover:not(:disabled) { border-color: var(--gold-500); transform: translateY(-1px); }
.calendar-day:disabled, .calendar-day.outside { opacity: .3; cursor: default; }
.calendar-day .day-number { display: block; font-weight: 800; }
.calendar-day small { position: absolute; right: 7px; bottom: 6px; left: 7px; overflow: hidden; font-size: .58rem; text-overflow: ellipsis; white-space: nowrap; }
.calendar-day.available { border-color: var(--green-700); background: var(--green-100); color: var(--green-950); }
.calendar-day.partial { border-color: #7fb4dc; background: #e8f3fc; color: #215c8b; }
.calendar-day.unavailable { border-color: #e7a7a1; background: #fff0ee; color: #96372f; }
.calendar-day.today::after {
  content: ""; position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500);
}
.calendar-legend { display: flex; margin-top: 16px; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .72rem; }
.legend-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #d8ddda; }
.legend-dot.available { background: var(--green-700); }
.legend-dot.partial { background: var(--blue); }
.legend-dot.unavailable { background: var(--red); }
.quick-actions { display: flex; margin-top: 18px; align-items: center; justify-content: space-between; gap: 8px; }
.sticky-action {
  position: sticky; z-index: 10; bottom: 84px; display: flex; max-width: 1240px; margin: 22px auto 0; padding: 14px 16px;
  align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255,255,255,.92); box-shadow: var(--shadow); backdrop-filter: blur(18px);
}
.sticky-action div { display: flex; flex-direction: column; }
.sticky-action small { margin-top: 2px; color: var(--muted); }

.summary-layout {
  display: grid; max-width: 1050px; margin: 0 auto; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: start;
}
.summary-layout > .card { padding: clamp(20px, 3vw, 30px); }
.summary-list { display: flex; flex-direction: column; gap: 10px; }
.summary-item {
  display: grid; grid-template-columns: 13px 1fr auto; gap: 12px; align-items: start;
  padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfc;
}
.summary-item .status-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--green-700); }
.summary-item.partial .status-dot { background: var(--blue); }
.summary-item.unavailable .status-dot { background: var(--red); }
.summary-item h4 { margin: 0 0 3px; }
.summary-item p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.summary-item button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--green-50); color: var(--green-800); }
.binary-row { display: flex; min-height: 52px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); font-size: .86rem; }
.switch input { position: absolute; opacity: 0; }
.switch span { display: block; width: 47px; height: 27px; border-radius: 99px; background: #d8dfdc; transition: .2s; }
.switch span::after {
  content: ""; display: block; width: 21px; height: 21px; margin: 3px; border-radius: 50%; background: white; box-shadow: 0 2px 6px #89958f; transition: .2s;
}
.switch input:checked + span { background: var(--green-700); }
.switch input:checked + span::after { transform: translateX(20px); }
.mission-fieldset { margin: 22px 0; padding: 0; border: 0; }
.mission-fieldset legend { margin-bottom: 10px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list label input { position: absolute; opacity: 0; }
.chip-list label span {
  display: block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: #53645e; font-size: .72rem; font-weight: 700; cursor: pointer;
}
.chip-list label input:checked + span { border-color: var(--green-700); background: var(--green-900); color: white; }
.success-screen.active { display: grid; place-items: center; }
.success-card { width: min(520px, 100%); padding: 50px 30px; text-align: center; }
.success-icon {
  display: grid; width: 72px; height: 72px; margin: 0 auto 20px; place-items: center;
  border-radius: 50%; background: var(--green-100); color: var(--green-800); font-size: 2rem; font-weight: 800;
}
.success-card p:not(.eyebrow) { color: var(--muted); }
.personal-link-card {
  margin: 22px 0; padding: 17px; border: 1px solid #c8ddd3; border-radius: 16px; background: var(--green-50); text-align: left;
}
.personal-link-card > strong { color: var(--green-950); }
.personal-link-card p { margin: 5px 0 11px; font-size: .8rem; line-height: 1.45; }
.personal-link-card > div { display: flex; gap: 8px; }
.personal-link-card input { min-width: 0; flex: 1; border: 1px solid #bbcec5; border-radius: 11px; padding: 10px 12px; background: white; color: var(--green-900); font-size: .75rem; }
.success-card .text-button { display: flex; margin: 8px auto 0; }

.bottom-nav {
  position: fixed; z-index: 25; right: 0; bottom: 0; left: 0; display: none;
  height: calc(70px + env(safe-area-inset-bottom)); padding: 7px 10px env(safe-area-inset-bottom);
  grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(18px);
}
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: #7b8984; font-size: .61rem; }
.bottom-nav button span { font-size: 1.18rem; }
.bottom-nav button.active { color: var(--green-800); font-weight: 800; }

dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(4, 33, 26, .62); backdrop-filter: blur(5px); }
.availability-dialog {
  width: min(570px, calc(100% - 28px)); max-height: calc(100dvh - 24px); overflow: hidden;
  border-radius: 24px; box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.availability-dialog form { padding: 25px; }
.dialog-handle { display: none; }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-heading h2 { margin: 0 0 20px; }
.slot-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.slot-options input { position: absolute; opacity: 0; }
.slot-options span {
  display: flex; min-height: 108px; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 15px; background: #fbfdfc; cursor: pointer;
}
.slot-options i { color: var(--gold-600); font-size: 1.2rem; font-style: normal; }
.slot-options b { margin: 6px 0 1px; font-size: .8rem; }
.slot-options small { color: var(--muted); font-size: .62rem; }
.slot-options input:checked + span { border-color: var(--green-700); background: var(--green-100); }
.check-row { display: flex; padding: 12px; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.check-row input { accent-color: var(--green-800); }
.check-row.danger input { accent-color: var(--red); }
.availability-dialog details { margin: 13px 0; font-size: .8rem; }
.availability-dialog summary { color: var(--green-800); cursor: pointer; }
.custom-hours { margin-top: 12px; }
.dialog-actions { display: flex; margin-top: 18px; justify-content: space-between; gap: 10px; }
.danger-text { color: var(--red); }
.confirmation-dialog {
  width: min(470px, calc(100% - 28px)); max-height: calc(100dvh - 24px); overflow: hidden;
  border: 0; border-radius: 26px;
  background: #fffdf8; box-shadow: 0 32px 90px rgba(2, 38, 28, .32);
}
.confirmation-dialog form { padding: 34px; text-align: center; }
.confirmation-icon {
  display: grid; width: 64px; height: 64px; margin: 0 auto 18px; place-items: center;
  border-radius: 21px; background: var(--gold-100); color: var(--gold-600);
  font-size: 1.65rem; font-weight: 900;
}
.confirmation-dialog.danger .confirmation-icon { background: #fde9e6; color: var(--red); }
.confirmation-dialog h2 { margin-bottom: 9px; color: var(--green-950); font-size: 1.32rem; }
.confirmation-dialog p:not(.eyebrow) { margin: 0 auto; color: var(--muted); line-height: 1.65; }
.confirmation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.confirmation-dialog.danger #confirmation-accept { background: var(--red); }
.login-dialog {
  width: min(430px, calc(100% - 28px)); max-height: calc(100dvh - 24px); overflow: hidden;
  border-radius: 24px; box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.assignment-dialog {
  width: min(560px, calc(100% - 28px)); max-height: calc(100dvh - 24px); overflow: hidden;
  border-radius: 24px; box-shadow: 0 28px 80px rgba(0,0,0,.25);
}
.assignment-dialog form { padding: 28px; }
.login-dialog form { padding: 28px; text-align: center; }
.login-mark { display: grid; width: 60px; height: 60px; margin: 0 auto 16px; place-items: center; border-radius: 18px; background: var(--green-900); color: var(--gold-400); font-size: 1.6rem; }
.login-dialog h2 { margin-bottom: 7px; }
.login-dialog p:not(.eyebrow) { color: var(--muted); font-size: .84rem; }
.login-dialog .field { margin: 14px 0 8px; text-align: left; }
.login-dialog .field + .field { margin-top: 8px; }
.participant-login-dialog .recovery-help { display: block; margin-top: 12px; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.login-divider { display: flex; margin: 14px 0 10px; align-items: center; gap: 10px; color: #82908b; font-size: .7rem; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.participant-login-dialog .signup-button { min-height: 50px; white-space: normal; line-height: 1.3; }
.demo-login-panel {
  display: grid; gap: 8px; margin: 6px 0 14px; padding: 12px;
  border: 1px solid #c9ded6; border-radius: 14px; background: #f1f8f5;
}
.demo-login-panel[hidden] { display: none; }
.demo-login-panel small { color: var(--muted); font-size: .72rem; }
.demo-login-button {
  min-height: 42px; border: 1px solid var(--green-700); border-radius: 10px;
  background: white; color: var(--green-900); font-weight: 800; cursor: pointer;
}
.demo-login-button:hover { background: var(--green-100); }
.form-error { min-height: 20px; margin: 0 0 8px !important; color: var(--red) !important; font-weight: 700; }

.toast-region { position: fixed; z-index: 100; top: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: min(360px, calc(100vw - 36px)); padding: 14px 16px; border-radius: 12px;
  background: var(--green-950); color: white; box-shadow: var(--shadow); animation: toast-in .25s ease both;
}
.toast.error { background: #9d342c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Administration */
.admin-app { min-height: 100vh; background: #f1f5f2; }
.admin-sidebar {
  position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; display: flex; width: 248px; padding: 28px 18px;
  flex-direction: column; background:
    radial-gradient(circle at 20% 100%, rgba(217, 165, 20, .2), transparent 30%),
    linear-gradient(165deg, var(--green-950), var(--green-900)); color: white;
}
.admin-sidebar .brand { margin: 0 10px 34px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 7px; }
.admin-sidebar nav button, .sidebar-logout {
  display: flex; min-height: 46px; padding: 11px 14px; align-items: center; gap: 12px;
  border: 0; border-radius: 11px; background: transparent; color: rgba(255,255,255,.8); text-align: left;
}
.admin-sidebar nav button.active, .admin-sidebar nav button:hover { background: rgba(255,255,255,.13); color: white; }
.admin-sidebar blockquote {
  margin: auto 10px 22px; color: var(--gold-100); font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem; font-style: italic; line-height: 1.6;
}
.sidebar-logout { color: rgba(255,255,255,.72); }
.admin-content { margin-left: 248px; min-height: 100vh; }
.admin-header {
  position: sticky; z-index: 15; top: 0; display: flex; min-height: 88px; padding: 15px clamp(20px, 3vw, 42px);
  align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9); backdrop-filter: blur(18px);
}
.admin-header h1 { margin: 0; font-size: 1.5rem; }
.admin-header .eyebrow { margin: 0 0 2px; }
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.admin-menu-toggle { display: none; margin-right: 10px; }
.admin-main { padding: clamp(18px, 3vw, 38px); }
.admin-view { display: none; }
.admin-view.active { display: block; animation: screen-in .3s ease both; }
.period-banner-wrap {
  display: flex; margin-bottom: 18px; padding: 10px; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid #c9dfd4; border-radius: 16px; background: #f8fcfa;
}
.period-banner-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.period-banner {
  margin: 0; padding: 5px 7px; color: var(--green-950); font-size: .88rem; font-weight: 700;
}
.period-settings-button { min-height: 42px; flex: 0 0 auto; box-shadow: none; }
.period-pdf-button { min-height: 42px; border-color: var(--gold-500); }
.settings-shortcut { border-color: var(--gold-500); color: var(--green-950); }
.pdf-shortcut { min-height: 42px; padding-inline: 14px; box-shadow: none; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat-card { display: flex; min-height: 108px; padding: 18px; align-items: center; gap: 14px; }
.stat-icon { display: grid; width: 48px; height: 48px; flex: 0 0 48px; place-items: center; border-radius: 15px; background: var(--green-100); color: var(--green-800); font-size: 1.25rem; }
.stat-card.gold .stat-icon { background: var(--gold-100); color: var(--gold-600); }
.stat-card p { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.stat-card strong { display: block; margin-top: 4px; color: var(--green-950); font-size: 1.42rem; }
.dashboard-insights {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 0; margin-bottom: 18px; padding: 0;
  overflow: hidden;
}
.insight-block { min-width: 0; padding: 20px; }
.insight-block + .insight-block { border-left: 1px solid var(--line); }
.breakdown-list { display: grid; gap: 10px; }
.breakdown-row { display: grid; grid-template-columns: minmax(100px, 1fr) 1.4fr auto; align-items: center; gap: 9px; font-size: .76rem; }
.breakdown-row > span:first-child { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.breakdown-track { height: 8px; overflow: hidden; border-radius: 99px; background: var(--green-50); }
.breakdown-track i { display: block; width: var(--bar-width); height: 100%; border-radius: inherit; background: var(--bar-color, var(--green-700)); }
.breakdown-row strong { color: var(--green-950); }
.planning-alerts { display: grid; gap: 9px; }
.planning-alert {
  display: flex; padding: 11px; align-items: flex-start; gap: 9px;
  border: 1px solid #d8e7e1; border-radius: 12px; background: #f5fbf8; font-size: .75rem;
}
.planning-alert.warning { border-color: #f0d5a2; background: #fff8e8; }
.planning-alert span { color: var(--green-700); font-weight: 900; }
.planning-alert.warning span { color: var(--gold-600); }
.team-label { display: inline-flex; align-items: center; gap: 6px; }
.team-label::before { width: 8px; height: 8px; border-radius: 50%; background: var(--team-color); content: ""; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 18px; }
.admin-calendar-card, .day-panel, .participants-preview, #admin-calendar-view > .card, #admin-participants-view > .card { padding: 22px; }
.card-heading { display: flex; margin-bottom: 18px; align-items: center; justify-content: space-between; gap: 12px; }
.card-heading h2 { margin: 0; font-size: 1.02rem; }
.card-heading .eyebrow { margin-bottom: 2px; }
.admin-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.admin-day {
  min-height: 92px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: #f9fbfa; color: var(--ink); text-align: left;
}
.admin-day:hover { border-color: var(--green-700); }
.admin-day.outside { opacity: .25; pointer-events: none; }
.admin-day.selected { border: 2px solid var(--green-800); background: var(--green-100); }
.admin-day .number { font-weight: 800; }
.admin-day .total { display: block; margin-top: 17px; color: var(--green-800); font-size: 1rem; font-weight: 800; }
.admin-day small { color: var(--muted); font-size: .67rem; }
.admin-calendar.large .admin-day { min-height: 120px; }
.empty-state { display: grid; min-height: 360px; padding: 30px; place-items: center; align-content: center; text-align: center; }
.empty-state > span { color: var(--gold-500); font-size: 2.5rem; }
.empty-state h3 { margin: 12px 0 4px; }
.empty-state p { color: var(--muted); font-size: .8rem; }
.count-badge { display: grid; min-width: 34px; height: 34px; padding: 0 8px; place-items: center; border-radius: 12px; background: var(--green-100); color: var(--green-800); }
.needs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 15px; }
.need-item { padding: 9px 6px; border-radius: 10px; background: var(--green-50); text-align: center; }
.need-item strong { display: block; }
.need-item small { color: var(--muted); font-size: .6rem; }
.need-item.warning { background: #fff0e6; color: #aa5125; }
.day-roster { display: flex; max-height: 345px; flex-direction: column; gap: 7px; overflow: auto; }
.roster-person { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 8px; border-radius: 11px; background: #f8faf9; }
.person-initials { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); font-size: .68rem; font-weight: 800; }
.roster-person strong { display: block; font-size: .82rem; }
.roster-person small { color: var(--muted); font-size: .7rem; }
.slot-badge { padding: 5px 7px; border-radius: 999px; background: var(--green-100); color: var(--green-800) !important; }
.roster-actions { display: flex; align-items: center; gap: 6px; }
.assignment-button { min-height: 30px; padding: 5px 8px; border: 1px solid #bcd1c7; border-radius: 9px; background: white; color: var(--green-900); font-size: .66rem; font-weight: 750; }
.whatsapp-button { min-height: 30px; padding: 5px 8px; border: 0; border-radius: 9px; background: #dcf8e7; color: #087337; font-size: .66rem; font-weight: 800; }
.assignment-status { padding: 5px 7px; border-radius: 999px; background: #fff1bd; color: #7d5b0b !important; font-weight: 750; }
.assignment-status.confirmed, .assignment-status.completed { background: var(--green-100); color: var(--green-900) !important; }
.assignment-status.declined, .assignment-status.absent { background: #fff0ee; color: var(--red) !important; }
.participants-preview { margin-top: 18px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .82rem; }
th { padding: 11px 12px; background: #f7faf8; color: #4f5f59; font-size: .7rem; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
td strong { color: var(--green-950); }
.status-pill { display: inline-block; padding: 5px 8px; border-radius: 999px; background: var(--green-100); color: var(--green-800); font-size: .62rem; font-weight: 800; }
.delete-button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #fff0ee; color: var(--red); }
.row-actions { display: flex; gap: 6px; }
.link-button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--green-100); color: var(--green-900); }
.table-actions { display: flex; gap: 9px; }
.search-field { display: flex; min-width: 280px; height: 45px; padding: 0 12px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--ink); }
.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.settings-layout > .card { padding: clamp(20px, 3vw, 30px); }
.settings-layout .primary-button { margin-top: 22px; }
.users-layout { display: grid; grid-template-columns: minmax(300px, .68fr) minmax(0, 1.32fr); gap: 18px; align-items: start; }
.users-layout > .card { padding: clamp(20px, 3vw, 28px); }
.create-user-form .primary-button, #create-user-form .primary-button { margin-top: 18px; }
.admin-users-list { display: flex; flex-direction: column; gap: 9px; }
.admin-user-row {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; gap: 11px; align-items: center;
  padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfc;
}
.admin-user-row .person-initials { width: 38px; height: 38px; }
.admin-user-row strong, .admin-user-row small { display: block; }
.admin-user-row small { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.role-select { min-height: 37px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 28px 7px 9px; background: white; color: var(--ink); font-size: .72rem; }
.account-toggle { min-height: 36px; padding: 7px 10px; border: 1px solid #bcd1c7; border-radius: 10px; background: white; color: var(--green-900); font-size: .7rem; font-weight: 750; }
.account-toggle.inactive { border-color: #edb7b2; color: var(--red); }

@media (max-width: 1060px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .dashboard-insights { grid-template-columns: 1fr; }
  .insight-block + .insight-block { border-top: 1px solid var(--line); border-left: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .day-panel { min-height: auto; }
  .empty-state { min-height: 200px; }
  .settings-layout { grid-template-columns: 1fr; }
  .users-layout { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .mobile-header { height: 66px; }
  .screen { padding: 88px 15px 110px; }
  .participant-grid, .summary-layout { grid-template-columns: 1fr; }
  .profile-card { order: 0; }
  .calendar-card { order: 1; }
  .bottom-nav { display: grid; }
  .sticky-action { bottom: 82px; }
  .admin-sidebar { transform: translateX(-105%); transition: transform .25s ease; }
  .admin-sidebar.open { transform: translateX(0); box-shadow: 16px 0 45px rgba(0,0,0,.2); }
  .admin-content { margin-left: 0; }
  .admin-menu-toggle { display: inline-grid; }
  .admin-header > div:first-child { display: flex; align-items: center; }
  .admin-header .eyebrow { display: none; }
  .admin-main { padding: 14px; }
  .admin-header-actions .secondary-button { display: none; }
  .admin-header-actions .pdf-shortcut { display: inline-flex; }
  .admin-header-actions .settings-shortcut { display: inline-flex; padding: 9px 12px; font-size: .78rem; }
  .admin-calendar { gap: 5px; }
  .admin-day { min-height: 76px; padding: 7px; }
  .admin-day .total { margin-top: 10px; }
  .admin-calendar.large .admin-day { min-height: 88px; }
  .stacked-mobile { align-items: flex-start; flex-direction: column; }
  .admin-user-row { grid-template-columns: 38px 1fr; }
  .admin-user-row .role-select, .admin-user-row .account-toggle { grid-column: 2; width: 100%; }
  .table-actions { width: 100%; flex-direction: column; }
  .search-field { min-width: 0; width: 100%; }
}

@media (max-width: 560px) {
  .welcome-content { margin-top: -50px; }
  .welcome-content h1 { font-size: 2.65rem; }
  .hero-mark { width: 76px; height: 76px; border-radius: 23px; }
  .hero-mark svg { width: 52px; }
  .period-pill { max-width: 95%; }
  .field-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .profile-card, .calendar-card, .extras-card, .summary-layout > .card { padding: 18px; border-radius: 18px; }
  .edit-mode-banner { align-items: flex-start; flex-wrap: wrap; }
  .edit-mode-banner #participant-space-logout { width: 100%; margin-left: 46px; justify-content: flex-start; }
  .range-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-day { min-height: 52px; padding: 6px; border-radius: 9px; }
  .calendar-day small { display: none; }
  .quick-actions { align-items: stretch; flex-direction: column; }
  .sticky-action { align-items: stretch; flex-direction: column; }
  .sticky-action small { display: none; }
  .sticky-action .primary-button { width: 100%; }
  .availability-dialog {
    position: fixed; top: 50%; right: auto; bottom: auto; left: 50%; width: 100%; max-width: none;
    margin: 0; transform: translate(-50%, -50%); border-radius: 24px;
  }
  .availability-dialog form { padding: 12px 18px calc(20px + env(safe-area-inset-bottom)); }
  .dialog-handle { display: block; width: 42px; height: 4px; margin: 0 auto 14px; border-radius: 99px; background: #d9dfdc; }
  .dialog-actions { align-items: stretch; flex-direction: column-reverse; }
  .confirmation-dialog form { padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); }
  .login-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 16px); border-radius: 20px; }
  .login-dialog form { padding: 24px 18px calc(20px + env(safe-area-inset-bottom)); }
  .login-mark { width: 52px; height: 52px; margin-bottom: 12px; border-radius: 16px; }
  .login-dialog .field { margin-top: 14px; }
  .slot-options span { min-height: 94px; }
  .assignment-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 16px); border-radius: 20px; }
  .assignment-dialog form { padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
  .assignment-dialog .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .assignment-dialog .field.full { grid-column: 1 / -1; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { min-height: 92px; padding: 12px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .stat-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }
  .stat-card strong { font-size: 1.08rem; }
  .admin-calendar-card, .day-panel, .participants-preview, #admin-calendar-view > .card, #admin-participants-view > .card { padding: 14px; border-radius: 17px; }
  .admin-day { min-height: 62px; }
  .admin-day small { display: none; }
  .admin-day .total { margin-top: 8px; font-size: .8rem; }
  .admin-header h1 { font-size: 1.15rem; }
  .admin-header { min-height: 70px; padding: 10px 14px; }
  .admin-header-actions .settings-shortcut { display: none; }
  .admin-header-actions .pdf-shortcut { display: none; }
  .period-banner-wrap { align-items: stretch; flex-direction: column; }
  .period-banner-actions { width: 100%; flex-direction: column; }
  .period-settings-button, .period-pdf-button { width: 100%; }
}

@media (max-width: 560px) and (max-height: 650px) {
  .login-dialog form { padding: 14px 18px; }
  .login-dialog .login-mark { display: none; }
  .login-dialog .eyebrow { margin-bottom: 3px; }
  .login-dialog h2 { margin-bottom: 5px; font-size: 1.28rem; }
  .login-dialog form > p:not(.eyebrow):not(.form-error) { display: none; }
  .login-dialog .field,
  .login-dialog .field + .field { margin: 8px 0 5px; }
  .login-dialog .field input { min-height: 44px; padding-block: 8px; }
  .login-dialog .form-error { min-height: 12px; margin-bottom: 3px !important; font-size: .72rem; }
  .login-dialog .text-button { min-height: 36px; padding-block: 5px; }
  .demo-login-panel { gap: 5px; margin: 5px 0 7px; padding: 7px; }
  .demo-login-panel small { display: none; }
  .demo-login-button { min-height: 40px; }
  .participant-login-dialog .login-divider { margin: 8px 0 6px; }
  .participant-login-dialog .recovery-help { display: none; }
  .participant-login-dialog #cancel-participant-login { min-height: 38px; padding: 6px; }
  .availability-dialog form { padding: 9px 14px calc(10px + env(safe-area-inset-bottom)); }
  .availability-dialog .dialog-handle { margin-bottom: 7px; }
  .availability-dialog .dialog-heading h2 { margin-bottom: 9px; font-size: 1.2rem; }
  .availability-dialog .slot-options { gap: 6px; margin-bottom: 6px; }
  .availability-dialog .slot-options span { min-height: 68px; border-radius: 12px; }
  .availability-dialog .slot-options b { margin: 2px 0 0; }
  .availability-dialog .slot-options small { display: none; }
  .availability-dialog .check-row { padding: 8px 10px; }
  .availability-dialog details { margin: 8px 0; }
  .availability-dialog .field { gap: 4px; }
  .availability-dialog textarea { min-height: 46px; height: 46px; padding-block: 7px; }
  .availability-dialog .dialog-actions { gap: 3px; margin-top: 8px; }
  .availability-dialog .dialog-actions .primary-button { min-height: 42px; padding-block: 8px; }
  .availability-dialog .dialog-actions .text-button { min-height: 34px; padding-block: 4px; }
  .assignment-dialog form { padding: 14px; }
  .assignment-dialog .dialog-heading h2 { margin-bottom: 2px; font-size: 1.08rem; }
  .assignment-dialog .dialog-heading .muted { margin: 2px 0 8px; font-size: .7rem; }
  .assignment-dialog .field-grid { gap: 7px; }
  .assignment-dialog .field { gap: 3px; }
  .assignment-dialog .field span { font-size: .72rem; }
  .assignment-dialog .field select,
  .assignment-dialog .field textarea { min-height: 42px; padding-block: 7px; }
  .assignment-dialog .field textarea { height: 50px; resize: none; }
  .assignment-dialog .dialog-actions { gap: 3px; margin-top: 9px; }
  .assignment-dialog .dialog-actions .primary-button { min-height: 42px; padding-block: 8px; }
  .assignment-dialog .dialog-actions .text-button { min-height: 34px; padding-block: 4px; }
  .confirmation-dialog form { padding: 18px; }
  .confirmation-icon { width: 50px; height: 50px; margin-bottom: 10px; border-radius: 16px; font-size: 1.3rem; }
  .confirmation-dialog h2 { margin-bottom: 5px; font-size: 1.15rem; }
  .confirmation-dialog p:not(.eyebrow) { font-size: .78rem; line-height: 1.45; }
  .confirmation-actions { margin-top: 15px; }
}

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