/* Member polls admin */
.polls-admin-page { max-width: 1680px; width: min(1680px, 98vw); }
.poll-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.poll-admin-card { padding: 18px; border: 1px solid rgba(15,23,42,.08); border-radius: 24px; background: #fff; box-shadow: 0 18px 50px rgba(16,24,40,.06); display: grid; gap: 13px; }
.poll-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.poll-card-head h3 { margin: 6px 0 0; color: #0f172a; }
.poll-type-chip { display: inline-flex; width: max-content; padding: 5px 9px; border-radius: 999px; background: #ecfdf3; color: #0f7f55; font-size: .72rem; font-weight: 1000; text-transform: uppercase; letter-spacing: .06em; }
.poll-meta-strip { display: flex; flex-wrap: wrap; gap: 7px; }
.poll-meta-strip span { padding: 6px 9px; border-radius: 999px; background: #f8fafc; color: #475569; font-size: .76rem; font-weight: 900; }
.poll-results-bars { display: grid; gap: 8px; }
.poll-result-row { display: grid; gap: 6px; }
.poll-result-row > div:first-child { display: flex; justify-content: space-between; gap: 10px; color: #334155; font-size: .84rem; }
.poll-bar { height: 9px; border-radius: 999px; background: #f1f5f9; overflow: hidden; }
.poll-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0f7f55, #16a36d); }
.poll-comments { display: grid; gap: 7px; padding: 12px; border-radius: 18px; background: #f8fafc; }
.poll-comments p { margin: 0; display: grid; gap: 3px; }
.poll-comments span { color: #64748b; }
.poll-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.poll-modal[hidden] { display: none !important; }
.poll-modal { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: 18px; background: rgba(15, 23, 42, .42); backdrop-filter: blur(4px); }
.poll-modal-card { width: min(1180px, 96vw); max-height: calc(100vh - 36px); overflow: auto; border-radius: 30px; border: 1px solid rgba(15,23,42,.10); background: #fff; box-shadow: 0 34px 100px rgba(15,23,42,.34); }
.poll-modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #eef2f6; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
.poll-enterprise-form { display: grid; gap: 18px; padding: 22px 24px 26px; }
.poll-form-section { display: grid; gap: 13px; padding: 18px; border: 1px solid rgba(15,23,42,.08); border-radius: 24px; background: #fff; }
.member-picker-panel { display: grid; gap: 12px; padding: 15px; border: 1px solid rgba(15,127,85,.18); border-radius: 22px; background: linear-gradient(135deg, #ecfdf3, #fff); }
.member-picker-panel[hidden] { display: none !important; }
.member-picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.member-picker-head strong, .member-picker-head span { display: block; }
.selected-member-count { width: max-content; padding: 6px 10px; border-radius: 999px; background: #0f7f55; color: #fff; font-size: .78rem; font-weight: 1000; }
.member-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 9px; max-height: 300px; overflow: auto; padding-right: 4px; }
.poll-member-row { display: grid !important; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; cursor: pointer; }
.poll-member-row.is-selected { border-color: rgba(15,127,85,.30); background: #f0fdf4; }
.poll-member-row input { width: auto !important; }
.member-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 14px; background: #0f7f55; color: #fff; font-weight: 1000; }
.poll-member-row strong, .poll-member-row small { display: block; }
.poll-member-row small { color: #64748b; font-weight: 700; }
.poll-link-box { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 10px; border-radius: 16px; background: #f8fafc; }
.poll-link-box span { font-weight: 900; color: #475569; }
.poll-modal-actions { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0 0; border-top: 1px solid #eef2f6; background: #fff; }
@media (max-width: 860px) { .poll-modal { padding: 10px; } .poll-modal-card { width: calc(100vw - 20px); border-radius: 24px; } .poll-modal-head, .poll-enterprise-form { padding: 16px; } .member-picker-head, .poll-modal-actions { display: grid; } }


/* Professional custom calendar for poll dates */
.poll-date-field {
  position: relative;
  display: block;
}

.poll-date-field input {
  width: 100%;
  padding-right: 52px !important;
}

.poll-date-trigger {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 13px !important;
  display: grid !important;
  place-items: center !important;
  background: #ecfdf3 !important;
  color: #0f7f55 !important;
  cursor: pointer !important;
  font-size: 1rem !important;
}

.poll-date-trigger:hover,
.poll-date-trigger:focus {
  outline: 3px solid rgba(15,127,85,.16) !important;
}

.poll-date-modal[hidden] {
  display: none !important;
}

.poll-date-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(15,23,42,.36);
  backdrop-filter: blur(4px);
}

.poll-date-modal,
.poll-date-modal * {
  box-sizing: border-box;
}

.poll-date-card {
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(15,23,42,.34);
}

.poll-date-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.poll-date-head strong,
.poll-date-head span {
  display: block;
}

.poll-date-head strong {
  color: #0f172a;
  font-size: 1.16rem;
  font-weight: 1000;
}

.poll-date-head span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 900;
}

.poll-date-x,
.poll-date-nav,
.poll-date-foot-btn,
.poll-date-day {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.poll-date-x {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f8fafc;
  color: #475569;
  font-size: 1.25rem;
  font-weight: 1000;
}

.poll-date-toolbar {
  display: grid;
  grid-template-columns: 38px 42px minmax(0, 1fr) 42px 38px;
  gap: 7px;
  align-items: center;
  margin-bottom: 14px;
}

.poll-date-nav {
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #ecfdf3;
  color: #0f7f55;
  font-size: 1.15rem;
  font-weight: 1000;
}

.poll-date-current {
  height: 40px;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border: 1px solid #dbe3ee;
  border-radius: 15px;
  background: #f8fafc;
  color: #0f172a;
  font-size: .95rem;
  font-weight: 1000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poll-date-weekdays,
.poll-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.poll-date-weekdays {
  margin-bottom: 8px;
}

.poll-date-weekdays span {
  text-align: center;
  color: #64748b;
  font-size: .68rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.poll-date-empty {
  height: 38px;
}

.poll-date-day {
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  font-size: .9rem;
  font-weight: 900;
}

.poll-date-day:hover,
.poll-date-day:focus {
  background: #e8f8ef;
  color: #0f7f55;
  outline: none;
}

.poll-date-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(15,127,85,.28);
}

.poll-date-day.is-selected {
  background: linear-gradient(135deg, #0f7f55, #16a36d);
  color: #fff;
  box-shadow: 0 10px 20px rgba(15,127,85,.20);
}

.poll-date-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f6;
}

.poll-date-foot-btn {
  min-width: 86px;
  min-height: 38px;
  padding: 0 14px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  font-size: .92rem;
  font-weight: 1000;
}

.poll-date-foot-btn.light {
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #0f172a;
}

.poll-date-foot-btn.done {
  background: #0f7f55;
  color: #fff;
}

@media (max-width: 430px) {
  .poll-date-card {
    padding: 14px;
    border-radius: 24px;
  }
  .poll-date-toolbar {
    grid-template-columns: 34px 38px minmax(0, 1fr) 38px 34px;
    gap: 5px;
  }
  .poll-date-nav {
    height: 36px;
    border-radius: 12px;
    font-size: 1rem;
  }
  .poll-date-current {
    height: 36px;
    font-size: .82rem;
    padding: 0 5px;
  }
  .poll-date-day,
  .poll-date-empty {
    height: 34px;
    border-radius: 10px;
    font-size: .84rem;
  }
}


/* Hard-fixed poll calendar: independent from admin_polls.js */
.poll-date-field {
  position: relative;
  display: block;
}
.poll-date-field input {
  width: 100%;
  padding-right: 52px !important;
}
.poll-date-trigger {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 13px !important;
  display: grid !important;
  place-items: center !important;
  background: #ecfdf3 !important;
  color: #0f7f55 !important;
  cursor: pointer !important;
  font-size: 1rem !important;
  z-index: 2 !important;
}
#pyrkPollCalendarHardFixModal[hidden] {
  display: none !important;
}
#pyrkPollCalendarHardFixModal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 14px !important;
  background: rgba(15, 23, 42, .36) !important;
  backdrop-filter: blur(4px);
}
#pyrkPollCalendarHardFixModal,
#pyrkPollCalendarHardFixModal * {
  box-sizing: border-box !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-card {
  width: min(420px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 28px) !important;
  overflow: auto !important;
  padding: 18px !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  border-radius: 28px !important;
  background: #fff !important;
  box-shadow: 0 34px 90px rgba(15,23,42,.34) !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 14px !important;
  margin-bottom: 14px !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-head strong,
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-head span {
  display: block !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-head strong {
  color: #0f172a !important;
  font-size: 1.16rem !important;
  font-weight: 1000 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-head span {
  color: #64748b !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-close,
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-nav,
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-foot,
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day {
  all: unset !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  user-select: none !important;
  text-align: center !important;
  -webkit-tap-highlight-color: transparent !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-close {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 1.25rem !important;
  font-weight: 1000 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-toolbar {
  display: grid !important;
  grid-template-columns: 38px 42px minmax(0, 1fr) 42px 38px !important;
  gap: 7px !important;
  align-items: center !important;
  margin-bottom: 14px !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-nav {
  height: 40px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  background: #ecfdf3 !important;
  color: #0f7f55 !important;
  font-size: 1.15rem !important;
  font-weight: 1000 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-current {
  height: 40px !important;
  min-width: 0 !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 8px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 15px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-size: .95rem !important;
  font-weight: 1000 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-weekdays,
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 6px !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-weekdays {
  margin-bottom: 8px !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-weekdays span {
  text-align: center !important;
  color: #64748b !important;
  font-size: .68rem !important;
  font-weight: 1000 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-empty {
  height: 38px !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day {
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-size: .9rem !important;
  font-weight: 900 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day:hover,
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day:focus {
  background: #e8f8ef !important;
  color: #0f7f55 !important;
  outline: none !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(15,127,85,.28) !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day.is-selected {
  background: linear-gradient(135deg, #0f7f55, #16a36d) !important;
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(15,127,85,.20) !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-calendar-foot {
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px solid #eef2f6 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-foot {
  min-width: 86px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 14px !important;
  font-size: .92rem !important;
  font-weight: 1000 !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-foot.light {
  border: 1px solid #dbe3ee !important;
  background: #f8fafc !important;
  color: #0f172a !important;
}
#pyrkPollCalendarHardFixModal .pyrk-poll-cal-foot.done {
  background: #0f7f55 !important;
  color: #fff !important;
}
@media (max-width: 430px) {
  #pyrkPollCalendarHardFixModal .pyrk-poll-calendar-card {
    padding: 14px !important;
    border-radius: 24px !important;
  }
  #pyrkPollCalendarHardFixModal .pyrk-poll-calendar-toolbar {
    grid-template-columns: 34px 38px minmax(0, 1fr) 38px 34px !important;
    gap: 5px !important;
  }
  #pyrkPollCalendarHardFixModal .pyrk-poll-cal-nav {
    height: 36px !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
  }
  #pyrkPollCalendarHardFixModal .pyrk-poll-calendar-current {
    height: 36px !important;
    font-size: .82rem !important;
    padding: 0 5px !important;
  }
  #pyrkPollCalendarHardFixModal .pyrk-poll-calendar-day,
  #pyrkPollCalendarHardFixModal .pyrk-poll-calendar-empty {
    height: 34px !important;
    border-radius: 10px !important;
    font-size: .84rem !important;
  }
}


/* Poll email delivery modal */
.poll-email-modal[hidden]{display:none!important}
.poll-email-modal{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;padding:18px;background:rgba(15,23,42,.42);backdrop-filter:blur(4px)}
.poll-email-card{width:min(760px,96vw);max-height:calc(100vh - 36px);overflow:auto;border-radius:28px;border:1px solid rgba(15,23,42,.10);background:#fff;box-shadow:0 34px 100px rgba(15,23,42,.34)}
.poll-email-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid #eef2f6;background:rgba(255,255,255,.96)}
.poll-email-form{display:grid;gap:16px;padding:22px 24px 26px}.poll-email-form label{display:grid;gap:7px;font-weight:900;color:#0f172a}.poll-email-form textarea{min-height:130px}
.poll-email-summary{display:grid;gap:10px;padding:14px;border:1px solid rgba(15,127,85,.16);border-radius:20px;background:#ecfdf3}.email-recipient-count{display:flex;align-items:center;gap:10px}.email-recipient-count strong{font-size:2rem;color:#0f7f55}.email-recipient-count span{font-weight:900;color:#166534}.email-recipient-sample{display:flex;flex-wrap:wrap;gap:6px}.email-recipient-sample span{padding:5px 8px;border-radius:999px;background:#fff;color:#475569;font-size:.78rem;font-weight:800}.poll-email-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid #eef2f6;padding-top:14px}
@media(max-width:760px){.poll-email-head,.poll-email-actions{display:grid}.poll-email-card{border-radius:22px}.poll-email-form,.poll-email-head{padding:16px}}

.poll-group-row.is-disabled { opacity:.55; filter: grayscale(.2); cursor:not-allowed; }
.group-picker-panel { border-color: rgba(59,130,246,.18); background: linear-gradient(135deg,#eff6ff,#fff); }
