/* =====================================================================
   Nagar Nigam Jaipur — Nirjala Gyaaras Registration
   Stylesheet (mobile-first, inline-validation ready)
   ===================================================================== */
:root {
  --saffron: #e88d7d;
  /* Beautiful Jaipur Pink Stucco */
  --saffron-deep: #d1614f;
  /* Rich Terracotta Pink */
  --maroon: #822218;
  /* Royal Maroon/Burgundy for accents */
  --cream: #fbf5f2;
  /* Soft Pinkish Cream Background */
  --ink: #33201c;
  /* Soft dark brown/ink for readable typography */
  --line: #ebd6d1;
  /* Soft pink-grey border lines */
  --green: #278544;
  /* Clean contrast green */
  --red: #d14f4f;
  /* Alert red */
  --shadow: 0 8px 30px rgba(130, 34, 24, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Mukta", "Segoe UI", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
.main-title {
  font-family: "Outfit", sans-serif;
}

a {
  color: var(--maroon);
}

.tricolour {
  height: 6px;
  background: linear-gradient(to right,
      #ff9933 0%, #ff9933 33.33%,
      #fff 33.33%, #fff 66.66%,
      #138808 66.66%, #138808 100%);
}

/* ---------- Header Redesign ---------- */
header.gov-header {
  background: linear-gradient(135deg, #601414 0%, #3a0a0a 100%);
  border-bottom: 3.5px solid var(--saffron);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
  padding: 14px 0;
  transition: all 0.3s ease;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 24px;
  position: relative;
}

@media (min-width: 880px) {
  .header-container {
    padding: 0 20px;
  }
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.gov-logo {
  height: 70px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.gov-logo:hover {
  transform: scale(1.05);
}

.brand-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.2px;
}

.hindi-title {
  font-family: "Mukta", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--saffron);
  margin-top: 2px;
  line-height: 1.2;
}

.sub-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: absolute;
  right: 14px;
}

.helpline-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 50px;
  transition: all 0.3s ease;
}

.helpline-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--saffron);
  box-shadow: 0 4px 12px rgba(255, 138, 31, 0.15);
  transform: translateY(-1px);
}

.helpline-pill .icon {
  font-size: 16px;
}

.helpline-pill .text {
  display: flex;
  flex-direction: column;
}

.helpline-pill .label {
  font-size: 9.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1;
  margin-bottom: 2px;
}

.helpline-pill .val {
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.admin-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--saffron-deep), var(--saffron));
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 138, 31, 0.2);
  transition: all 0.3s ease;
}

.admin-btn:hover {
  background: linear-gradient(135deg, var(--saffron), #ff9c3a);
  box-shadow: 0 6px 16px rgba(255, 138, 31, 0.35);
  transform: translateY(-2px);
}

.admin-btn .icon {
  font-size: 13px;
}

/* Responsive Header */
@media (max-width: 900px) {
  header.gov-header {
    padding: 10px 12px;
  }

  .header-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    padding: 0;
  }

  .logo-area {
    flex-direction: column;
    gap: 6px;
  }

  .gov-logo {
    height: 50px;
  }

  .brand-titles {
    align-items: center;
  }

  .main-title {
    font-size: 20px;
  }

  .hindi-title {
    font-size: 16px;
    margin-top: 1px;
  }

  .sub-title {
    font-size: 9px;
    letter-spacing: 0.5px;
  }

  .header-actions {
    position: static;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
}


/* ---------- Hero Redesign ---------- */
.hero {
  background: radial-gradient(circle at 10% 20%, rgba(122, 31, 31, 0.98) 0%, rgba(74, 13, 13, 1) 90.1%);
  color: #fff;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--saffron);
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 20%, rgba(255, 138, 31, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container-wide {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-container-wide {
    padding: 0 20px;
  }
}

.hero-text {
  text-align: left;
  z-index: 2;
}

.hero .badge {
  display: inline-block;
  background: rgba(255, 138, 31, 0.25);
  border: 1px solid var(--saffron);
  color: #ffd2a8;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h2 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero .sanskrit {
  font-family: "Mukta", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #ffd599;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.hero p.lead {
  font-size: 15.5px;
  line-height: 1.6;
  opacity: 0.9;
  margin: 0 0 24px;
}

.hero .date-pill {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.hero .date-pill:hover {
  background: #fff;
  color: var(--maroon);
  transform: translateY(-2px);
}

.hero-media {
  z-index: 2;
  display: flex;
  justify-content: center;
}

.hero-image-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 138, 31, 0.3);
  transition: all 0.3s ease;
}

.hero-image-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 5px var(--saffron);
}

.hero-banner-img {
  max-width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

/* Responsive Hero */
@media (max-width: 900px) {
  .hero {
    padding: 30px 20px;
  }

  .hero-container-wide {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero h2 {
    font-size: 26px;
  }

  .hero .sanskrit {
    font-size: 16px;
  }

  .hero-banner-img {
    height: 200px;
  }
}

/* ---------- Prominent Branding ---------- */
.prominent-branding-banner {
  background: linear-gradient(135deg, #fff7f4 0%, #ffeae3 100%);
  border: 2px solid var(--saffron-deep);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px auto;
  max-width: 1120px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 6px 20px rgba(130, 34, 24, 0.08);
  text-align: center;
}

.branding-unit,
.branding-date {
  font-family: "Outfit", sans-serif;
  font-size: 35px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--maroon);
}

.branding-unit strong,
.branding-date strong {
  font-weight: 800;
  font-size: 16px;
  display: block;
  color: #3a0a0a;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .prominent-branding-banner {
    flex-direction: column;
    padding: 16px;
    gap: 14px;
    margin: 16px 14px;
  }

  .branding-unit,
  .branding-date {
    font-size: 18px;
  }

  .branding-unit strong,
  .branding-date strong {
    font-size: 20px;
  }
}

/* ---------- Layout ---------- */
main {
  max-width: 1120px;
  margin: 20px auto;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 880px) {
  main {
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    padding: 0 20px;
    margin-top: 28px;
  }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 16px;
}

@media (min-width: 720px) {
  .card {
    padding: 22px;
  }
}

.card h3 {
  margin: 0 0 12px;
  color: var(--maroon);
  font-size: 17px;
  border-bottom: 2px solid var(--saffron);
  padding-bottom: 6px;
  display: inline-block;
}

.info-list {
  padding-left: 18px;
  margin: 0;
}

.info-list li {
  margin-bottom: 6px;
  font-size: 14px;
}

.channel {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--cream);
  border-left: 3px solid var(--saffron);
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 13.5px;
}

.channel strong {
  color: var(--maroon);
}

/* ---------- Form ---------- */
form .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (min-width: 600px) {
  form .row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
  }
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
  min-height: 38px;
  display: flex;
  align-items: flex-end;
}

.field label .req {
  color: var(--red);
}

/* 16px font size on inputs prevents iOS auto-zoom on focus */
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  border: 1.5px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font-size: 16px;
  background: #fffdf8;
  font-family: inherit;
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12' height='8'><path fill='%237a1f1f' d='M0 0l6 8 6-8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  padding-right: 32px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.18);
  background: #fff;
}

/* Validation states */
.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: var(--red);
  background: #fff6f5;
}

.field input.invalid:focus,
.field select.invalid:focus,
.field textarea.invalid:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}

.field input.valid,
.field select.valid,
.field textarea.valid {
  border-color: var(--green);
}

.field .error {
  display: block;
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
  min-height: 14px;
  line-height: 1.3;
}

.field .error:not(:empty)::before {
  content: "⚠ ";
}

.field .hint {
  font-size: 11.5px;
  color: #777;
  margin-top: 3px;
}

fieldset {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px 14px 6px;
  margin: 4px 0 16px;
}

@media (min-width: 600px) {
  fieldset {
    padding: 14px 16px 6px;
    margin: 6px 0 18px;
  }
}

fieldset legend {
  padding: 0 8px;
  font-weight: 600;
  color: var(--maroon);
  font-size: 14px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (min-width: 600px) {
  .checkbox-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 14px;
  }
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  min-height: 44px;
}

.check input {
  accent-color: var(--saffron-deep);
  width: 18px;
  height: 18px;
}

.check:hover {
  border-color: var(--saffron);
}

.checkbox-grid.invalid .check {
  border-color: var(--red);
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}

button,
.btn {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  min-height: 44px;
}

.btn-primary {
  background: var(--saffron-deep);
  color: #fff;
  box-shadow: 0 2px 0 var(--maroon);
}

.btn-primary:hover {
  background: #b85243;
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--maroon);
  border: 1px solid var(--line);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-green {
  background: var(--green);
  color: #fff;
}

@media (max-width: 540px) {
  .actions {
    flex-direction: column-reverse;
  }

  .actions button,
  .actions .btn {
    width: 100%;
  }
}

.note {
  margin-top: 14px;
  padding: 10px 12px;
  background: #fdf2f0;
  border: 1px solid #f2cfca;
  border-radius: 6px;
  font-size: 12.5px;
  color: #7a3229;
}

.alert {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}

.alert-success {
  background: #e6f4ea;
  color: #1f7a3a;
  border: 1px solid #b6dfc1;
}

.alert-error {
  background: #fdecea;
  color: #b00020;
  border: 1px solid #f5b5b1;
}

footer {
  margin-top: 28px;
  background: var(--maroon);
  color: #f5e7c8;
  padding: 18px 16px;
  text-align: center;
  font-size: 13px;
}

footer a {
  color: #ffd599;
  text-decoration: none;
}

/* ---------- Admin Dashboard ---------- */
.admin-wrap {
  max-width: 1280px;
  margin: 18px auto;
  padding: 0 14px;
}

@media (min-width: 720px) {
  .admin-wrap {
    margin: 24px auto;
    padding: 0 20px;
  }
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.admin-top h2 {
  margin: 0;
  color: var(--maroon);
  font-size: 20px;
}

.admin-top>div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 760px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
  }
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.stat .num {
  font-size: 24px;
  font-weight: 700;
  color: var(--maroon);
}

.stat .lbl {
  font-size: 11.5px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 14px;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fffdf8;
  min-height: 38px;
}

/* Mobile: card view; Desktop: table view */
table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 13px;
}

table.data th,
table.data td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data th {
  background: var(--maroon);
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

table.data tr:hover {
  background: var(--cream);
}

@media (max-width: 760px) {

  table.data,
  table.data thead,
  table.data tbody,
  table.data th,
  table.data td,
  table.data tr {
    display: block;
  }

  table.data thead {
    display: none;
  }

  table.data tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 6px 4px;
    box-shadow: var(--shadow);
  }

  table.data td {
    border: none;
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  table.data td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--maroon);
    flex-basis: 100px;
    flex-shrink: 0;
  }
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.badge-pending {
  background: #fff4e0;
  color: #8a5a00;
  border: 1px solid #f1d9aa;
}

.badge-approved {
  background: #e6f4ea;
  color: #1f7a3a;
  border: 1px solid #b6dfc1;
}

.badge-rejected {
  background: #fdecea;
  color: #b00020;
  border: 1px solid #f5b5b1;
}

.empty {
  background: #fff;
  padding: 40px;
  text-align: center;
  color: #777;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

/* Login */
.login-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 24px;
  width: 100%;
  max-width: 380px;
}

.login-card h2 {
  margin: 0 0 16px;
  color: var(--maroon);
  border-bottom: 2px solid var(--saffron);
  padding-bottom: 6px;
  display: inline-block;
}