.admin-body{background:var(--page-bg,#f6f3f6);min-height:100vh}
.sidebar{position:fixed;inset:0 0 0 auto;width:244px;background:#261d27;color:#fff;padding:1.35rem;display:flex;flex-direction:column;z-index:20}
.sidebar nav{display:grid;gap:.35rem;margin:2rem 0 auto}
.sidebar nav a{padding:.8rem;border-radius:10px;color:#d8d0d7}
.sidebar nav a:hover{background:#ffffff13;color:#fff}
.sidebar .link-button{color:#e7cde1}
.admin-main{margin-right:244px;min-height:100vh}
.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);padding:0 2rem;display:flex;align-items:center;justify-content:flex-end}
.topbar>div{display:grid}
.menu-toggle{display:none}
.content{max-width:1380px;margin:auto;padding:2rem}
.page-head{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1.25rem}
.page-head h1{margin:0}
.section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.section-head p{color:var(--muted);margin-bottom:0}
.event-summary{display:flex;justify-content:space-between;align-items:flex-start}
.stats-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:1rem;margin-bottom:1.2rem}
.stats-grid article{padding:1.15rem;background:#fff;border:1px solid var(--line);border-radius:16px}
.stats-grid span{display:block;color:var(--muted);font-size:.83rem}
.stats-grid strong{display:block;font-size:1.8rem;margin-top:.3rem}
.danger-card strong{color:var(--danger)}
.action-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}
.action-grid a{background:#fff;border:1px solid var(--line);border-radius:16px;padding:1.2rem;transition:.18s}
.action-grid a:hover{border-color:var(--brand);transform:translateY(-2px)}
.action-grid strong,.action-grid span{display:block}
.action-grid span{color:var(--muted);font-size:.84rem;margin-top:.35rem}
.invitation-tools{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.tool-form{display:grid;grid-template-columns:1fr auto auto auto auto;gap:.8rem;align-items:end;border:1px solid #eee8ed;border-radius:14px;padding:1rem;background:#fff}
.tool-form h2{margin:0 0 .25rem}
.tool-form p{margin:0;color:var(--muted);font-size:.86rem}
.tool-form label{min-width:130px}
.qr-cell{display:flex;align-items:center;gap:.75rem}
.qr-cell img{width:72px;height:72px;border:1px solid var(--line);border-radius:12px;background:#fff;padding:4px}
.text-link.inline{display:inline-block;text-align:right;margin:.35rem 0 0;font-size:.82rem}
.sms-log-text{white-space:normal;min-width:280px;max-width:520px}
.sms-log-text strong,.sms-log-text small{display:block}
.sms-status-cell small{display:block;margin-top:.25rem;color:var(--muted);font-size:.75rem}
.sms-actions{min-width:115px}
.sms-actions form{margin:0}
.mini-stack{display:grid;gap:.15rem;margin:.15rem 0}
.source-data{min-width:260px;max-width:520px;white-space:normal}
.source-data span{display:block;margin:.15rem 0;color:var(--muted);font-size:.84rem}
.source-data b{color:var(--text)}

.invitation-tools{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;background:linear-gradient(135deg,#fff,#fff7fc);padding:1.1rem}
.tool-card{display:grid;gap:1rem;align-content:start;border:1px solid #eadfe7;border-radius:18px;padding:1.1rem;background:#fff;box-shadow:0 10px 30px #7b285c0b}
.tool-card-head{display:flex;align-items:flex-start;gap:.8rem}
.tool-card h2{margin:0;font-size:1.08rem}
.tool-card p{margin:.18rem 0 0;color:var(--muted);font-size:.86rem;line-height:1.8}
.tool-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:14px;background:#f5dced;color:var(--brand);font-weight:900;font-size:1.15rem}
.tool-icon.soft{background:#fff0f8;color:#8d176e}
.tool-card-body{display:grid;grid-template-columns:minmax(140px,220px) 1fr;gap:.9rem;align-items:end}
.tool-card-body.two{grid-template-columns:repeat(2,minmax(170px,1fr))}
.check-row{display:flex;align-items:center;gap:.85rem;flex-wrap:wrap;padding:.68rem .75rem;border:1px solid #eadfe7;border-radius:12px;background:#fffafd}
.btn.wide{justify-self:start;min-width:142px}
.btn.danger{background:#fff1f1;color:var(--danger);border:1px solid #f0caca}
.btn.danger:hover{box-shadow:0 8px 18px #b3261e14}
.head-actions form{margin:0}
.action-table{overflow:visible}
.action-menu{position:relative;display:inline-block;direction:rtl}
.action-menu summary{list-style:none;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);font-weight:900;font-size:1.35rem;line-height:1;cursor:pointer;transition:.18s}
.action-menu summary::-webkit-details-marker{display:none}
.action-menu[open] summary,.action-menu summary:hover{border-color:#e2bdd8;background:#fff6fc;color:var(--brand)}
.action-menu>div{position:absolute;left:0;top:calc(100% + .35rem);z-index:30;display:grid;gap:.15rem;min-width:178px;padding:.45rem;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:0 18px 55px #32122622}
.action-menu a,.action-menu button{display:block;width:100%;border:0;background:transparent;border-radius:10px;padding:.65rem .8rem;text-align:right;color:var(--text);font-weight:750;white-space:nowrap}
.action-menu a:hover,.action-menu button:hover{background:#fff4fb;color:var(--brand)}
.action-menu form{margin:0}
.action-menu .danger-menu-action{color:var(--danger)}
.action-menu .danger-menu-action:hover{background:#fff1f1;color:var(--danger)}
.users-table td{vertical-align:middle}
.user-actions{display:table-cell;width:1%;min-width:70px}
#user-dialog{width:min(92vw,680px);max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);overflow:auto}
.user-dialog-card{width:100%;min-width:0}
.modal-check{align-self:end;min-height:45px;padding:.72rem .8rem;border:1px solid #eadfe7;border-radius:12px;background:#fffafd}
.actions form{margin:0}
.actions .danger-text{padding-inline:.25rem}
.invitation-filter{align-items:center;padding:.2rem 0}
.invitation-filter select{min-width:210px;max-width:240px;background-color:#fff}
.invitation-table-wrap{padding:.4rem 1.25rem}
.invitations-table th{padding-block:1rem;color:#746872;font-size:.8rem;font-weight:800}
.invitations-table td{padding-block:1rem;vertical-align:middle}
.invitations-table tbody tr{transition:background .18s}
.invitations-table tbody tr:hover{background:#fffafd}
.invitation-recipient{min-width:280px;white-space:normal}
.invitation-recipient strong,.invitation-recipient small{display:block}
.invitation-recipient small{margin-top:.28rem;color:var(--muted);font-size:.82rem}
.invitation-mobile{font-variant-numeric:tabular-nums;text-align:right}
.invitation-sent-at{color:#6e626b;font-size:.88rem;font-variant-numeric:tabular-nums}
.invitation-actions{display:table-cell;width:1%;min-width:128px;color:var(--brand);font-weight:700}
.invitation-actions form{display:inline-flex;margin:0}
.invitation-send-button{min-width:106px;border:1px solid #ead2e3;box-shadow:none;cursor:pointer}
.invitation-send-button:hover{background:#ead0e3;box-shadow:0 7px 16px #8d176e14}
.invitation-batch-options{align-items:center;justify-content:flex-start;gap:1rem}
.invitation-batch-options .check{white-space:nowrap}
.action-unavailable{display:inline-grid;place-items:center;width:106px;color:#aaa0a8}
.status-ready{background:#f0edf0;color:#625861}
.status-queued{background:#fff1d7;color:#8b5d08}
.status-sent{background:#e4f3ff;color:#17618d}
.status-opened{background:#eee8ff;color:#5e45a0}
.status-registered{background:#dff5e8;color:var(--success)}
.status-failed{background:#fde8e7;color:var(--danger)}
.registrations-table td{vertical-align:middle}
.registration-actions{width:1%;min-width:70px}
.compact-dialog{width:min(92vw,440px)}
.compact-dialog .dialog-head{align-items:flex-start}
.compact-dialog .dialog-head h2{margin:.15rem 0 0}
.dialog-description{margin:0;color:var(--muted);line-height:1.9}
.dialog-description strong{color:var(--text)}
.dialog-actions{justify-content:flex-start}
.audience-heading{align-items:end}
.audience-heading h2{margin:.15rem 0}
.audience-search{margin:0;min-width:min(100%,430px)}
.audience-search input{min-width:320px}
.audience-table td{vertical-align:middle}
.manual-badge{display:inline-flex!important;width:max-content;margin-top:.3rem!important;padding:.18rem .45rem;border-radius:999px;background:#f7e5f2;color:var(--brand);font-size:.68rem!important;font-weight:800}
.import-details summary{cursor:pointer;color:var(--brand);font-weight:800}
.import-details-list{display:grid;gap:.5rem;min-width:260px;max-width:420px;margin-top:.65rem}
.import-details-list p{margin:0;padding:.55rem .7rem;border:1px solid var(--border);border-radius:8px;background:#fffafd;white-space:normal}
.import-details-list strong,.import-details-list span,.import-details-list small{display:block}
.import-details-list small{margin-top:.25rem;color:var(--muted)}
.audience-dialog{width:min(92vw,580px)}
.audience-dialog .dialog-head{align-items:flex-start}
.audience-dialog .dialog-head h2{margin:.15rem 0 0}
.student-actions{display:table-cell;width:1%;min-width:112px}
.student-actions form{display:inline-flex;margin:0}
.student-dialog{width:min(92vw,540px)}
.student-dialog .dialog-head{align-items:flex-start}
.student-dialog .dialog-head h2{margin:.15rem 0 0}
.student-dialog h3{margin:.2rem 0 0;font-size:1rem}
.student-dialog hr{width:100%;border:0;border-top:1px solid var(--line);margin:.2rem 0}
.dialog-fields{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.bulk-sms-stats{grid-template-columns:repeat(4,1fr)}
.bulk-sms-filter select{min-width:190px;background-color:#fff}
.bulk-sms-shell{display:grid;gap:1rem}
.bulk-sms-composer{display:grid;gap:1rem;padding:1.1rem}
.bulk-sms-composer .section-head{margin-bottom:0}
.bulk-sms-composer textarea{min-height:132px;line-height:2;resize:vertical}
.bulk-sms-composer code{direction:ltr;display:inline-block;color:var(--brand)}
.bulk-sms-selected{display:grid;place-items:center;min-width:112px;padding:.8rem 1rem;border:1px solid #eadfe7;border-radius:14px;background:#fffafd}
.bulk-sms-selected strong{font-size:1.7rem;line-height:1;color:var(--brand)}
.bulk-sms-selected span{margin-top:.25rem;color:var(--muted);font-size:.78rem}
.bulk-sms-actions{display:flex;gap:.75rem;flex-wrap:wrap}
.bulk-sms-test{display:flex;gap:.65rem;flex-wrap:wrap;align-items:end;padding-top:.85rem;border-top:1px solid var(--line)}
.bulk-sms-test input{max-width:260px}
.bulk-sms-table-tools{display:flex;gap:.65rem;flex-wrap:wrap;padding:1rem 1rem .25rem}
.bulk-sms-table th:first-child,.bulk-sms-table td:first-child{width:48px;text-align:center}
.bulk-sms-table td{vertical-align:middle}
.bulk-sms-table td:nth-child(2),.bulk-sms-table td:nth-child(4){min-width:240px;white-space:normal}
.bulk-sms-table td:last-child small{display:block;margin-top:.25rem;color:var(--muted)}
.event-logo-field{display:grid;gap:.6rem}
.event-logo-preview{display:flex;align-items:center;gap:.75rem;width:max-content;max-width:100%;padding:.55rem .7rem;border:1px solid var(--line);border-radius:14px;background:#fffafd;color:var(--muted);font-size:.78rem}
.event-logo-preview img{width:96px;height:58px;object-fit:contain;border-radius:9px;background:#fff}
.feedback-stats{grid-template-columns:repeat(4,1fr)}
.survey-page-head{align-items:flex-start}
.survey-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;margin-bottom:1rem}
.survey-nav a{display:grid;gap:.25rem;min-width:0;padding:.85rem 1rem;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--text);transition:.18s}
.survey-nav a:hover,.survey-nav a.is-active{border-color:#e0b7d4;background:#fff6fc;box-shadow:0 10px 28px #8d176e0d}
.survey-nav strong,.survey-nav span{display:block;white-space:normal}
.survey-nav strong{font-size:.95rem}
.survey-nav span{color:var(--muted);font-size:.78rem;line-height:1.7}
.survey-stats article{border-radius:14px}
.survey-workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(280px,.65fr);gap:1rem;margin-bottom:1rem}
.survey-workspace .panel{margin:0}
.survey-next-actions{display:grid;gap:.65rem}
.survey-next-actions a{display:grid;gap:.2rem;padding:.8rem;border:1px solid var(--line);border-radius:12px;background:#fffafd;color:var(--text)}
.survey-next-actions a:hover{border-color:#e0b7d4;color:var(--brand)}
.survey-next-actions span{color:var(--muted);font-size:.8rem;line-height:1.7}
.survey-builder-panel .section-head{align-items:center}
.survey-add-question{margin-bottom:1rem;border:1px dashed #dec9da;border-radius:16px;background:#fffafd}
.survey-add-question>summary{list-style:none;padding:1rem;color:var(--brand);font-weight:850;cursor:pointer}
.survey-add-question>summary::-webkit-details-marker{display:none}
.survey-add-question[open]>summary{border-bottom:1px solid #eadfe7}
.survey-add-question .survey-question-form{margin:0;border:0;border-radius:0;background:transparent}
.survey-question-form{display:grid;gap:1rem;padding:1rem;border:1px dashed #dec9da;border-radius:16px;background:#fffafd;margin-bottom:1.2rem}
.survey-question-list,.participant-question-list{display:grid;gap:1rem}
.survey-question-item,.participant-question-item{display:grid;gap:.9rem;padding:1rem;border:1px solid var(--line);border-radius:16px;background:#fff}
.survey-question-item{position:relative}
.survey-question-item>.link-button{justify-self:start}
.survey-question-list.compact{gap:.7rem}
.survey-question-list.compact .survey-question-item{display:block;padding:0;overflow:hidden}
.survey-question-list.compact .survey-question-item>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;cursor:pointer}
.survey-question-list.compact .survey-question-item>summary::-webkit-details-marker{display:none}
.survey-question-list.compact .survey-question-item[open]>summary{border-bottom:1px solid var(--line);background:#fffafd}
.survey-question-list.compact .survey-question-item summary span{display:grid;gap:.25rem;min-width:0}
.survey-question-list.compact .survey-question-item summary strong{line-height:1.8;white-space:normal}
.survey-question-list.compact .survey-question-item summary small{color:var(--muted);font-size:.78rem}
.survey-question-list.compact .survey-question-item summary b{flex:0 0 auto;color:var(--muted);font-size:.78rem}
.survey-question-list.compact .survey-question-item form{padding:1rem}
.survey-question-list.compact .survey-question-item>form:last-child{padding-top:0}
.survey-delivery-tools{margin-bottom:1rem}
.participant-question-meta{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;color:var(--muted)}
.participant-question-meta strong{color:var(--text)}
.participant-question-item blockquote{margin:0;padding:1rem;border-right:4px solid var(--brand);border-radius:12px;background:var(--soft);line-height:2}
.surveys-table-wrap td{vertical-align:middle}
.surveys-table-wrap td:first-child{min-width:260px;white-space:normal}
.survey-create-form{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:1.25rem;width:100%;max-width:680px;margin-inline:auto;padding:1.5rem;border-radius:8px}
.survey-create-form .section-head{margin-bottom:0;padding-bottom:1rem;border-bottom:1px solid var(--line)}
.survey-create-form h2{margin:0}
.survey-create-form label{min-width:0;align-content:start}
.survey-create-form input,.survey-create-form select{height:48px}
.survey-create-form select{background-color:#fff}
.survey-create-form textarea{resize:vertical;min-height:128px}
.survey-create-form .notice{margin:0;line-height:1.9}
.survey-create-form [hidden]{display:none}
.survey-create-form .form-actions{padding-top:1rem;border-top:1px solid var(--line)}
.survey-create-empty{display:grid;justify-items:center;gap:.75rem;max-width:760px;margin-inline:auto;padding:2.5rem 1.5rem;text-align:center}
.survey-create-empty h2,.survey-create-empty p{margin:0}
.survey-create-empty p{color:var(--muted)}
.survey-insights{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-bottom:1rem}
.insight-card{display:grid;gap:1rem;min-width:0;padding:1rem;border:1px solid var(--line);border-radius:16px;background:#fff}
.insight-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.insight-head strong{line-height:1.8}
.insight-head span{flex:0 0 auto;color:var(--muted);font-size:.82rem}
.rating-average{display:flex;align-items:baseline;gap:.5rem}
.rating-average span{color:var(--muted);font-size:.82rem}
.rating-average strong{font-size:2rem;color:var(--brand);line-height:1}
.bar-list{display:grid;gap:.55rem}
.bar-row{display:grid;grid-template-columns:minmax(24px,auto) 1fr minmax(32px,auto);gap:.55rem;align-items:center}
.bar-row span{font-weight:800;line-height:1.6;white-space:normal}
.bar-row div{height:10px;overflow:hidden;border-radius:999px;background:#f3edf2}
.bar-row i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),#d96bb8)}
.bar-row b{color:var(--muted);font-size:.82rem;text-align:left}
.option-bar{grid-template-columns:minmax(90px,180px) 1fr minmax(32px,auto)}
.text-samples{display:grid;gap:.55rem;max-height:360px;overflow-y:auto;overscroll-behavior:contain;padding-inline-end:.35rem}
.text-sample{display:grid;gap:.35rem;padding:.7rem;border-radius:12px;background:var(--soft);color:var(--muted);line-height:1.9;white-space:normal;overflow-wrap:anywhere}
.text-sample strong{color:var(--text);font-size:.82rem;line-height:1.6}
.text-sample p{margin:0}
.response-details{border:1px solid var(--line);border-radius:16px;background:#fff}
.response-details>summary{list-style:none;padding:1rem;font-weight:850;cursor:pointer;color:var(--brand)}
.response-details>summary::-webkit-details-marker{display:none}
.response-details[open]>summary{border-bottom:1px solid var(--line)}
.response-list{display:grid;gap:1rem;padding:1rem}
.response-card{display:grid;gap:.8rem;padding:1rem;border:1px solid var(--line);border-radius:16px;background:#fff}
.response-row{display:grid;grid-template-columns:minmax(180px,280px) 1fr;gap:1rem;padding:.75rem;border-radius:12px;background:var(--soft)}
.response-row strong{line-height:1.8}
.response-row span{color:var(--muted);line-height:1.9;white-space:normal;overflow-wrap:anywhere}
.preview-response-card{border-color:#ead2e3;background:#fffafd}
.status-draft{background:#f0edf0;color:#625861}
.status-published{background:#dff5e8;color:var(--success)}
.status-closed{background:#fde8e7;color:var(--danger)}
.status-pending{background:#fff1d7;color:#8b5d08}
.status-answered{background:#e4f3ff;color:#17618d}
.lottery-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.lottery-admin-grid .tool-form{grid-template-columns:1fr auto;margin:0}
.lottery-admin-grid .lottery-admin-settings{grid-template-columns:1fr auto auto}
.lottery-admin-filter,.lottery-admin-settings{align-items:end}
.lottery-admin-exclude{align-self:end;min-height:48px}
.lottery-admin-stats{grid-template-columns:repeat(3,1fr)}
.lottery-admin-winners{min-width:360px;white-space:normal}
.lottery-admin-winners span{display:block;margin:.2rem 0;line-height:1.8}
.lottery-admin-winners b{direction:ltr;display:inline-block;font-family:ui-monospace,Menlo,monospace;color:var(--brand);margin-left:.35rem}
.lottery-admin-winners small{display:inline;color:var(--muted);font-family:ui-monospace,Menlo,monospace;margin-right:.35rem}

@media (max-width:900px){
  .invitation-tools{grid-template-columns:1fr}
  .survey-nav,.survey-workspace{grid-template-columns:1fr}
  .lottery-admin-grid,.lottery-admin-stats{grid-template-columns:1fr}
  .bulk-sms-stats{grid-template-columns:1fr 1fr}
  .lottery-admin-grid .tool-form{grid-template-columns:1fr}
  .feedback-stats{grid-template-columns:repeat(2,1fr)}
  .survey-insights{grid-template-columns:1fr}
  .response-row{grid-template-columns:1fr}
  .tool-card-body,.tool-card-body.two{grid-template-columns:1fr}
  .action-table{overflow-x:auto}
  .invitation-table-wrap{padding:.25rem .8rem}
  .audience-heading{align-items:stretch;flex-direction:column}
  .audience-search,.audience-search input{min-width:0;max-width:none;width:100%}
  .bulk-sms-filter select{min-width:0;width:100%}
  .dialog-fields{grid-template-columns:1fr}
}
.response-people-panel .section-head{align-items:center}
.response-table-wrap{overflow:visible;padding:.25rem 0}
.response-table td{vertical-align:middle}
.response-table td:first-child{min-width:220px;white-space:normal}
.response-table td:nth-child(3){min-width:180px;white-space:normal}
.response-table td:nth-child(7){min-width:130px}
.response-actions{display:table-cell;width:1%;min-width:76px}
.response-detail-dialog{width:min(94vw,920px);max-height:calc(100vh - 2rem);max-height:calc(100dvh - 2rem);overflow:auto}
.response-detail-card{width:100%;min-width:0}
.response-modal-meta{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.response-modal-meta div{min-width:0;padding:.8rem;border:1px solid var(--line);border-radius:14px;background:#fffafd}
.response-modal-meta span,.response-modal-meta strong{display:block}
.response-modal-meta span{color:var(--muted);font-size:.78rem;margin-bottom:.25rem}
.response-modal-meta strong{font-size:.9rem;line-height:1.8;white-space:normal;overflow-wrap:anywhere}
.response-modal-answers{display:grid;gap:.7rem}
.response-scroll-panel{max-height:min(52vh,520px);overflow-y:auto;overscroll-behavior:contain;padding-inline-end:.35rem}
.response-modal-answers .response-row{grid-template-columns:minmax(220px,340px) 1fr}
.participant-final-question{background:#fff8ef}
.participant-final-answer{background:#edf8f1}

@media (max-width:900px){
  .response-table-wrap{overflow-x:auto}
  .response-modal-meta{grid-template-columns:1fr 1fr}
  .response-modal-answers .response-row{grid-template-columns:1fr}
}

@media (max-width:620px){
  .response-modal-meta{grid-template-columns:1fr}
}
