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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #ffffff 0%, #f8f4f4 50%, #fff5f5 100%);
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="bodyPattern" x="0" y="0" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="0.8" fill="rgba(220,38,38,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23bodyPattern)"/></svg>');
  pointer-events: none;
  z-index: -1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  color: white;
  padding: 2rem 0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23pattern)"/></svg>');
  opacity: 0.6;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.header-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header .logo {
  max-width: 70px;
  height: auto;
  filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

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

.header-text {
  text-align: center;
  position: relative;
  z-index: 2;
}

.header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
}

.header p {
  font-size: 1.3rem;
  opacity: 0.95;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Main Content */
.main-content {
  padding: 3rem 0;
  position: relative;
}

/* Card Styles */
.card {
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.1);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  border: 1px solid rgba(220, 38, 38, 0.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
}

.card h2 {
  color: #dc2626;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid #dc2626;
  padding-bottom: 0.8rem;
  font-weight: 600;
  position: relative;
}

.card h2::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background: #ef4444;
}

/* Lapangan Grid */
.lapangan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.lapangan-item {
  background: linear-gradient(145deg, #ffffff 0%, #fef7f7 100%);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.15);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.lapangan-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
}

.lapangan-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.3);
}

.lapangan-item h3 {
  color: #dc2626;
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.lapangan-item p {
  color: #6b7280;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.lapangan-item .harga {
  font-size: 1.8rem;
  font-weight: 700;
  color: #dc2626;
  margin: 1.2rem 0;
  text-align: center;
  padding: 0.8rem;
  background: linear-gradient(145deg, #fef2f2 0%, #fecaca 100%);
  border-radius: 10px;
  border: 2px dashed #dc2626;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.8rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: #dc2626;
  font-size: 1.1rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 2px solid #f3f4f6;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
}

.form-control:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
  transform: translateY(-2px);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* Total Harga Display */
#total_harga {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  color: #dc2626 !important;
  padding: 1.2rem !important;
  background: linear-gradient(145deg, #fef2f2 0%, #fecaca 100%) !important;
  border-radius: 15px !important;
  border: 3px solid #dc2626 !important;
  text-align: center !important;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2) !important;
  position: relative !important;
  overflow: hidden !important;
}

#total_harga::before {
  content: "💰";
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.btn-success:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
}

.btn-danger {
  background: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: #dc2626;
  border-color: white;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-block {
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s;
}

.btn-block:hover::before {
  left: 100%;
}

/* Floating Animation */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

.lapangan-item {
  animation: float 6s ease-in-out infinite;
}

.lapangan-item:nth-child(2) {
  animation-delay: -2s;
}

.lapangan-item:nth-child(3) {
  animation-delay: -4s;
}

/* Alert Styles */
.alert {
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 500;
  border-left: 5px solid;
}

.alert-success {
  background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%);
  color: #15803d;
  border-left-color: #22c55e;
  border: 1px solid #86efac;
}

.alert-danger {
  background: linear-gradient(145deg, #fef2f2 0%, #fecaca 100%);
  color: #dc2626;
  border-left-color: #dc2626;
  border: 1px solid #fca5a5;
}

.alert-info {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-left-color: #3b82f6;
  border: 1px solid #93c5fd;
}

/* Table Styles */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

.table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.table tr:hover {
  background: #f8f9fa;
}

/* Status Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 3px;
  text-transform: uppercase;
}

.badge-pending {
  background: #ffc107;
  color: #856404;
}

.badge-confirmed {
  background: #28a745;
  color: white;
}

.badge-paid {
  background: #17a2b8;
  color: white;
}

.badge-cancelled {
  background: #dc3545;
  color: white;
}

/* Payment Card */
.payment-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 2rem;
}

.va-number {
  font-size: 2rem;
  font-weight: bold;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.2);
  padding: 1rem;
  border-radius: 5px;
  margin: 1rem 0;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  text-align: center;
  padding: 3rem 0;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footerPattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23footerPattern)"/></svg>');
  opacity: 0.4;
}

.footer p {
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
  font-weight: 300;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

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

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

  .container {
    padding: 0 15px;
  }

  .header-content {
    flex-direction: column;
    gap: 0.5rem;
  }

  .header .logo {
    max-width: 50px;
  }
}

/* Loading */
.loading {
  text-align: center;
  padding: 2rem;
}

.spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Availability Checker Styles */
.availability-indicator {
  display: inline-block;
  margin-left: 5px;
}

.time-slot-available {
  color: #28a745 !important;
  font-weight: 600 !important;
  background-color: #d4edda !important;
}

.time-slot-unavailable {
  color: #721c24 !important;
  font-style: italic !important;
  background-color: #f8d7da !important;
  font-weight: 500 !important;
}

.loading-availability {
  color: #17a2b8 !important;
  font-style: italic;
}

#jam_mulai option:disabled {
  background-color: #f8d7da !important;
  color: #721c24 !important;
  opacity: 0.7;
}

#jam_mulai option:not(:disabled):hover {
  background-color: #d4edda !important;
}

#jam_mulai option.time-slot-available {
  background-color: #d4edda !important;
  color: #155724 !important;
}

#jam_mulai option.time-slot-unavailable {
  background-color: #f8d7da !important;
  color: #721c24 !important;
}

.availability-legend {
  margin-top: 15px;
  font-size: 0.9rem;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.availability-legend span {
  margin-right: 20px;
  display: inline-block;
  font-weight: 500;
}

.legend-available {
  color: #28a745;
}

.legend-unavailable {
  color: #dc3545;
}

.form-group.has-availability-check {
  position: relative;
}

.availability-status {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.availability-status.checking {
  background-color: #cce7ff;
  color: #0056b3;
}

.availability-status.available {
  background-color: #d4edda;
  color: #155724;
}

.availability-status.partial {
  background-color: #fff3cd;
  color: #856404;
}

/* Enhanced form styling for better UX */
.form-control:disabled {
  background-color: #f8f9fa;
  border-color: #e9ecef;
  opacity: 0.8;
}

.text-muted {
  color: #6c757d !important;
  font-size: 0.875rem;
  margin-top: 5px;
  display: block;
}
