/* ============================================================
   BINA JURNAL — Custom Stylesheet
   Komplemen Tailwind CSS
   ============================================================ */

/* -------- Base -------- */
*, *::before, *::after { box-sizing: border-box; }

/* -------- Form Components -------- */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.925rem;
  color: #111827;
  background-color: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
  font-size: 0.8rem;
  color: #ef4444;
  margin-top: 0.3rem;
}

/* -------- Buttons -------- */
.btn-primary {
  padding: 0.7rem 1.5rem;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 0.875rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s, background 0.15s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.30);
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.40);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 0.6rem 1.25rem;
  background: #f3f4f6;
  color: #374151;
  font-weight: 500;
  font-size: 0.875rem;
  border-radius: 0.75rem;
  border: 1.5px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover { background: #e5e7eb; }

.btn-danger {
  padding: 0.5rem 1rem;
  background: #fee2e2;
  color: #dc2626;
  font-weight: 500;
  font-size: 0.8rem;
  border-radius: 0.625rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

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

.btn-edit {
  padding: 0.5rem 1rem;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 500;
  font-size: 0.8rem;
  border-radius: 0.625rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-edit:hover { background: #dbeafe; }

/* -------- Cards -------- */
.stat-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* -------- Table -------- */
.data-table { width: 100%; border-collapse: collapse; }

.data-table th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

.data-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover td { background: #f8fafc; }
.data-table tr:last-child td { border-bottom: none; }

/* -------- Badges -------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-gray   { background: #f3f4f6; color: #4b5563; }

/* -------- Toast -------- */
.toast {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  animation: toast-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  font-size: 0.875rem;
  font-weight: 500;
}

.toast.toast-success { background: #fff; border-left: 4px solid #10b981; color: #065f46; }
.toast.toast-error   { background: #fff; border-left: 4px solid #ef4444; color: #991b1b; }
.toast.toast-info    { background: #fff; border-left: 4px solid #2563eb; color: #1e40af; }

.toast.toast-out {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(120%); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(120%); }
}

/* -------- Modal -------- */
.modal-open { overflow: hidden; }

/* -------- Animations -------- */
.card-fade {
  animation: fade-up 0.4s ease both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fade-up 0.3s ease both;
}

/* -------- Skeleton Loading -------- */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

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

/* -------- Pagination -------- */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #374151;
  background: #fff;
  text-decoration: none;
  transition: all 0.15s;
}

.page-btn:hover         { background: #eff6ff; border-color: #2563eb; color: #2563eb; }
.page-btn.active        { background: #2563eb; border-color: #2563eb; color: #fff; }
.page-btn:disabled      { opacity: 0.4; cursor: not-allowed; }

/* -------- Sidebar active indicator -------- */
#sidebar a.active-nav {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* -------- Scrollbar -------- */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* -------- Responsive Table Wrapper -------- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 1rem 1rem;
}

/* -------- Activity Card (form jurnal publik) -------- */
.act-card {
  border: 1.5px solid #dbeafe;
  background: #f0f7ff;
  border-radius: 0.875rem;
  padding: 1rem;
  transition: box-shadow 0.2s;
}

.act-card:focus-within {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  border-color: #93c5fd;
}

.act-card textarea.form-input {
  background: #fff;
  margin-top: 0.5rem;
}

/* ================================================================
   SUCCESS ANIMATION OVERLAY
   ================================================================ */

/* Animasi checkmark — stroke draw-on effect */
.check-draw {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw-check 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}

@keyframes draw-check {
  to { stroke-dashoffset: 0; }
}

/* Ping lambat — dihapus (tidak digunakan) */

/* State aktif overlay */
#success-overlay.is-visible {
  pointer-events: all;
  opacity: 1;
}
#success-overlay.is-visible #success-backdrop {
  opacity: 1;
}
#success-overlay.is-visible #success-card {
  opacity: 1;
  transform: scale(1);
}

