/* Google Material Design 3 — Clean Professional Theme */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --blue: #1a73e8;
  --blue-hover: #1557b0;
  --blue-bg: #e8f0fe;
  --blue-surface: #f8fafd;
  --red: #d93025;
  --green: #188038;
  --green-bg: #e6f4ea;
  --yellow: #f9ab00;
  --yellow-bg: #fef7e0;

  --surface: #ffffff;
  --bg: #f8f9fa;
  --text: #202124;
  --text2: #5f6368;
  --text3: #80868b;
  --border: #dadce0;
  --border-focus: #1a73e8;

  --shadow: 0 1px 3px rgba(60,64,67,0.12);
  --shadow-hover: 0 2px 8px rgba(60,64,67,0.16);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 100px;

  --sans: 'Google Sans', 'Segoe UI', Roboto, sans-serif;
  --body: 'Roboto', 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 12px 48px;
}

/* ── Top Bar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 20px;
}

.topbar-title {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}

.topbar-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: #fff;
  transition: background 0.15s;
}
.topbar-link:hover { background: var(--blue-bg); }

/* ── Unified Form Card ── */
.form-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-section {
  padding: 24px;
}

.form-section + .form-section {
  border-top: 1px solid #f1f3f4;
}

.section-title {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--sans);
  flex-shrink: 0;
}

/* ── Hero Header ── */
.hero-section {
  padding: 28px 24px 24px;
}

.hero-title {
  font-family: var(--sans);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.hero-desc {
  font-size: 0.92rem;
  color: var(--text2);
  line-height: 1.55;
  margin-bottom: 16px;
}

.info-strip {
  background: var(--blue-surface);
  border: 1px solid #d2e3fc;
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.info-item-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text2);
  letter-spacing: 0.5px;
}

.info-item-value {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 2px;
}

/* ── Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: var(--sans);
}
.chip-blue { background: var(--blue-bg); color: var(--blue); }
.chip-green { background: var(--green-bg); color: var(--green); }
.chip-yellow { background: var(--yellow-bg); color: #b06000; }
.chip-red { background: #fce8e6; color: var(--red); }

/* ── Form Controls ── */
.fg { margin-bottom: 18px; }

.fl {
  display: block;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.fl .req { color: var(--red); margin-left: 2px; }

.fc {
  width: 100%;
  padding: 11px 12px;
  font-size: 0.92rem;
  font-family: var(--body);
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fc:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,115,232,0.18); }
.fc.err { border-color: var(--red); background: #fff8f7; }
.fc.err:focus { box-shadow: 0 0 0 3px rgba(217,48,37,0.18); }

select.fc {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 20px;
  cursor: pointer;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) {
  .two-col { grid-template-columns: 1fr; gap: 0; }
}

.err-msg {
  display: none;
  font-size: 0.78rem;
  color: var(--red);
  margin-top: 5px;
  font-weight: 500;
}
.err-msg.show { display: block; }

.hint {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 5px;
}

/* ── QR & Payment ── */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin: 14px 0;
}

.qr-frame {
  background: #fff;
  padding: 12px;
  border-radius: var(--r-md);
  border: 1px solid #e8eaed;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  max-width: 260px;
  width: 100%;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
}
.qr-frame:hover { transform: scale(1.02); }

.qr-frame img {
  width: 100%;
  max-width: 230px;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

.upi-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f1f3f4;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-family: monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 12px 0 4px;
  word-break: break-all;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  transition: background 0.12s;
}
.copy-btn:hover { background: var(--blue-bg); }

/* ── UPI App Buttons ── */
.upi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 12px;
}
@media (max-width: 420px) {
  .upi-grid { grid-template-columns: 1fr; }
}

.upi-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 10px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(60,64,67,0.06);
}
.upi-btn:hover { box-shadow: var(--shadow-hover); }
.upi-btn:active { transform: scale(0.97); }

.upi-btn.gpay { border-color: #dadce0; }
.upi-btn.gpay:hover { background: #f8fafd; border-color: #4285f4; }

.upi-btn.phonepe { border-color: #e0d4f5; color: #5f259f; }
.upi-btn.phonepe:hover { background: #f7f2fd; border-color: #5f259f; }

.upi-btn.other { border-color: #dadce0; }
.upi-btn.other:hover { background: #f1f3f4; }

.upi-icon { width: 22px; height: 22px; flex-shrink: 0; }

/* ── Upload Zone ── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: #fafbfc;
  transition: all 0.15s;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--blue); background: var(--blue-surface); }
.drop-zone input[type="file"] { display: none; }

.upload-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--blue-bg);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.preview-area { display: none; margin-top: 12px; text-align: center; }

.preview-thumb {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.rm-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  color: var(--red);
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.rm-btn:hover { background: #fce8e6; }

/* ── Submit Button ── */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--blue);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(26,115,232,0.25);
  transition: all 0.15s;
  text-decoration: none;
}
.submit-btn:hover { background: var(--blue-hover); box-shadow: 0 2px 6px rgba(26,115,232,0.35); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  background: #fff;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}
.btn-outline:hover { background: #f1f3f4; }

/* ── Coordinators ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.team-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(60,64,67,0.06);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.team-card:hover { box-shadow: var(--shadow-hover); border-color: #bdc1c6; }

.team-photo-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #f1f3f4;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.team-card:hover .team-photo { transform: scale(1.03); }

.team-body {
  padding: 14px 16px 16px;
}

.team-name {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.team-role {
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 4px;
}

.team-phone {
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 10px;
  display: block;
}

.team-actions {
  display: flex;
  gap: 8px;
}

.btn-call, .btn-wa {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.12s;
  border: none;
}

.btn-call {
  background: var(--blue);
  color: #fff;
}
.btn-call:hover { background: var(--blue-hover); }

.btn-wa {
  background: #25D366;
  color: #fff;
}
.btn-wa:hover { background: #1DA851; }

/* ── Footer ── */
.page-footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 28px;
  line-height: 1.7;
}
.page-footer a { color: var(--blue); text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(32,33,36,0.88);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: var(--r-md);
  box-shadow: 0 8px 28px rgba(0,0,0,0.3);
  background: #fff;
  padding: 6px;
}

.modal-x {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.12s;
}
.modal-x:hover { background: rgba(255,255,255,0.3); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #323232;
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  font-family: var(--sans);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }
