/* ========== RESET & BASE ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Nunito', Arial, sans-serif;
  background: linear-gradient(160deg, #e0f2fe 0%, #bae6fd 40%, #e0e7ff 100%);
  min-height: 100vh;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ========== CONTAINER ========== */
.container {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow:
    0 8px 40px rgba(14, 100, 180, 0.10),
    0 1px 0 rgba(255,255,255,0.9) inset;
  animation: slideUp 0.5s ease-out;
  border: 1px solid rgba(186, 230, 253, 0.6);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== HEADER ========== */
.header {
  margin-bottom: 32px;
}

.header-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  border-radius: 18px;
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}

.header-logos::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.logo-wrap {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.header-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.logo-fallback {
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  text-align: center;
}

.header-center {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 8px;
}

.header-icon {
  font-size: 36px;
  margin-bottom: 6px;
  display: block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.3;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.header h4 {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  margin-bottom: 4px;
}

.header-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  font-weight: 400;
}

/* ========== FORM CARDS ========== */
.form-card {
  background: #f8faff;
  border: 1.5px solid #e0eaff;
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.form-card:hover {
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
  border-color: #93c5fd;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1e3a8a;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #dbeafe;
}

.title-icon {
  font-size: 18px;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
  margin-bottom: 14px;
  flex: 1;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-row {
  display: flex;
  gap: 12px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.required {
  color: #ef4444;
}

input, select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Nunito', Arial, sans-serif;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825L1.175 4 2.238 2.938 6 6.7 9.763 2.937 10.825 4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input::placeholder {
  color: #94a3b8;
  font-size: 13px;
}

input:focus, select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* ========== DATE CARDS ========== */
.date-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.date-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #fff;
  user-select: none;
}

.date-card:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.date-card.selected {
  border-color: #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

.date-card.selected .date-radio {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: inset 0 0 0 3px #fff;
}

.date-card.full {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
}

.date-card.full:hover {
  border-color: #e2e8f0;
  background: #f1f5f9;
  transform: none;
  box-shadow: none;
}

.date-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.date-info h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.date-info p {
  font-size: 12px;
  color: #64748b;
}

.date-remaining {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: 'Poppins', sans-serif;
}

.date-remaining.available {
  background: #dcfce7;
  color: #15803d;
}

.date-remaining.low {
  background: #fef9c3;
  color: #92400e;
}

.date-remaining.full {
  background: #fee2e2;
  color: #b91c1c;
}

.loading-dates {
  text-align: center;
  padding: 20px;
  color: #94a3b8;
  font-size: 14px;
}

/* ========== SUBMIT BUTTON ========== */
.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Poppins', Arial, sans-serif;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  margin-top: 8px;
  letter-spacing: 0.3px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon {
  font-size: 18px;
}

/* ========== OVERLAY ========== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.overlay.hidden {
  display: none;
}

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

.overlay-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: popIn 0.4s ease;
  border-top: 4px solid #ef4444;
}

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

.overlay-icon {
  font-size: 56px;
  margin-bottom: 12px;
}

.overlay-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.overlay-card p {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 24px;
}

.overlay-btn {
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', Arial, sans-serif;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #ef4444;
  color: #fff;
}

.overlay-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.overlay-btn.success-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.overlay-btn.success-btn:hover {
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.overlay-card.success {
  border-top: 4px solid #22c55e;
}

/* ========== MOBILE RESPONSIVE ========== */
@media (max-width: 640px) {
  body {
    padding: 12px;
  }

  .container {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .header-logos {
    padding: 16px 14px;
    gap: 8px;
  }

  .logo-wrap {
    width: 56px;
    height: 56px;
  }

  .header-logo {
    width: 46px;
    height: 46px;
  }

  .header h1 {
    font-size: 14px;
  }

  .header h4 {
    font-size: 11px;
  }

  .header-icon {
    font-size: 28px;
  }

  .header-sub {
    font-size: 11px;
  }

  .form-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .section-title {
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 14px;
  }

  input, select {
    padding: 10px 12px;
    font-size: 14px;
  }

  .date-card {
    padding: 12px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .date-info h3 {
    font-size: 13px;
  }

  .date-remaining {
    font-size: 11px;
    padding: 3px 10px;
  }

  .submit-btn {
    padding: 14px 20px;
    font-size: 15px;
  }

  .overlay-card {
    padding: 28px 20px;
  }

  .overlay-card h3 {
    font-size: 18px;
  }
}

/* Extra small devices */
@media (max-width: 380px) {
  body {
    padding: 8px;
  }

  .container {
    padding: 16px 12px;
  }

  .header h1 {
    font-size: 12px;
  }

  .logo-wrap {
    width: 48px;
    height: 48px;
  }

  .header-logo {
    width: 38px;
    height: 38px;
  }

  .form-card {
    padding: 14px;
  }

  label {
    font-size: 12px;
  }

  input, select {
    padding: 9px 10px;
    font-size: 13px;
  }
}
