/* Custom Styles for Dashboard Tabungan Kurban */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f6f8fa;
    color: #1e293b;
    overflow-x: hidden;
    touch-action: manipulation;
}

/* Prevent auto-zoom on iOS inputs */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="tel"],
    input[type="password"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

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

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Smooth Touch Scrolling */
.touch-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Sticky Column Shadow for Table on Mobile */
.sticky-col-shadow {
    box-shadow: 4px 0 6px -2px rgba(0, 0, 0, 0.06);
}

/* Checkbox Toggle styling */
.matrix-cell {
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}
@media (hover: hover) {
    .matrix-cell:hover {
        transform: scale(1.1);
    }
}
.matrix-cell:active {
    transform: scale(0.92);
}

.matrix-cell-checked {
    background-color: #ecfdf5;
    border: 1.5px solid #34d399;
    color: #059669;
}
.matrix-cell-checked:hover {
    background-color: #d1fae5;
    border-color: #10b981;
}

.matrix-cell-unchecked {
    background-color: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    color: #94a3b8;
}
.matrix-cell-unchecked:hover {
    border-color: #34d399;
    color: #059669;
    background-color: #f0fdf4;
}

/* Pulse animation on save */
@keyframes flashGreen {
    0% { background-color: rgba(52, 211, 153, 0.4); }
    100% { background-color: transparent; }
}
.flash-update {
    animation: flashGreen 0.8s ease-out;
}

/* Mobile Modal Layout */
@media screen and (max-width: 640px) {
    .modal-mobile-sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 92vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}

/* Print specific styles */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-area, #printable-area * {
        visibility: visible;
    }
    #printable-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    .no-print {
        display: none !important;
    }
}
