/* ============================================
   ABSENSI DIGITAL KUA AMBULU - STYLESHEET
   ============================================ */

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  min-height: 100vh;
  padding: 20px;
  position: relative;
  color-scheme: light;
  color: #111827;
  background-color: #f0fdf4;
}

/* Batik Pattern Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 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='%23065f46' fill-opacity='0.05'%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");
  background-size: 30px 30px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-bottom: 4px solid #15803d;
  color-scheme: light;
}

.logo-image {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(21, 128, 61, 0.3));
}

.logo {
  width: 50px;
  height: 50px;
  background: #15803d;
  border-radius: 50%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.3);
}

.header h1 {
  color: #15803d;
  font-size: 28px;
  margin-bottom: 10px;
}

.header h2 {
  color: #166534;
  font-size: 20px;
  font-weight: 600;
}

.divider {
  height: 4px;
  background: linear-gradient(90deg, #15803d 0%, #22c55e 50%, #15803d 100%);
  border-radius: 2px;
  margin-top: 20px;
}

/* Form Container */
.form-container {
  background: white;
  padding: 40px 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  color-scheme: light;
  color: #111827;
}

.section-title {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: white;
  padding: 15px 20px;
  margin: -10px -10px 25px -10px;
  border-radius: 10px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 4px 10px rgba(21, 128, 61, 0.3);
}

.couple-section {
  background: #f9fafb;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  border: 2px solid #bbf7d0;
  color-scheme: light;
}

/* ============================================
   SEKSI AKAD NIKAH - Ungu / Merah Muda
   ============================================ */
.akad-section {
  background: #faf5ff;
  border: 2px solid #ddd6fe;
}

.akad-section .section-title {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.akad-section .date-display {
  border-color: #ddd6fe;
}

.akad-section .date-display:hover,
.akad-section .date-display:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.akad-section label {
  color: #7c3aed;
}

/* Form Elements */
.form-group {
  margin-bottom: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

label {
  display: block;
  color: #15803d;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.required {
  color: #dc2626;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  font-family: inherit;
  background: #ffffff;
  color: #111827;
  color-scheme: light;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

input.error,
textarea.error,
canvas.error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* ============================================
   CUSTOM DATE PICKER DISPLAY
   ============================================ */
.date-display {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
  user-select: none;
  min-height: 46px;
  color-scheme: light;
}

.date-display:hover,
.date-display:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  outline: none;
}

.date-display .date-display-text {
  flex: 1;
}

.date-display .date-display-icon {
  font-size: 16px;
  margin-left: 8px;
}

.date-display.has-value {
  color: #111827;
}

/* ============================================
   SIGNATURE CANVAS - PUTIH, ANTI DARK MODE
   ============================================ */
.signature-container {
  border: 2px solid #bbf7d0;
  border-radius: 8px;
  padding: 16px;
  background: white;
  color-scheme: light;
}

.signature-hint {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  text-align: center;
  font-style: italic;
}

canvas {
  width: 100%;
  height: 200px;
  border: 2px dashed #86efac;
  border-radius: 8px;
  background: #ffffff !important;
  background-color: #ffffff !important;
  cursor: crosshair;
  touch-action: none;
  display: block;
  color-scheme: light;
  forced-color-adjust: none;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-clear {
  background: #ef4444;
  color: white;
  margin-top: 12px;
}

.btn-clear:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: white;
  padding: 16px;
  font-size: 16px;
  margin-top: 10px;
  justify-content: center;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
}

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

/* Footer */
.footer {
  background: #15803d;
  padding: 20px 30px;
  text-align: center;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.footer p {
  color: white;
  font-size: 13px;
}

/* Loading & Messages */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
  color: #15803d;
  font-weight: 600;
}

.loading.active {
  display: block;
}

.success-message {
  display: none;
  background: #d1fae5;
  border: 2px solid #22c55e;
  color: #15803d;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}

.success-message.active {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .logo-image {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 640px) {
  .header h1 {
    font-size: 24px;
  }
  
  .header h2 {
    font-size: 18px;
  }
  
  .form-container {
    padding: 30px 20px;
  }
  
  .couple-section {
    padding: 20px;
  }
  
  .logo-image {
    width: 70px;
    height: 70px;
  }
}

/* ============================================
   HALAMAN SUKSES - BUKTI PENDAFTARAN
   ============================================ */

.success-page {
  display: none;
  min-height: 100vh;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  padding: 30px 20px;
  align-items: flex-start;
  justify-content: center;
  color-scheme: light;
  color: #111827;
}

.success-page-inner {
  background: #ffffff;
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(21, 128, 61, 0.15);
  overflow: hidden;
  color-scheme: light;
  color: #111827;
}

/* --- Kop Surat --- */
.bukti-header {
  background: #ffffff;
  padding: 28px 28px 0 28px;
}

.bukti-kop {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.bukti-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
}

.bukti-kop-text {
  text-align: left;
}

.bukti-instansi {
  font-size: 11px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
}

.bukti-kantor {
  font-size: 15px;
  font-weight: 800;
  color: #15803d;
  line-height: 1.4;
  margin-top: 3px;
}

.bukti-alamat {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.4;
}

.bukti-garis-top {
  height: 3px;
  background: linear-gradient(90deg, #15803d 0%, #22c55e 50%, #15803d 100%);
  border-radius: 2px;
  margin-bottom: 14px;
}

.bukti-judul-wrap {
  text-align: center;
  padding-bottom: 20px;
}

.bukti-judul {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bukti-subjudul {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* --- Status Sukses --- */
.bukti-status {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  padding: 28px 28px 24px;
  text-align: center;
  color: #ffffff;
}

.bukti-centang {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  margin: 0 auto 12px;
  line-height: 1;
}

.bukti-status-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.bukti-waktu-label {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.bukti-waktu {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255,255,255,0.15);
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.3);
}

/* --- Body Data --- */
.bukti-body {
  padding: 24px 28px 8px;
  background: #ffffff;
}

.bukti-section-label {
  font-size: 13px;
  font-weight: 700;
  color: #15803d;
  background: #f0fdf4;
  border-left: 4px solid #15803d;
  padding: 7px 12px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 10px;
}

/* Label khusus untuk akad di halaman bukti */
.bukti-section-label.akad {
  color: #7c3aed;
  background: #f5f3ff;
  border-left-color: #7c3aed;
}

.bukti-tabel {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.bukti-td-label {
  color: #6b7280;
  font-weight: 500;
  width: 130px;
  padding: 6px 8px 6px 0;
  vertical-align: top;
  white-space: nowrap;
}

.bukti-td-sep {
  color: #9ca3af;
  padding: 6px 10px 6px 0;
  vertical-align: top;
}

.bukti-td-val {
  color: #111827;
  font-weight: 600;
  padding: 6px 0;
  vertical-align: top;
}

/* Highlight tanggal akad di halaman bukti */
.bukti-td-val.akad-val {
  color: #7c3aed;
  font-weight: 700;
}

/* --- Catatan --- */
.bukti-catatan {
  margin: 16px 28px;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.6;
}

/* --- Tombol --- */
.bukti-actions {
  padding: 8px 28px 24px;
  text-align: center;
}

.btn-new-form {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: none;
  padding: 14px 36px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-new-form:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.35);
}

/* --- Footer Struk --- */
.bukti-footer {
  background: #f9fafb;
  padding: 14px 28px;
  text-align: center;
}

.bukti-garis-bottom {
  height: 2px;
  background: linear-gradient(90deg, #15803d 0%, #22c55e 50%, #15803d 100%);
  border-radius: 2px;
  margin-bottom: 12px;
}

.bukti-footer p {
  font-size: 11px;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 640px) {
  .bukti-kop {
    flex-direction: column;
    text-align: center;
  }
  .bukti-kop-text {
    text-align: center;
  }
  .bukti-header,
  .bukti-body,
  .bukti-catatan,
  .bukti-actions,
  .bukti-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .bukti-td-label {
    width: 110px;
    font-size: 13px;
  }
}