/* Custom CSS & Print Styles for ASSET PTKK ENTERPRISE */

/* Glassmorphism & UI Utilities */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
}

.glass-dropdown {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

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

.animate-fade-in {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
  animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse-glow {
  animation: pulseGlow 4s ease-in-out infinite;
}

.shimmer-bg {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Tab active style */
.tab-active {
  color: #2563eb !important;
  background: #eff6ff !important;
  font-weight: 700 !important;
  border-color: #bfdbfe !important;
}

/* Tooltip & badge */
.badge-tag {
  transition: all 0.2s ease;
}
.badge-tag:hover {
  transform: translateY(-1px);
}

/* Table styling */
th {
  user-select: none;
}
th:hover {
  background-color: #f8fafc;
}

/* Spinner loader */
.loader-spin {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-spin-blue {
  border: 2.5px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---------------------------------------------------- */
/* PRINT MEDIA STYLING (Matched exactly with requirement) */
/* ---------------------------------------------------- */
#print-area-wrapper {
  display: none;
}

@media print {
  .no-print, nav, header, footer, .btn-action, #toast, #imageModal, #cpanelModal {
    display: none !important;
  }
  
  body {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    color: black !important;
  }

  @page {
    size: A4;
    margin: 10mm;
  }

  #print-area-wrapper {
    display: block !important;
  }

  #print-sticker-area, #print-report-area {
    display: none !important;
  }

  /* Mode Sticker: 2 columns grid */
  body.mode-sticker #print-sticker-area {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6mm;
  }
  body.mode-sticker #print-report-area {
    display: none !important;
  }

  .sticker-box {
    border: 2px solid #0f172a;
    border-radius: 6px;
    height: 48mm;
    display: flex;
    flex-direction: row;
    padding: 3mm;
    page-break-inside: avoid;
    background: white;
    box-sizing: border-box;
    align-items: center;
  }

  .sticker-qr {
    width: 38mm;
    height: 38mm;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    padding: 2px;
    border-radius: 4px;
  }

  .sticker-info {
    flex: 1;
    padding-left: 4mm;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }

  /* Mode Report: Formal Table */
  body.mode-report #print-report-area {
    display: block !important;
  }
  body.mode-report #print-sticker-area {
    display: none !important;
  }

  .report-header-container {
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 3pt solid #0f172a;
  }

  .print-logo {
    width: 180px;
    height: auto;
    object-fit: contain;
    display: block;
  }

  table.print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1.5pt solid #0f172a;
  }

  table.print-table th, table.print-table td {
    border: 1pt solid #334155 !important;
    padding: 7px 10px;
    text-align: left;
    font-size: 9pt;
    vertical-align: middle;
  }

  table.print-table th {
    background-color: #f1f5f9 !important;
    -webkit-print-color-adjust: exact;
    text-transform: uppercase;
    font-weight: 800;
    text-align: center;
  }

  .img-report-md {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    display: block;
    margin: 0 auto;
  }

  .text-center-print {
    text-align: center !important;
  }
}
