:root{
  --bg:#efe4d0;
  --bg2:#f6efdf;
  --card:#fff8ea;
  --card2:#fff2db;
  --text:#2b241c;
  --muted:#6b5b4b;
  --line:rgba(50,35,25,.14);

  --green:#1b8f56;

  --shadow: 0 12px 26px rgba(70,45,25,.16);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(1200px 800px at 20% 0%, var(--bg2) 0%, var(--bg) 55%) fixed;
  color:var(--text);
  font-weight: 650;
}

.topbar{
  position:sticky;
  top:0;
  z-index:9999;
  pointer-events:auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 16px;
  background: rgba(255,248,234,.90);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:42px;height:42px;border-radius:12px;
  background: linear-gradient(135deg, rgba(27,143,86,.18), rgba(255,255,255,.60));
  display:grid;place-items:center;
  border:1px solid rgba(27,143,86,.30);
  box-shadow: var(--shadow);
  font-weight:950;
}
.brandText .title{font-weight:950; letter-spacing:.2px}
.brandText .subtitle{font-size:12px; color:var(--muted); margin-top:2px; font-weight:750}

.topActions{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.tabs{display:flex; gap:8px; flex-wrap:wrap}

.tab{
  border:1px solid rgba(60,40,20,.18);
  background: rgba(255,255,255,.55);
  color:var(--text);
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
}
.tab.active{
  border-color: rgba(27,143,86,.55);
  background: rgba(27,143,86,.12);
}

.wrap{
  max-width:1100px;
  margin:18px auto;
  padding:0 14px 26px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.card{
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.cardHeader{
  padding:16px 16px 10px;
  border-bottom:1px solid var(--line);
}
.cardHeader h2{margin:0 0 6px 0; font-size:18px; font-weight:950}
.muted{color:var(--muted); font-weight:750}
.small{font-size:12px}
.hint{margin-top:6px;color:var(--muted);font-size:12px; font-weight:750}

.grid{
  padding:16px;
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
.field{display:flex; flex-direction:column; gap:6px}
.field label{font-size:12px; color:var(--muted); font-weight:900}
.field.full{grid-column: 1 / -1}
.field.inline{min-width:210px}

input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(60,40,20,.18);
  background: rgba(255,255,255,.68);
  color: var(--text);
  outline:none;
  font-weight: 800;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(27,143,86,.55);
  box-shadow: 0 0 0 4px rgba(27,143,86,.12);
}

textarea{resize:vertical; min-height:86px}

.row{display:flex; gap:10px; align-items:center}
.wrapRow{flex-wrap:wrap}
.space{justify-content:space-between}

.btn{
  border:1px solid rgba(60,40,20,.18);
  background: rgba(255,255,255,.75);
  color:var(--text);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  font-weight: 950;
}
.btn:hover{filter:brightness(1.04)}
.btn.primary{
  border-color: rgba(27,143,86,.40);
  background: linear-gradient(135deg, rgba(27,143,86,.16), rgba(255,255,255,.75));
}
.btn.whatsapp{
  border-color: rgba(27,143,86,.70);
  background: linear-gradient(135deg, rgba(27,143,86,.22), rgba(255,255,255,.78));
}
.btn.ghost{background:transparent}

.footerActions{
  padding: 0 16px 16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.membersBox{
  border:1px solid rgba(60,40,20,.16);
  background: rgba(255,255,255,.62);
  border-radius: 16px;
  padding: 12px;
}
.selectMulti{min-width:280px}
.colActions{display:flex; flex-direction:column; gap:10px; min-width:240px}
.chips{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px}
.chip{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(27,143,86,.35);
  background: rgba(27,143,86,.10);
  color: var(--text);
  font-size:12px;
  font-weight: 900;
}
.chip button{
  border:none;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-weight:950;
}

.list{padding:12px 12px 16px; display:flex; flex-direction:column; gap:10px}
.item{
  border:1px solid rgba(60,40,20,.16);
  background: rgba(255,255,255,.75);
  border-radius: 16px;
  padding: 12px;
}
.itemTop{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap}
.itemTitle{font-weight:950}
.itemMeta{color:var(--muted); font-size:12px; margin-top:6px; font-weight:800}
.itemActions{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(60,40,20,.16);
  color:var(--muted);
  font-weight:900;
}
.badge.green{
  border-color: rgba(27,143,86,.55);
  background: rgba(27,143,86,.10);
  color: var(--text);
}
.greenFrame{
  border-color: rgba(27,143,86,.75) !important;
  box-shadow: 0 0 0 4px rgba(27,143,86,.10);
}

.emptyState{
  padding:18px;
  text-align:center;
  color:var(--muted);
  font-weight: 900;
}
.hidden{display:none !important}

.greenRule, .syncInfo{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px dashed rgba(60,40,20,.22);
  background: rgba(255,255,255,.68);
  color:var(--muted);
  font-size:12px;
  font-weight:900;
}
.greenRule{
  border-color: rgba(27,143,86,.35);
  background: rgba(27,143,86,.06);
}

.adminGrid, .homeGrid{
  padding:16px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:12px;
}
.statCard{
  border:1px solid rgba(60,40,20,.16);
  background: rgba(255,255,255,.75);
  border-radius: 16px;
  padding: 12px;
}
.statCard.full{grid-column:1/-1}
.statTitle{font-weight:950; margin-bottom:8px}
.statBody{color:var(--muted); font-size:13px; font-weight:800}
.statRow{display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid rgba(60,40,20,.10)}
.statRow:last-child{border-bottom:none}
.homeBig{font-size:34px; font-weight:950; line-height:1}
.nextBox{margin-top:10px}
.nextCard{
  border:1px solid rgba(60,40,20,.16);
  background: rgba(255,255,255,.72);
  border-radius:16px;
  padding:12px;
}
.nextEmpty{color:var(--muted); font-weight:900; padding:10px 0}

.modalBackdrop{
  position:fixed; inset:0;
  background: rgba(40,25,10,.35);
  backdrop-filter: blur(6px);
  z-index:20000;
}
.modal{
  position:fixed;
  left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:min(520px, 92vw);
  background: linear-gradient(180deg, #fff8ea 0%, #fff2db 100%);
  border:1px solid rgba(60,40,20,.18);
  border-radius: 18px;
  box-shadow: var(--shadow);
  z-index:20001;
}
.modalHeader, .modalFooter{padding:12px 12px; display:flex; justify-content:space-between; align-items:center}
.modalHeader{border-bottom:1px solid rgba(60,40,20,.14)}
.modalFooter{border-top:1px solid rgba(60,40,20,.14); justify-content:flex-end; gap:10px}
.modalBody{padding:12px 12px 14px}
.modalTitle{font-weight:950}

.toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background: rgba(35,25,15,.88);
  border:1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding:10px 14px;
  color:#fff;
  z-index:30000;
  box-shadow: var(--shadow);
  max-width:92vw;
  text-align:center;
  font-weight:950;
}

/* Pause Screen */
.pauseScreen{
  position:fixed;
  inset:0;
  background: rgba(239,228,208,.85);
  backdrop-filter: blur(6px);
  z-index:15000;
  display:grid;
  place-items:center;
  padding:18px;
}
.pauseCard{
  width:min(520px, 92vw);
  background: linear-gradient(180deg, #fff8ea 0%, #fff2db 100%);
  border:1px solid rgba(60,40,20,.18);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding:18px;
  text-align:center;
}
.pauseIcon{font-size:42px}
.pauseTitle{font-weight:950; font-size:18px; margin-top:6px}
.pauseReason{color:var(--muted); font-weight:900; margin:10px 0 14px}

@media (max-width: 860px){
  .grid{grid-template-columns:1fr}
  .adminGrid, .homeGrid{grid-template-columns:1fr}
  .colActions{min-width:100%}
  .selectMulti{min-width:100%}
  .tabs{width:100%}
}