/* Reset dan base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9em;
    color: #666;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    font-size: 1.5em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    text-decoration: none;
}

/* Forms */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #777;
    font-size: 0.9em;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-view {
    background: #17a2b8;
    color: white;
    padding: 5px 10px;
    font-size: 0.9em;
}

.btn-edit {
    background: #ffc107;
    color: #333;
    padding: 5px 10px;
    font-size: 0.9em;
}

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 5px 10px;
    font-size: 0.9em;
}

.btn-admin {
    background: #6f42c1;
    color: white;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

table tbody tr:hover {
    background: #f8f9fa;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 10px;
    color: #333;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.recent-reports {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.dashboard-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Reports */
.filter-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.filter-row {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.reports-table {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Users */
.users-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.add-user-form {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.users-list {
    margin-top: 30px;
}

.role-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
}

.role-admin {
    background: #667eea;
    color: white;
}

.role-user {
    background: #6c757d;
    color: white;
}

.btn-disabled {
    background: #ccc;
    color: #666;
    padding: 5px 10px;
    font-size: 0.9em;
    cursor: not-allowed;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .form-row,
    .filter-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}

/* Reset dan base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    font-size: 1.5em;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.btn-logout {
    background: #dc3545;
    color: white;
    padding: 5px 15px;
    border-radius: 5px;
    text-decoration: none;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
}

.form-group textarea {
    resize: vertical;
}

/* Stats Container */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-actions {
        flex-direction: column;
    }
}

/* Tambahan style untuk users.php */

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

/* Department filter chips */
.dept-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.dept-chip {
    padding: 6px 12px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.dept-chip:hover {
    background: #dee2e6;
}

.dept-chip.active {
    background: #667eea;
    color: white;
}

/* User role indicators */
.role-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.role-indicator.admin {
    background: #dc3545;
}

.role-indicator.user {
    background: #28a745;
}

/* Status badges */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Quick action buttons */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Export buttons */
.export-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.export-btn:hover {
    background: #e9ecef;
}

/* Responsive table */
@media (max-width: 768px) {
    .users-table {
        font-size: 14px;
    }
    
    .users-table td, .users-table th {
        padding: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-small {
        font-size: 11px;
        padding: 4px 8px;
    }
}