:root {
  color-scheme: light;
  --bg: #efece4;
  --ink: #1c1915;
  --muted: #5c564c;
  --card: #fffdf8;
  --line: #ddd4c4;
  --green: #1f4d3a;
  --danger: #8d2f2f;
  --demo: #f3d27a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
}

button, input, select, textarea { font: inherit; }

.wrap {
  width: min(640px, 100%);
  margin: 0 auto;
  padding: 12px 12px 40px;
}

.demo-banner {
  background: var(--demo);
  border: 1px solid #8a6414;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}

.demo-banner p {
  margin: 4px 0 0;
  font-weight: 500;
}

h1 {
  font-size: 1.35rem;
  margin: 12px 0 4px;
}

.sub, .hint, .meta { color: var(--muted); }

.hint { margin: 8px 0; }

.toolbar, .filters, .card, .template {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.template, .toolbar { margin-top: 10px; }

label {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 4px;
}

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.filters button, .actions a, .actions button, .template button, .save, .retry {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green);
  padding: 8px 10px;
}

.filters button[aria-pressed="true"], .save, .template button, .retry {
  background: var(--green);
  color: #fff;
}

.date-row { margin-top: 8px; }

.count-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.95rem;
}

.card { margin-top: 10px; }

.card-top, .actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}

.actions {
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.sno {
  font-weight: 800;
  color: var(--green);
  font-size: 1.1rem;
}

.name { font-weight: 700; }

.phone {
  font-size: 1.2rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  margin: 4px 0;
}

.field { margin-top: 8px; }

.actions a, .actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.save { width: 100%; margin-top: 8px; }

a.login-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.member {
  display: grid;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}

h2 { font-size: 1.05rem; }

.save-msg, .wa-msg { min-height: 1.2em; margin: 4px 0 0; }

.save-msg.bad, .wa-msg, .error {
  color: var(--danger);
}

.save-msg.good { color: var(--green); }

.state {
  margin-top: 12px;
  padding: 12px;
  background: var(--card);
  border-radius: 12px;
}

.blockers {
  overflow-wrap: anywhere;
  font-size: 0.92rem;
}

.offfilter {
  color: var(--danger);
  font-weight: 700;
}
