/* Main Styles for Presensi RFID */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f3f4f6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    max-height: 90vh;
    overflow-y: auto;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    @page {
        margin: 1cm;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: #f9fafb;
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Status Badge */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 250px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Sidebar */
.sidebar {
    transition: width 0.3s;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-text {
    display: none;
}

/* Sidebar Link - PERBAIKAN WARNA */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    color: #4b5563;  /* Abu-abu gelap - LEBIH TERLIHAT */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    font-size: 0.875rem;
}

.sidebar-link:hover {
    background-color: #eff6ff;  /* Biru muda */
    color: #2563eb;  /* Biru */
}

.sidebar-link.active {
    background-color: #2563eb;  /* Biru */
    color: #ffffff;  /* Putih */
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.sidebar-link.active:hover {
    background-color: #1d4ed8;  /* Biru lebih gelap */
}

.sidebar-link i {
    min-width: 1.25rem;
    text-align: center;
    font-size: 1rem;
}

/* Section Title di Sidebar */
.sidebar-section-title,
nav p.text-gray-400 {
    color: #6b7280 !important;  /* Abu-abu medium */
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.table thead th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

.table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    color: #1f2937;
    vertical-align: middle;
}

.table tbody tr:last-child {
    border-bottom: none;
}

/* Form Styles */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1f2937;
    background-color: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Responsive Table */
@media (max-width: 768px) {
    .responsive-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .table thead th {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
    
    .table tbody td {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }
}