html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #f6f9ff 0%, #fcfdff 45%, #f4fbff 100%);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(80, 155, 235, 0.18), transparent 28%),
    radial-gradient(circle at 88% 22%, rgba(132, 96, 211, 0.16), transparent 26%),
    radial-gradient(circle at 76% 82%, rgba(62, 181, 156, 0.14), transparent 24%),
    linear-gradient(180deg, #f6f9ff 0%, #fcfdff 45%, #f4fbff 100%);
  color: #1f2a37;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 320'%3E%3Cdefs%3E%3CradialGradient id='g' cx='50%25' cy='50%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%235aa6ff' stop-opacity='0.36'/%3E%3Cstop offset='45%25' stop-color='%239670d8' stop-opacity='0.24'/%3E%3Cstop offset='72%25' stop-color='%2367c9a7' stop-opacity='0.2'/%3E%3Cstop offset='100%25' stop-color='%23ffffff' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M160 18c-58 0-108 46-108 106 0 91 108 178 108 178s108-87 108-178c0-60-50-106-108-106z' fill='url(%23g)'/%3E%3Ccircle cx='160' cy='118' r='24' fill='%232885cb' fill-opacity='0.42'/%3E%3C/svg%3E") center/360px 360px repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: -1;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  backdrop-filter: blur(4px);
}

.devanagari-ui {
  font-family: "Noto Sans Devanagari", "Mangal", "Kohinoor Devanagari", sans-serif;
}

.bg-maroon {
  background: linear-gradient(90deg, #5a86ff, #6ca8ff);
}

.app-navbar {
  border: 0;
  box-shadow: 0 10px 24px rgba(51, 85, 175, 0.16);
}

.app-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.78rem;
  opacity: 0.92;
  white-space: normal;
}

.app-content {
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
  flex: 1 0 auto;
}

.main-content {
  padding-bottom: 0;
}

.campaign-card {
  border: 1px solid #d7e7ff;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(90, 134, 255, 0.12);
}

.campaign-hero {
  background: linear-gradient(135deg, #5f8eff, #7cb3ff);
  color: #ffffff;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 12px 28px rgba(95, 142, 255, 0.28);
}

.campaign-hero h1 {
  font-size: 1.25rem;
}

.registered-count {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  min-width: 140px;
  text-align: center;
}

.count-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
}

.count-value {
  font-size: 1.4rem;
  line-height: 1;
}

.location-gate {
  border: 1px solid #d6e4ff;
  border-radius: 12px;
  padding: 0.9rem;
  background: #f7fbff;
}

.location-gate.location-done {
  border-color: #b7e4d2;
  background: #f1fffa;
}

.campaign-info-note {
  border: 1px solid #d5e5ff;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  box-shadow: 0 8px 22px rgba(82, 129, 232, 0.1);
}

.campaign-pdf-points {
  padding-left: 1.2rem;
}

.form-locked {
  opacity: 0.65;
}

.declaration-box {
  background: #eef6ff;
  border: 1px solid #c8e0ff;
  border-radius: 10px;
  padding: 14px;
}

#signature-pad {
  border: 2px dashed #84aefb;
  border-radius: 8px;
  width: 100%;
  height: 220px;
  touch-action: none;
  background-color: #ffffff;
}

.btn-danger {
  background: linear-gradient(90deg, #4e86ff, #5fa4ff);
  border: none;
}

.btn-danger:hover,
.btn-danger:focus {
  background: linear-gradient(90deg, #3f77f2, #4f98fb);
}

.navbar-brand,
.nav-link {
  font-weight: 500;
}

.nav-link {
  border-radius: 10px;
  padding: 0.45rem 0.8rem !important;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.14);
}

.app-footer {
  border-top: 1px solid #d8e6ff !important;
  background: rgba(248, 251, 255, 0.95);
  box-shadow: 0 -8px 22px rgba(79, 120, 208, 0.08);
  margin-top: auto;
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  width: 100%;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.footer-content {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding-top: 0.9rem;
  padding-bottom: 1rem;
  text-align: center;
}

.footer-main {
  font-size: 0.98rem;
  color: #4b5c75;
  line-height: 1.45;
}

.footer-link {
  color: #0d6efd;
  font-size: 0.92rem;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus {
  color: #0a58ca;
  text-decoration: underline;
}

.admin-sign-thumb {
  width: 130px;
  max-width: 100%;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #cadcf9;
  border-radius: 8px;
}

.form-control,
.form-check-input {
  border-color: #cddff9;
}

.form-control:focus,
.form-check-input:focus {
  border-color: #80aef7;
  box-shadow: 0 0 0 0.18rem rgba(88, 145, 255, 0.18);
}

@media (max-width: 767px) {
  .app-header {
    position: static;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .campaign-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .registered-count {
    width: 100%;
  }

  .campaign-card {
    padding: 1rem !important;
  }

  #signature-pad {
    height: 180px;
  }

  .app-content {
    padding-bottom: 1.1rem;
  }

  .footer-content {
    align-items: center;
    gap: 0.3rem;
    padding-top: 0.8rem;
    padding-bottom: 0.9rem;
  }

  .footer-main {
    font-size: 0.9rem;
  }

  .admin-sign-thumb {
    width: 105px;
    height: 44px;
  }
}

@media print {
  .no-print {
    display: none !important;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}