/* TirtaTrack Pro — Custom Styles & Print Sheet */

:root {
    --brand-primary: #0284c7;
    --brand-dark: #0c4a6e;
    --surface-bg: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--surface-bg);
}

/* Subtle Custom Scrollbars */
::-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;
}

/* Smooth transitions */
.nav-item {
    transition: all 0.15s ease;
}

/* Pulse animation for live GPS indicators */
@keyframes pulse-ring {
    0% { transform: scale(0.75); opacity: 0.85; }
    100% { transform: scale(2.4); opacity: 0; }
}

.gps-pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: inherit;
    animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

/* Leaflet Custom Markers */
.leaflet-container {
    font-family: 'Inter', sans-serif !important;
    z-index: 1;
}

.custom-truck-pin {
    background: transparent !important;
    border: none !important;
}

.truck-badge-marker {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.truck-badge-marker:hover {
    transform: scale(1.08);
    z-index: 1000;
}

.truck-badge-marker.selected {
    transform: scale(1.12);
    z-index: 1001;
}

/* Stylized schematic fallback map smooth marker */
.schematic-truck {
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1), top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Signature canvas styling */
#signature-canvas {
    touch-action: none;
    cursor: crosshair;
    background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
    background-size: 16px 16px;
}

/* Modal entrance animation */
@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-animate {
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Tabular numbers for KPIs and currency */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Print Stylesheet for Formal Surat Jalan */
@media print {
    body * {
        visibility: hidden !important;
    }

    #print-area,
    #print-area * {
        visibility: visible !important;
    }

    #print-area {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        padding: 16px !important;
        margin: 0 !important;
        background: #ffffff !important;
        box-shadow: none !important;
        border: none !important;
        color: #0f172a !important;
    }

    .no-print {
        display: none !important;
    }

    @page {
        size: A4 portrait;
        margin: 12mm;
    }
}
