:root{
  --wis-pink:#e11d48;
  --wis-pink-dark:#be123c;

  --wis-blue:#2563eb;
  --wis-green:#16a34a;
  --wis-red:#dc2626;
  --wis-amber:#f59e0b;

  --wis-bg:#f5f5f5;
  --wis-card:#ffffff;
  --wis-text:#171717;
  --wis-muted:#737373;
  --wis-border:#e5e5e5;

  --wis-shadow:0 6px 24px rgba(0,0,0,.06);
  --wis-radius:16px;
}

.wis-admin-shell{
  max-width:1200px;
  padding:22px 12px;
}

.wis-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}

.wis-top-title{
  font-size:22px;
  font-weight:700;
  color:var(--wis-text);
}

.wis-kpis{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:16px;
  margin-bottom:16px;
}

.wis-kpi{
  background:var(--wis-card);
  border:1px solid var(--wis-border);
  border-radius:var(--wis-radius);
  box-shadow:var(--wis-shadow);
  padding:18px;
  position:relative;
  min-height:120px;
}

.wis-kpi-ic{
  width:48px;
  height:48px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  margin-bottom:16px;
}

.wis-kpi-ic svg{ display:block; }

.wis-blue{ background:var(--wis-blue); }
.wis-green{ background:var(--wis-green); }
.wis-red{ background:var(--wis-red); }
.wis-amber{ background:var(--wis-amber); }

.wis-kpi-num{
  font-size:34px;
  font-weight:800;
  color:var(--wis-text);
  line-height:1;
}

.wis-kpi-lbl{
  margin-top:10px;
  font-size:13px;
  color:var(--wis-muted);
}

.wis-rate{
  background:var(--wis-card);
  border:1px solid var(--wis-border);
  border-radius:var(--wis-radius);
  box-shadow:var(--wis-shadow);
  padding:18px;
  margin-bottom:16px;
}

.wis-rate-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.wis-rate-title{
  font-weight:700;
  color:var(--wis-text);
}

.wis-rate-val{
  color:var(--wis-muted);
  font-weight:700;
}

.wis-rate-bar{
  width:100%;
  height:10px;
  border-radius:999px;
  background:#ededed;
  overflow:hidden;
}

.wis-rate-fill{
  height:10px;
  width:0%;
  background:var(--wis-pink);
  border-radius:999px;
}

.wis-tabs{
  background:var(--wis-card);
  border:1px solid var(--wis-border);
  border-radius:999px;
  box-shadow:var(--wis-shadow);
  padding:6px;
  display:flex;
  gap:6px;
  margin-bottom:14px;
  width:max-content;
}

.wis-tab{
  appearance:none;
  border:1px solid transparent;
  background:transparent;
  border-radius:999px;
  padding:10px 14px;
  font-weight:700;
  color:var(--wis-muted);
  cursor:pointer;
  display:flex;
  gap:8px;
  align-items:center;
}

.wis-tab svg{ opacity:.8; }

.wis-tab.is-active{
  background:#fafafa;
  border-color:var(--wis-border);
  color:var(--wis-text);
}

.wis-tabpanel{ display:none; }
.wis-tabpanel.is-active{ display:block; }

.wis-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.wis-search{
  background:var(--wis-card);
  border:1px solid var(--wis-border);
  border-radius:999px;
  padding:10px 14px;
  display:flex;
  gap:10px;
  align-items:center;
  flex:1;
  box-shadow:var(--wis-shadow);
}

.wis-search input{
  border:0;
  outline:none;
  width:100%;
  background:transparent;
  font-size:14px;
}

.wis-tools{
  display:flex;
  gap:10px;
  align-items:center;
}

.wis-iconbtn{
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid var(--wis-border);
  background:var(--wis-card);
  cursor:pointer;
  box-shadow:var(--wis-shadow);
  display:flex;
  align-items:center;
  justify-content:center;
}

.wis-iconbtn:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.wis-btn{
  border-radius:999px;
  border:1px solid var(--wis-border);
  background:var(--wis-card);
  padding:10px 14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  color:var(--wis-text);
  box-shadow:var(--wis-shadow);
}

.wis-btn svg{ opacity:.9; }

.wis-btn-primary{
  background:var(--wis-pink);
  border-color:var(--wis-pink);
  color:#fff;
}

.wis-btn-primary:hover{
  background:var(--wis-pink-dark);
  border-color:var(--wis-pink-dark);
}

.wis-btn-light{
  background:#fff;
}

.wis-btn-wide{
  width:100%;
  justify-content:center;
}

.wis-tablecard{
  background:var(--wis-card);
  border:1px solid var(--wis-border);
  border-radius:var(--wis-radius);
  box-shadow:var(--wis-shadow);
  overflow:hidden;
}

.wis-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

.wis-table thead th{
  text-align:left;
  font-size:13px;
  padding:14px 14px;
  color:var(--wis-muted);
  border-bottom:1px solid var(--wis-border);
  background:#fff;
}

.wis-table tbody td{
  padding:14px 14px;
  border-bottom:1px solid #f0f0f0;
  vertical-align:middle;
  color:var(--wis-text);
  font-size:14px;
}

.wis-table tbody tr:last-child td{
  border-bottom:none;
}

.wis-td-title{
  font-weight:700;
}

.wis-td-sub{
  margin-top:4px;
  font-size:12px;
  color:var(--wis-muted);
}

.wis-th-actions,
.wis-td-actions{
  text-align:right;
  white-space:nowrap;
}

.wis-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--wis-border);
  background:#fafafa;
  color:var(--wis-muted);
  text-transform:lowercase;
}

.wis-pill-attending{
  border-color:rgba(22,163,74,.25);
  background:rgba(22,163,74,.08);
  color:var(--wis-green);
}

.wis-pill-declined{
  border-color:rgba(220,38,38,.25);
  background:rgba(220,38,38,.08);
  color:var(--wis-red);
}

.wis-pill-pending{
  border-color:rgba(245,158,11,.25);
  background:rgba(245,158,11,.10);
  color:#b45309;
}

.wis-action{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--wis-border);
  background:#fff;
  cursor:pointer;
  margin-left:6px;
}

.wis-action:hover{
  background:#fafafa;
}

.wis-action.wis-del{
  color:var(--wis-red);
}

.wis-modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.45);
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.wis-modal-card{
  width:min(620px, 100%);
  background:#fff;
  border:1px solid var(--wis-border);
  border-radius:var(--wis-radius);
  box-shadow:var(--wis-shadow);
  padding:18px;
}

.wis-modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.wis-modal-title{
  font-size:18px;
  font-weight:800;
  color:var(--wis-text);
}

.wis-modal-sub{
  color:var(--wis-muted);
  margin-bottom:14px;
  line-height:1.4;
}

.wis-field{
  margin-bottom:12px;
}

.wis-field-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.wis-label{
  display:block;
  font-weight:700;
  color:var(--wis-text);
  margin-bottom:6px;
}

.wis-input,
.wis-textarea{
  width:100%;
  border:1px solid var(--wis-border);
  border-radius:14px;
  padding:12px 12px;
  outline:none;
  font-size:14px;
  background:#fff;
}

.wis-input:focus,
.wis-textarea:focus{
  box-shadow:0 0 0 3px rgba(225,29,72,.12);
  border-color:#f3a0b3;
}

.wis-textarea{ resize:vertical; }

.wis-help{
  margin-top:6px;
  font-size:12px;
  color:var(--wis-muted);
}

.wis-modal-msg{
  margin-top:10px;
  color:var(--wis-muted);
  font-size:13px;
}

.wis-wa-actions{
  display:flex;
  gap:10px;
  margin-top:10px;
}

.wis-tracking-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.wis-tracking-title{
  font-size:18px;
  font-weight:800;
  color:var(--wis-text);
}

.wis-tracking-actions{
  display:flex;
  gap:10px;
}

.wis-tracking-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:14px;
}

.wis-track-col{
  background:#fff;
  border:1px solid var(--wis-border);
  border-radius:var(--wis-radius);
  box-shadow:var(--wis-shadow);
  overflow:hidden;
}

.wis-track-head{
  padding:12px 14px;
  border-bottom:1px solid var(--wis-border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.wis-track-name{
  font-weight:800;
  color:var(--wis-text);
}

.wis-track-count{
  font-weight:800;
  color:var(--wis-muted);
}

.wis-track-list{
  padding:10px 14px;
  max-height:520px;
  overflow:auto;
}

.wis-track-item{
  padding:10px 0;
  border-bottom:1px solid #f1f1f1;
}

.wis-track-item:last-child{
  border-bottom:none;
}

.wis-track-att{
  font-weight:700;
  color:var(--wis-text);
}

.wis-track-meta{
  margin-top:4px;
  font-size:12px;
  color:var(--wis-muted);
}

.wis-track-meta a{
  color:var(--wis-pink);
  text-decoration:none;
}

.wis-track-empty{
  color:var(--wis-muted);
  font-size:13px;
  padding:10px 0;
}

.wis-settings-card{
  background:#fff;
  border:1px solid var(--wis-border);
  border-radius:var(--wis-radius);
  box-shadow:var(--wis-shadow);
  padding:18px;
}

.wis-settings-note{
  color:var(--wis-muted);
  margin-bottom:10px;
  line-height:1.4;
}

.wis-set-row{
  margin-bottom:14px;
}

.wis-set-label{
  font-weight:800;
  color:var(--wis-text);
  display:block;
  margin-bottom:6px;
}

@media (max-width: 1024px){
  .wis-kpis{ grid-template-columns:repeat(2, minmax(0,1fr)); }
  .wis-tracking-grid{ grid-template-columns:1fr; }
  .wis-tools{ flex-wrap:wrap; justify-content:flex-end; }
}
.wis-action.wis-wa{
  color:#25d366;
}
.wis-att-btns{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.wis-btn{
  transition:transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease, color .12s ease;
}

.wis-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}

.wis-btn-yes:hover{
  background:rgba(22,163,74,.12);
  border-color:rgba(22,163,74,.45);
}

.wis-btn-no:hover{
  background:rgba(220,38,38,.12);
  border-color:rgba(220,38,38,.45);
}

/* Selected state on the buttons */
.wis-att-card.wis-attending .wis-btn-yes{
  background:rgba(22,163,74,.18);
  border-color:rgba(22,163,74,.65);
  color:#0f3d1f;
}

.wis-att-card.wis-declined .wis-btn-no{
  background:rgba(220,38,38,.18);
  border-color:rgba(220,38,38,.65);
  color:#4a0c0c;
}
#wisRsvpApp .wis-att-btns{
  display:flex !important;
  gap:14px !important;
  flex-wrap:wrap !important;
  padding-bottom: 10px;
}

#wisRsvpApp .wis-att-btns .wis-btn{
  margin:0 !important;
}

#wisRsvpApp .wis-btn-yes{
  margin-right:14px !important;
}

#wisRsvpApp .wis-btn-yes:hover{
  background:rgba(22,163,74,.12) !important;
}

#wisRsvpApp .wis-btn-no:hover{
  background:rgba(220,38,38,.12) !important;
}
@media (max-width: 768px){

  /* Toolbar layout */
  .wis-toolbar{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }

  .wis-search{
    width:100%;
    flex:0 0 auto;
  }

  .wis-tools{
    width:100%;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:10px;
  }

  /* Make table horizontally scrollable if needed */
  .wis-tablecard{
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }

  .wis-table{
    min-width:680px;
  }

  /* Hide columns on mobile: slug + created */
  .wis-table thead th:nth-child(3),
  .wis-table tbody td:nth-child(3),
  .wis-table thead th:nth-child(5),
  .wis-table tbody td:nth-child(5){
    display:none;
  }

  /* Keep actions visible and readable */
  .wis-td-actions{
    text-align:right;
    position:sticky;
    right:0;
    background:#fff;
    padding-right:12px;
    min-width:150px;
  }

  .wis-th-actions{
    position:sticky;
    right:0;
    background:#fff;
    min-width:150px;
  }

  /* Make attendee cell wrap nicely */
  .wis-td-title{
    font-size:14px;
    line-height:1.25;
    word-break:break-word;
  }

  code{
    white-space:normal;
    word-break:break-word;
  }

  /* Slightly smaller action buttons for mobile */
  .wis-action{
    width:32px;
    height:32px;
    border-radius:10px;
  }
}
.wis-wa-template-pick .wis-btn{
  min-width:140px;
}
/* WhatsApp modal template chooser layout */
#wisModalWa .wis-modal-card{
  width:min(720px, 100%);
}

#wisModalWa .wis-wa-actions{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

#wisModalWa .wis-wa-actions > div{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

#wisWaPick{
  margin-top:0 !important;
  padding-left:0;
  border-left:none;
}

#wisWaPick > div:first-child{
  font-weight:800;
  margin-bottom:8px;
}

#wisWaPick button{
  border-radius:999px;
  padding:10px 14px;
  border:1px solid var(--wis-border);
  background:#fff;
  font-weight:800;
}

#wisWaPick button:disabled{
  opacity:.5;
}

/* Make Open WhatsApp button consistent */
#wisOpenWa.wis-btn-primary{
  text-decoration:none;
}

/* Mobile: stack nicely */
@media (max-width: 768px){
  #wisModalWa .wis-wa-actions{
    align-items:stretch;
  }

  #wisModalWa .wis-wa-actions a,
  #wisModalWa .wis-wa-actions button{
    width:100%;
    justify-content:center;
  }

  #wisWaPick{
    width:100%;
  }

  #wisWaPick > div:nth-child(2){
    width:100%;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
  }

  #wisWaPick button{
    flex:1 1 160px;
  }
}

