/* Custom Styles & Print Stylesheet for SI-ABSENSI PRO */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Amiri:wght@700&display=swap');

:root {
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --purple: #7c3aed;
    --orange: #ea580c;
    --teal: #0d9488;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

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

/* Attendance Status Radio Pill Buttons */
.status-pill-group {
    display: inline-flex;
    background-color: #f1f5f9;
    border-radius: 9999px;
    padding: 3px;
    gap: 2px;
    border: 1px solid #e2e8f0;
}

.status-btn {
    width: 32px;
    height: 32px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    border: none;
    color: #64748b;
    background: transparent;
    user-select: none;
}

.status-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
}

/* Active states for attendance statuses */
.status-btn.active-H {
    background-color: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.35);
}
.status-btn.active-S {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.35);
}
.status-btn.active-I {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.35);
}
.status-btn.active-K {
    background-color: #8b5cf6 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.35);
}
.status-btn.active-P {
    background-color: #ea580c !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.35);
}
.status-btn.active-A {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: pulse-red 2s infinite;
}
.status-btn.active-T {
    background-color: #0d9488 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.35);
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Table Responsive wrapper */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

/* Category Badges */
.badge-minimum {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.badge-average {
    background-color: #fefce8;
    color: #854d0e;
    border: 1px solid #fde047;
}
.badge-maximal {
    background-color: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.badge-over {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 700;
}

/* Floating Action Button for Fast Action */
.fab {
    box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.4);
}

/* Print Layout for Letters & Official Reports */
@media print {
    body * {
        visibility: hidden;
    }
    
    #print-container, #print-container * {
        visibility: visible;
    }
    
    #print-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 20mm;
        font-family: 'Times New Roman', Times, serif;
        color: #000;
        background: #fff;
    }

    .no-print, nav, header, aside, .tabs-bar, button, .btn-action {
        display: none !important;
    }

    @page {
        size: A4 portrait;
        margin: 15mm 20mm 20mm 20mm;
    }

    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 6px 8px !important;
        color: #000 !important;
    }
}
