/* Preview Aspek Penilaian Styles */
.preview-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.preview-header h2 {
    margin: 0;
    color: #343a40;
    font-size: 1.5rem;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.preview-table th {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.preview-table td {
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    vertical-align: top;
}

.preview-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.preview-table tbody tr:hover {
    background: #e9ecef;
}

/* Aspek Content Styles */
.aspek-content, .keterangan-content {
    max-width: 400px;
}

.aspek-text, .keterangan-text {
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
}

.aspek-text ul, .keterangan-text ul {
    margin: 0;
    padding-left: 20px;
}

.aspek-text ol, .keterangan-text ol {
    margin: 0;
    padding-left: 20px;
}

.aspek-text li, .keterangan-text li {
    margin-bottom: 2px;
}

/* Skor Check Styles */
.skor-check {
    color: #28a745;
    font-size: 16px;
}

.skor-empty {
    color: #6c757d;
    font-style: italic;
}

.text-center {
    text-align: center;
}

/* Preview Footer */
.preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.total-aspek {
    font-size: 16px;
    color: #495057;
}

.preview-info {
    color: #6c757d;
    font-size: 14px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.summary-content h3 {
    margin: 0;
    font-size: 24px;
    color: #343a40;
}

.summary-content p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #dee2e6;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 20px;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .preview-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .preview-table {
        min-width: 800px;
    }
    
    .preview-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
}

/* Print Styles */
@media print {
    .sidebar, .header-actions, .preview-actions, .summary-cards {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .preview-table {
        font-size: 12px;
    }
    
    .preview-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #007bff;
    color: white;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #ffeb3b;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #dee2e6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.btn-preview {
    background: #93c13e;
    border-color: #93c13e;
    color: #212529;
}

.btn-preview:hover {
    background: #93c13e;
    border-color: #93c13e;
    color: #212529;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Form Groups in Modal */
.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.modal-body .skor-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.modal-body .checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Tooltip */
[data-toggle="tooltip"] {
    position: relative;
}

[data-toggle="tooltip"]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-body .skor-options {
        flex-direction: column;
        gap: 10px;
    }
}

/* Print Styles - Hide action buttons when printing */
@media print {
    .action-buttons,
    .preview-actions,
    .header-actions,
    .sidebar,
    .summary-cards {
        display: none !important;
    }
    
    .preview-table th:last-child,
    .preview-table td:last-child {
        display: none;
    }
}

/* Filter Styles */
.filter-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.filter-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
}

.filter-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.2rem;
}

.filter-body {
    padding: 20px;
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: end;
}

.filter-group {
    flex: 1;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Filter Info */
.filter-info {
    background: #e7f3ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-badge {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.filter-results {
    color: #495057;
    font-weight: 500;
    margin-left: auto;
}

/* Department Header in Table */
.department-header-row {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.department-header-cell {
    color: white !important;
    font-size: 1.1rem;
    padding: 12px 8px !important;
    border-bottom: 2px solid #004085 !important;
}

.department-header-cell small {
    opacity: 0.9;
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

/* Department Badge */
.department-badge {
    background: #0ca192;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

/* Stat Separator */
.stat-separator {
    color: #6c757d;
    margin: 0 10px;
}

/* Responsive Filter */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .filter-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-results {
        margin-left: 0;
    }
    
    .department-header-cell {
        font-size: 1rem;
        padding: 10px 8px !important;
    }
}

/* Print Styles */
@media print {
    .filter-card,
    .filter-info,
    .action-buttons,
    .preview-actions,
    .header-actions,
    .sidebar,
    .summary-cards {
        display: none !important;
    }
    
    .department-header-row {
        background: #f8f9fa !important;
    }
    
    .department-header-cell {
        color: #000 !important;
        border-bottom: 1px solid #000 !important;
    }
}

/* Department Header Styles */
.department-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.department-info {
    flex: 1;
    min-width: 300px;
}

.department-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-view-soal {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-view-soal:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    transform: translateY(-1px);
}

/* Update Time Styles */
.update-time {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 5px;
    font-style: italic;
}

/* Responsive Department Header */
@media (max-width: 768px) {
    .department-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .department-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .department-info {
        min-width: auto;
    }
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #ebe7e6;
    color: #f6f1f5;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

/* Tambahkan di file CSS */
.btn-export-word {
    background-color: transparent;
    border: 1px solid #f1f5f2;
    color: #eaefeb;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 11px;
    margin-left: 5px;
    transition: all 0.3s;
}

.btn-export-word:hover {
    background-color: #28a745;
    color: white;
}

.department-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Style untuk filter section */
.filter-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.filter-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.filter-header h3 {
    margin: 0;
    font-size: 16px;
    color: #495057;
}

.filter-body {
    padding: 20px;
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 250px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

/* Style khusus untuk dropdown filter */
#filter_status,
#filter_department,
#filter_nomor_registrasi {
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 14px;
    border: 2px solid #0879ea;
    border-radius: 6px;
    background-color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#filter_status:focus,
#filter_department:focus,
#filter_nomor_registrasi:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Style untuk dropdown options */
#filter_status option,
#filter_department option,
#filter_nomor_registrasi option {
    padding: 8px 12px;
    font-size: 14px;
}

/* Style untuk filter actions */
.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-actions {
        width: 100%;
        justify-content: flex-start;
    }
}