/**
 * PT SAE Daily Costing Book - Agronomis Dashboard Styles
 * Standard International CSS Architecture
 */

/* ==========================================================================
   1. Animations & Spinners
   ========================================================================== */
.loader {
  border-top-color: #10b981;
  -webkit-animation: spinner 1.2s linear infinite;
  animation: spinner 1.2s linear infinite;
}

@-webkit-keyframes spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* ==========================================================================
   2. Sticky Table Layout for Matrix Grid (Dynamic Fit-All-Screens)
   Ensures headers & leading columns (Afdeling, Blok) remain fixed on scroll
   ========================================================================== */
:root {
  --col-afd-w: 68px;
}

@media (max-width: 640px) {
  :root {
    --col-afd-w: 56px;
  }
}

.sticky-col-1 {
  position: sticky;
  left: 0;
  width: var(--col-afd-w);
  min-width: var(--col-afd-w);
  max-width: var(--col-afd-w);
  background-color: inherit;
  z-index: 20;
}

.sticky-col-2 {
  position: sticky;
  left: var(--col-afd-w);
  background-color: inherit;
  z-index: 20;
}

.sticky-header-top {
  position: sticky;
  top: 0;
  z-index: 30;
}

.sticky-header-corner-1 {
  position: sticky;
  top: 0;
  left: 0;
  width: var(--col-afd-w);
  min-width: var(--col-afd-w);
  max-width: var(--col-afd-w);
  z-index: 40;
}

.sticky-header-corner-2 {
  position: sticky;
  top: 0;
  left: var(--col-afd-w);
  z-index: 40;
}

/* Sticky leading column for Summary Table (Jenis Pekerjaan) */
.sticky-col-summary {
  position: sticky;
  left: 0;
  min-width: 140px;
  max-width: 240px;
  background-color: inherit;
  z-index: 20;
}

.sticky-header-summary {
  position: sticky;
  top: 0;
  left: 0;
  min-width: 140px;
  max-width: 240px;
  z-index: 40;
}

/* ==========================================================================
   3. Custom Table Scrollbar & Typography Enhancements
   ========================================================================== */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Print styling optimization */
@media print {
  .no-print {
    display: none !important;
  }
  body {
    padding: 0;
    background: #ffffff;
  }
}

