@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #06091f, #11163c, #080b22);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.container {
  width: 900px;
}

h1 {
  text-align: center;
  color: #fff;
  margin-bottom: 35px;
  font-size: 45px;
  text-shadow:
    0 0 8px cyan,
    0 0 20px cyan,
    0 0 40px cyan;
}

form {
  width: 100%;
}

fieldset {
  border: 2px solid #4dc3ff;
  border-radius: 22px;
  margin-bottom: 35px;
  padding: 35px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(15px);
  box-shadow: 0 0 30px rgba(0, 180, 255, 0.35);
}

legend {
  padding: 12px 28px;
  border-radius: 30px;
  background: #57d9ff;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

.row {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: 20px;
  margin: 18px 0;
}

.row > label {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 15px 18px;
  border-radius: 14px;
  border: 2px solid #ff4ea0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  outline: none;
  transition: 0.35s;
}

textarea {
  resize: none;
}

::placeholder {
  color: #d7d7d7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #53ff84;
  box-shadow: 0 0 15px #53ff84;
}

select {
  background: #303763;
  color: white;
  cursor: pointer;
}

select option {
  background: #1d2247;
  color: white;
}

/* Radio Buttons */

.radio-group {
  display: flex;
  gap: 30px;
  align-items: center;
}

.radio-group label {
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="radio"] {
  accent-color: #00ffe5;
  transform: scale(1.2);
}

input[type="file"] {
  color: white;
  border: none;
  background: none;
}

/* Buttons */

.buttons {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 10px;
}

button {
  width: 220px;
  padding: 15px;
  border: none;
  border-radius: 35px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: white;

  background: linear-gradient(90deg, #59dfff, #48a9ff);

  transition: 0.4s;

  box-shadow: 0 0 15px #00bfff;
}

button:hover {
  transform: translateY(-4px);

  box-shadow:
    0 0 15px cyan,
    0 0 35px cyan;
}

/* Scrollbar */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: #55d8ff;
  border-radius: 20px;
}

/* ─── Validation: Input Wrapper ─── */

.input-wrapper {
  display: flex;
  flex-direction: column;
}

/* ─── Validation: Error Messages ─── */

.error-msg {
  display: none;
  color: #ff4e6a;
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  padding-left: 6px;
  text-shadow: 0 0 8px rgba(255, 78, 106, 0.5);
  animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Validation: Input States ─── */

.input-error {
  border-color: #ff4e6a !important;
  box-shadow: 0 0 12px rgba(255, 78, 106, 0.5) !important;
  animation: shake 0.4s ease;
}

.input-success {
  border-color: #53ff84 !important;
  box-shadow: 0 0 12px rgba(83, 255, 132, 0.35) !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ─── Success Popup ─── */

.success-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.success-content {
  background: linear-gradient(135deg, #0d1137, #182058);
  border: 2px solid #53ff84;
  border-radius: 22px;
  padding: 45px 55px;
  text-align: center;
  box-shadow: 0 0 40px rgba(83, 255, 132, 0.4);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 12px;
}

.success-content h2 {
  color: #53ff84;
  font-size: 26px;
  margin-bottom: 8px;
  text-shadow: 0 0 15px rgba(83, 255, 132, 0.6);
}

.success-content p {
  color: #c8d6e5;
  font-size: 16px;
  margin-bottom: 25px;
}

.success-content button {
  width: 140px;
  padding: 12px;
  background: linear-gradient(90deg, #53ff84, #00d2ff);
  border: none;
  border-radius: 30px;
  color: #0d1137;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 15px rgba(83, 255, 132, 0.4);
}

.success-content button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(83, 255, 132, 0.7);
}

/* Responsive */

@media (max-width: 900px) {
  .container {
    width: 100%;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .row > label {
    margin-bottom: 5px;
  }

  .radio-group {
    flex-wrap: wrap;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
  }

  button {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════
   RECEIPT / CHEQUE MODAL STYLES
   ═══════════════════════════════════════════════════════════ */

/* ─── Overlay ─── */
.receipt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 20px;
}

.receipt-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── Receipt Card ─── */
.receipt-modal {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #0b0f2e 0%, #131848 40%, #0e1235 100%);
  border: 1.5px solid rgba(83, 255, 132, 0.3);
  border-radius: 24px;
  padding: 40px 36px 30px;
  box-shadow:
    0 0 60px rgba(83, 255, 132, 0.15),
    0 0 120px rgba(0, 210, 255, 0.08),
    0 25px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.85) translateY(30px);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.receipt-overlay.active .receipt-modal {
  transform: scale(1) translateY(0);
}

/* Scrollbar for receipt */
.receipt-modal::-webkit-scrollbar {
  width: 6px;
}

.receipt-modal::-webkit-scrollbar-thumb {
  background: rgba(83, 255, 132, 0.3);
  border-radius: 10px;
}

/* ─── Close Button ─── */
.receipt-close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #c8d6e5;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: none;
  line-height: 1;
}

.receipt-close-btn:hover {
  background: rgba(255, 78, 106, 0.2);
  border-color: #ff4e6a;
  color: #ff4e6a;
  transform: rotate(90deg) translateY(0);
  box-shadow: 0 0 15px rgba(255, 78, 106, 0.3);
}

/* ─── Header ─── */
.receipt-header {
  text-align: center;
  margin-bottom: 8px;
}

.receipt-success-badge {
  margin-bottom: 16px;
  animation: bounceIn 0.6s ease 0.3s both;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.receipt-title {
  color: #53ff84;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 0 0 20px rgba(83, 255, 132, 0.4);
}

.receipt-subtitle {
  color: #8b99b0;
  font-size: 13.5px;
  line-height: 1.5;
  margin-bottom: 18px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.receipt-id-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

.receipt-label {
  color: #6b7a90;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.receipt-value {
  color: #e0e6ed;
  font-size: 14px;
  font-weight: 600;
}

.receipt-id {
  color: #00d2ff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

/* ─── Dashed Divider (cheque-style) ─── */
.receipt-divider {
  border: none;
  border-top: 2px dashed rgba(83, 255, 132, 0.2);
  margin: 18px 0;
  position: relative;
}

.receipt-divider::before,
.receipt-divider::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 20px;
  height: 20px;
  background: #0b0f2e;
  border-radius: 50%;
}

.receipt-divider::before {
  left: -28px;
  box-shadow: -2px 0 0 rgba(83, 255, 132, 0.3);
}

.receipt-divider::after {
  right: -28px;
  box-shadow: 2px 0 0 rgba(83, 255, 132, 0.3);
}

/* ─── Sections ─── */
.receipt-section {
  margin: 4px 0;
}

.receipt-section-title {
  color: #e0e6ed;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.receipt-section-icon {
  font-size: 18px;
}

/* ─── Detail Grid ─── */
.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.receipt-field {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  transition: background 0.3s, border-color 0.3s;
}

.receipt-field:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(83, 255, 132, 0.15);
}

.receipt-field-full {
  grid-column: 1 / -1;
}

.receipt-field-label {
  display: block;
  color: #6b7a90;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.receipt-field-value {
  display: block;
  color: #e0e6ed;
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.receipt-highlight {
  color: #53ff84 !important;
  font-weight: 600 !important;
  text-shadow: 0 0 8px rgba(83, 255, 132, 0.3);
}

/* ─── Status Bar ─── */
.receipt-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(83, 255, 132, 0.06);
  border: 1px solid rgba(83, 255, 132, 0.15);
  border-radius: 12px;
  margin-bottom: 20px;
}

.receipt-status-badge {
  background: linear-gradient(135deg, #53ff84, #00d2ff);
  color: #0b0f2e;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.receipt-status-text {
  color: #8b99b0;
  font-size: 13px;
}

/* ─── Action Buttons ─── */
.receipt-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.receipt-btn {
  flex: 1;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s ease;
  color: white;
  width: auto;
}

.receipt-btn:hover {
  transform: translateY(-3px);
}

/* Email button */
.receipt-btn-email {
  background: linear-gradient(135deg, #4dc3ff, #2b86c5);
  box-shadow: 0 4px 15px rgba(77, 195, 255, 0.3);
}

.receipt-btn-email:hover {
  box-shadow: 0 6px 25px rgba(77, 195, 255, 0.5);
}

/* WhatsApp button */
.receipt-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c3e);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.receipt-btn-whatsapp:hover {
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

/* Print button */
.receipt-btn-print {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.receipt-btn-print:hover {
  box-shadow: 0 6px 25px rgba(168, 85, 247, 0.5);
}

/* ─── Footer ─── */
.receipt-footer {
  text-align: center;
  padding-top: 4px;
}

.receipt-footer p {
  color: #4a5568;
  font-size: 11.5px;
  font-style: italic;
}

/* ─── Responsive: Receipt Modal ─── */
@media (max-width: 650px) {
  .receipt-modal {
    padding: 30px 20px 24px;
    border-radius: 18px;
  }

  .receipt-grid {
    grid-template-columns: 1fr;
  }

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

  .receipt-actions {
    flex-direction: column;
  }

  .receipt-btn {
    min-width: unset;
  }

  .receipt-divider::before,
  .receipt-divider::after {
    display: none;
  }
}

/* ─── Print Styles ─── */
@media print {
  body {
    background: white !important;
    padding: 0 !important;
  }

  .container,
  form {
    display: none !important;
  }

  .receipt-overlay {
    position: static !important;
    opacity: 1 !important;
    pointer-events: all !important;
    background: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    display: block !important;
  }

  .receipt-modal {
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    border: 2px solid #333 !important;
    background: white !important;
    color: #111 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    padding: 30px !important;
  }

  .receipt-close-btn,
  .receipt-actions {
    display: none !important;
  }

  .receipt-title {
    color: #111 !important;
    text-shadow: none !important;
  }

  .receipt-subtitle,
  .receipt-status-text,
  .receipt-field-label,
  .receipt-label {
    color: #555 !important;
  }

  .receipt-field-value,
  .receipt-value,
  .receipt-section-title {
    color: #111 !important;
  }

  .receipt-highlight {
    color: #006633 !important;
    text-shadow: none !important;
  }

  .receipt-id {
    color: #0055aa !important;
    text-shadow: none !important;
  }

  .receipt-field {
    background: #f9f9f9 !important;
    border-color: #ddd !important;
  }

  .receipt-status-bar {
    background: #f0f9f4 !important;
    border-color: #ccc !important;
  }

  .receipt-status-badge {
    background: #333 !important;
    color: white !important;
  }

  .receipt-divider {
    border-top-color: #ccc !important;
  }

  .receipt-divider::before,
  .receipt-divider::after {
    display: none !important;
  }

  .receipt-footer p {
    color: #888 !important;
  }
}
