/* Reporting Module CSS - Toast Notification & Modal Styling */
/* Dibuat oleh Dharma Surya */

/* Toast Container */
.reporting-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.reporting-toast-container[popover] {
  position: fixed;
  inset: 1rem 1rem auto auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: visible;
}

/* Individual Toast */
.reporting-toast {
  pointer-events: auto;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 1px solid;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0.5rem);
  opacity: 0;
  animation: toastSlideIn 0.3s ease-out forwards;
}

.reporting-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.reporting-toast.hide {
  transform: translateY(0.5rem);
  opacity: 0;
}

/* Toast Types */
.reporting-toast-success {
  background-color: #059669; /* emerald-600 */
  color: white;
  border-color: rgba(5, 150, 105, 0.3);
}

.reporting-toast-error {
  background-color: #e11d48; /* rose-600 */
  color: white;
  border-color: rgba(225, 29, 72, 0.3);
}

.reporting-toast-info {
  background-color: #1e293b; /* slate-800 */
  color: white;
  border-color: rgba(30, 41, 59, 0.5);
}

.reporting-toast-warning {
  background-color: #d97706; /* amber-600 */
  color: white;
  border-color: rgba(217, 119, 6, 0.3);
}

/* Toast Icon */
.reporting-toast-icon {
  font-size: 1.25rem;
  font-variation-settings: 'FILL' 0;
}

/* Modal Overlay */
.reporting-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 9998;
  animation: fadeIn 0.2s ease-out;
}

/* Modal Dialog */
.reporting-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 28rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid;
  z-index: 9999;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Modal Header */
.reporting-modal-header {
  padding: 1.5rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.reporting-modal-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.reporting-modal-success-icon {
  color: #059669; /* emerald-600 */
}

.reporting-modal-error-icon {
  color: #e11d48; /* rose-600 */
}

.reporting-modal-warning-icon {
  color: #d97706; /* amber-600 */
}

.reporting-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.reporting-modal-description {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

/* Modal Body */
.reporting-modal-body {
  padding: 1.5rem;
}

/* Modal Actions */
.reporting-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.reporting-modal-cancel {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background: #f3f4f6;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s;
}

.reporting-modal-cancel:hover {
  background-color: #e5e7eb;
}

.reporting-modal-confirm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background: #2563eb; /* blue-600 */
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 0.15s;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.reporting-modal-confirm:hover {
  background-color: #1d4ed8; /* blue-700 */
}

/* Form Styling */
.reporting-form-container {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.reporting-form-group {
  margin-bottom: 1rem;
}

.reporting-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.reporting-form-required {
  color: #ef4444; /* red-500 */
}

.reporting-form-input {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  outline: none;
  transition: border-color 0.15s;
}

.reporting-form-input:focus {
  border-color: #2563eb; /* blue-500 */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reporting-form-input-error {
  border-color: #ef4444; /* red-500 */
  background-color: #fef2f2;
}

.reporting-form-error {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #ef4444; /* red-500 */
}

/* Animations */
@keyframes toastSlideIn {
  from {
    transform: translateY(0.5rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes modalSlideIn {
  from {
    transform: translate(-50%, -45%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .reporting-toast-container {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
  }
  
  .reporting-toast {
    width: 100%;
  }
  
  .reporting-modal {
    width: calc(100% - 2rem);
    margin: 1rem;
  }
  
  .reporting-modal-actions {
    flex-direction: column;
  }
  
  .reporting-modal-cancel,
  .reporting-modal-confirm {
    width: 100%;
  }
}


/* ==========================================================================
   MODAL POPUP VALIDASI & KONFIRMASI INTERAKTIF
   Dibuat oleh Dharma Surya
   ========================================================================== */
.custom-confirm-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 440px;
  width: calc(100% - 32px);
  margin: auto;
  overflow: visible;
}
.custom-confirm-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.custom-confirm-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 22px 22px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: confirmPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
@keyframes confirmPopIn {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.custom-confirm-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 14px;
}
.custom-confirm-icon-wrap.is-success {
  background: #ecfdf5;
  color: #059669;
}
.custom-confirm-icon-wrap.is-danger {
  background: #fff1f2;
  color: #e11d48;
}
.custom-confirm-icon-wrap.is-warning {
  background: #fffbeb;
  color: #d97706;
}
.custom-confirm-icon-wrap.is-info {
  background: #eff6ff;
  color: #2563eb;
}
.custom-confirm-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.custom-confirm-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #64748b;
}
.custom-confirm-desc strong {
  color: #1e293b;
}
.custom-confirm-summary {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 13px;
  color: #334155;
}
.custom-confirm-summary strong {
  color: #0f172a;
}
.custom-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}
.btn-custom-confirm-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.btn-custom-confirm-no:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}
.btn-custom-confirm-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  color: #ffffff;
}
.btn-custom-confirm-yes.is-success {
  background: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
}
.btn-custom-confirm-yes.is-success:hover {
  background: #047857;
  transform: translateY(-1px);
}
.btn-custom-confirm-yes.is-danger {
  background: #e11d48;
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
}
.btn-custom-confirm-yes.is-danger:hover {
  background: #be123c;
  transform: translateY(-1px);
}
.btn-custom-confirm-yes.is-warning {
  background: #d97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
}
.btn-custom-confirm-yes.is-warning:hover {
  background: #b45309;
  transform: translateY(-1px);
}
.btn-custom-confirm-yes.is-info {
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
}
.btn-custom-confirm-yes.is-info:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .custom-confirm-actions {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   MODUL ANTRIAN SUBMIT — POPUP LOADING ANIMASI & GAMBAR PEMROSESAN DATA
   Dibuat oleh Dharma Surya
   ========================================================================== */
.submission-queue-modal {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 450px;
  width: calc(100% - 32px);
  margin: auto;
  overflow: visible;
  z-index: 100001;
}

.submission-queue-modal::backdrop {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.submission-queue-box {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 28px 60px -12px rgba(15, 23, 42, 0.38), 0 0 0 1px rgba(59, 130, 246, 0.14);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: confirmPopIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.submission-queue-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  margin-bottom: 14px;
}

.submission-queue-badge.is-waiting {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.submission-queue-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: queuePulseDot 1.2s ease-in-out infinite;
}

.submission-queue-visual {
  position: relative;
  width: 156px;
  height: 128px;
  margin: 2px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.submission-queue-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sq-ring-pulse {
  transform-origin: 78px 64px;
  animation: sqRingPulse 2.2s ease-out infinite;
}

.sq-ring-pulse-delay {
  transform-origin: 78px 64px;
  animation: sqRingPulse 2.2s ease-out 1.1s infinite;
}

.sq-gear-spin {
  transform-origin: 120px 36px;
  animation: sqSpin 4s linear infinite;
}

.sq-gear-spin-reverse {
  transform-origin: 36px 40px;
  animation: sqSpinReverse 3.2s linear infinite;
}

.sq-packet-1 {
  animation: sqPacketFlow 1.6s ease-in-out infinite;
}

.sq-packet-2 {
  animation: sqPacketFlow 1.6s ease-in-out 0.55s infinite;
}

.sq-packet-3 {
  animation: sqPacketFlow 1.6s ease-in-out 1.1s infinite;
}

.sq-server-led {
  animation: queuePulseDot 0.9s ease-in-out infinite alternate;
}

.submission-queue-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.submission-queue-desc {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
  max-width: 360px;
}

.submission-queue-progress-wrap {
  width: 100%;
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.submission-queue-progress-bar {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #2563eb 100%);
  background-size: 200% 100%;
  animation: sqShimmer 1.5s linear infinite;
  transition: width 0.35s linear;
}

.submission-queue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
}

.submission-queue-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 2px 8px;
  border-radius: 6px;
}

@keyframes queuePulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

@keyframes sqRingPulse {
  0% { transform: scale(0.82); opacity: 0.65; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes sqSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sqSpinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes sqPacketFlow {
  0% { transform: translateY(10px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(-12px); opacity: 0; }
}

@keyframes sqShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
