/* style.css - Versi Premium dengan Desain Modern */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #4895ef;
    --dark-color: #1e1e2f;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --sidebar-width: 280px;
    --header-height: 70px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Premium */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(135deg, #1e1e2f 0%, #2d2d44 100%);
    color: white;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.sidebar h2 {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar h2 i {
    color: var(--success-color);
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 400;
}
/* style.css - Bagian Sidebar Premium */

/* Sidebar Container */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e1e2f 0%, #2d2d44 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    padding: 30px 20px 20px 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-weight: 600;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    margin: 0;
}

.sidebar-header h2 i {
    color: #4cc9f0;
    font-size: 28px;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 20px 15px;
}

.sidebar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu ul li {
    margin-bottom: 8px;
}

.sidebar-menu ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 400;
    position: relative;
    overflow: hidden;
}

.sidebar-menu ul li a i {
    width: 24px;
    font-size: 20px;
    text-align: center;
}

.sidebar-menu ul li a span {
    flex: 1;
}

/* Hover Effect */
.sidebar-menu ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

/* Active Menu */
.sidebar-menu ul li a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    position: relative;
}

.sidebar-menu ul li a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

/* Logout Item */
.sidebar-menu ul li.logout-item {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.sidebar-menu ul li.logout-item a {
    color: #f72585;
}

.sidebar-menu ul li.logout-item a:hover {
    background: rgba(247, 37, 133, 0.1);
    color: #f72585;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-footer .user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.sidebar-footer .user-details {
    flex: 1;
}

.sidebar-footer .user-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
    margin-bottom: 4px;
}

.sidebar-footer .user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-header h2 span,
    .sidebar-menu ul li a span,
    .sidebar-footer .user-details {
        display: none;
    }
    
    .sidebar-header h2 i {
        margin: 0 auto;
        font-size: 32px;
    }
    
    .sidebar-menu ul li a {
        justify-content: center;
        padding: 15px;
    }
    
    .sidebar-menu ul li a i {
        width: auto;
        font-size: 24px;
    }
    
    .sidebar-footer .user-avatar {
        margin: 0 auto;
    }
}

.sidebar ul li a i {
    width: 24px;
    font-size: 20px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar ul li a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* Header Premium */
.header {
    background: white;
    padding: 25px 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--primary-color);
}

.header h1 {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    color: var(--gray-color);
    font-size: 16px;
}

.header .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
}

/* Stats Cards Premium */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(76, 201, 240, 0.1));
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.stat-icon.primary { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); }
.stat-icon.success { background: linear-gradient(135deg, #4cc9f0, #4895ef); }
.stat-icon.warning { background: linear-gradient(135deg, #f8961e, #f3722c); }
.stat-icon.danger { background: linear-gradient(135deg, #f72585, #b5179e); }

.stat-info {
    flex: 1;
    margin-left: 20px;
}

.stat-info h3 {
    color: var(--gray-color);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.stat-label {
    color: var(--gray-color);
    font-size: 14px;
    margin-top: 5px;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.chart-card h3 {
    color: var(--dark-color);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3 i {
    color: var(--primary-color);
}

/* Table Premium */
.table-container {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    overflow-x: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h3 {
    color: var(--dark-color);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
}

table th:first-child {
    border-radius: 10px 0 0 10px;
}

table th:last-child {
    border-radius: 0 10px 10px 0;
}

table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #555;
    font-size: 14px;
}

table tr:hover {
    background: #f8f9fa;
}

/* Button Premium */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #4cc9f0, #4895ef);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f72585, #b5179e);
    box-shadow: 0 5px 15px rgba(247, 37, 133, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f8961e, #f3722c);
    box-shadow: 0 5px 15px rgba(248, 150, 30, 0.3);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 12px;
}

/* Form Premium */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    max-width: 800px;
    margin: 0 auto;
}

.form-container h3 {
    color: var(--dark-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
    margin-right: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-group input[type="file"] {
    padding: 10px;
    background: #f8f9fa;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Alert Premium */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 5px solid;
    box-shadow: var(--card-shadow);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert i {
    font-size: 20px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Status Badge */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}

.status-badge.aktif {
    background: #d4edda;
    color: #155724;
}

.status-badge.tidak-aktif {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.hadir {
    background: #d4edda;
    color: #155724;
}

.status-badge.sakit {
    background: #fff3cd;
    color: #856404;
}

.status-badge.izin {
    background: #cce5ff;
    color: #004085;
}

.status-badge.alpha {
    background: #f8d7da;
    color: #721c24;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 80px;
        padding: 20px 10px;
    }
    
    .sidebar h2 span,
    .sidebar ul li a span {
        display: none;
    }
    
    .sidebar h2 i {
        margin: 0 auto;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.chart-card,
.table-container,
.form-container {
    animation: fadeIn 0.5s ease-out;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Font Awesome Icons - Tambahkan di head HTML */
/* <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> */