/* File: assets/css/style.css */

body {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1e3a5f;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(30, 58, 95, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
}

.input-field {
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

select.input-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%231e3a5f'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231e3a5f' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.btn-edit {
    background: #3b82f6;
    color: white;
}

.btn-edit:hover {
    background: #2563eb;
}

.btn-hapus {
    background: #ef4444;
    color: white;
}

.btn-hapus:hover {
    background: #dc2626;
}

.btn-terima {
    background: #10b981;
    color: white;
}

.btn-terima:hover {
    background: #059669;
}

.btn-tolak {
    background: #f59e0b;
    color: white;
}

.btn-tolak:hover {
    background: #d97706;
}

/* Line clamp untuk alamat */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Print-specific helper classes */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
    
    .no-print {
        display: none !important;
    }
}

/* CSS untuk Print A4 - DIPERBAIKI UNTUK MOBILE */
@media print {
    @page {
        size: A4 portrait;
        margin: 5mm 3mm;
    }
    
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        font-size: 9pt !important;
        line-height: 1.1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        width: 100% !important;
    }
    
    #page-laporan {
        padding-top: 0 !important;
        background: white !important;
        min-height: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .max-w-\[210mm\] {
        max-width: 210mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    #laporan-container {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        min-height: 0 !important;
        page-break-inside: avoid;
        break-inside: avoid;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    #report-content {
        padding: 2mm !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Hide non-essential elements */
    .no-print,
    .print\:hidden,
    nav,
    footer,
    #navbar,
    #mobile-menu,
    .print-hide {
        display: none !important;
    }
    
    /* Optimize font sizes for print */
    .print\:text-xs {
        font-size: 8pt !important;
    }
    
    .print\:text-sm {
        font-size: 9pt !important;
    }
    
    .print\:text-base {
        font-size: 10pt !important;
    }
    
    /* Adjust spacing for print */
    .print\:p-2 {
        padding: 1mm !important;
    }
    
    .print\:p-3 {
        padding: 2mm !important;
    }
    
    .print\:mt-2 {
        margin-top: 1mm !important;
    }
    
    .print\:mb-4 {
        margin-bottom: 2mm !important;
    }
    
    /* Adjust layout for print */
    .flex-col.md\:flex-row,
    .flex-col {
        flex-direction: column !important;
    }
    
    .md\:w-1\/3,
    .md\:w-2\/3 {
        width: 100% !important;
    }
    
    /* Force single column layout for print */
    .grid-cols-1.md\:grid-cols-2,
    .md\:grid-cols-2,
    .grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    /* Make sure nothing overflows */
    * {
        max-width: 100% !important;
        overflow: visible !important;
        position: relative !important;
        float: none !important;
    }
    
    /* Adjust images */
    #report-foto {
        max-width: 100% !important;
        height: auto !important;
        max-height: 40mm !important;
    }
    
    /* Adjust spacing */
    .space-y-2 > * + * {
        margin-top: 0.5mm !important;
    }
    
    .space-y-3 > * + * {
        margin-top: 1mm !important;
    }
    
    .space-y-4 > * + * {
        margin-top: 1.5mm !important;
    }
    
    .gap-2 {
        gap: 0.5mm !important;
    }
    
    .gap-3 {
        gap: 1mm !important;
    }
    
    .gap-4 {
        gap: 1.5mm !important;
    }
    
    /* Remove unnecessary shadows and effects */
    .shadow-lg,
    .shadow,
    .shadow-xl {
        box-shadow: none !important;
    }
    
    /* Adjust borders */
    .border,
    .border-2,
    .border-l-4 {
        border-width: 0.2mm !important;
    }
    
    /* Control font weights */
    .font-bold {
        font-weight: 600 !important;
    }
    
    .font-semibold {
        font-weight: 500 !important;
    }
    
    /* Ensure proper text colors for print */
    .text-\[\#1e3a5f\] {
        color: #000000 !important;
    }
    
    .text-gray-800 {
        color: #000000 !important;
    }
    
    .text-gray-600 {
        color: #333333 !important;
    }
    
    /* Force page break avoidance */
    .page-break-avoid {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    
    /* Header adjustments */
    h1, h2, h3 {
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
        font-size: 11pt !important;
        margin-bottom: 1mm !important;
    }
    
    /* Optimize background colors for printing */
    .bg-gray-50 {
        background-color: #f9f9f9 !important;
    }
    
    .bg-gradient-to-r {
        background: #1e3a5f !important;
    }
    
    /* Prevent text overflow */
    .line-clamp-3 {
        -webkit-line-clamp: 4 !important;
        max-height: 4.4em !important;
        overflow: hidden !important;
    }
}

/* Mobile optimization for screen */
@media screen and (max-width: 768px) {
    #page-laporan {
        padding-top: 1rem !important;
    }
    
    .max-w-\[210mm\] {
        padding: 0.5rem !important;
        margin: 0 auto !important;
    }
    
    #laporan-container {
        margin: 0 !important;
        border-radius: 0.5rem !important;
    }
    
    /* Force single column on mobile */
    .flex-col.md\:flex-row {
        flex-direction: column !important;
    }
    
    .md\:w-1\/3, .md\:w-2\/3 {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Stack grid columns */
    .grid-cols-1.md\:grid-cols-2,
    .md\:grid-cols-2 {
        grid-template-columns: 1fr !important;
    }
    
    /* Adjust spacing for mobile */
    .space-y-6 {
        gap: 1rem !important;
    }
    
    /* Make sure content doesn't overflow */
    .overflow-hidden {
        overflow: visible !important;
    }
    
    /* Adjust font sizes for mobile */
    .text-lg {
        font-size: 0.875rem !important;
    }
    
    .text-xl {
        font-size: 1rem !important;
    }
    
    /* Adjust photo size for mobile */
    #report-foto {
        max-width: 120px !important;
        max-height: 160px !important;
    }
}

/* Additional mobile optimizations for very small screens */
@media screen and (max-width: 480px) {
    #report-content {
        padding: 0.75rem !important;
    }
    
    /* Make foto smaller on very small screens */
    #report-foto {
        max-width: 100px !important;
        max-height: 130px !important;
    }
    
    /* Reduce padding */
    .p-8 {
        padding: 1rem !important;
    }
    
    /* Smaller text */
    .text-base {
        font-size: 0.75rem !important;
    }
    
    .text-sm {
        font-size: 0.7rem !important;
    }
    
    .text-xs {
        font-size: 0.65rem !important;
    }
    
    /* Adjust grid gaps */
    .gap-3 {
        gap: 0.5rem !important;
    }
    
    .gap-4 {
        gap: 0.75rem !important;
    }
}