/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #dad9d4;
    min-height: 100vh;
    color: #333;
}

/* Animasi Loading */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Container dan Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    margin-left: 250px;
    padding: 80px 20px 20px 20px;
    min-height: 100vh;
    animation: fadeIn 0.8s ease-out;
}

/* Navbar */
.navbar {
    background: #28a745;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.navbar-brand {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;           /* sejajarkan logo dan teks */
    align-items: center;     /* vertikal center */
    gap: 10px;               /* jarak antara logo dan teks */
}


.navbar-brand i {
    color: #ffd700;
    font-size: 28px;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #ffd700;
    transform: translateY(-2px);
}

.user-info {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 250px;
    height: calc(100vh - 70px);
    background: linear-gradient(180deg, #2d5a2d 0%, #4a7c59 100%);
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    animation: slideIn 0.5s ease-out;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-item {
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #ffd700;
    color: #ffd700;
    transform: translateX(5px);
}

.sidebar-link.active {
    background: rgba(255,215,0,0.2);
    border-left-color: #ffd700;
    color: #ffd700;
}

.sidebar-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    padding: 30px;
    margin-top: 10px;
    margin-bottom: 30px;
    animation: fadeIn 0.8s ease-out;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 3px solid #e9ecef;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.card-title {
    color: #1a5f1a;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.card-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a5f1a;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #2d5a2d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,90,45,0.1);
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: #f8f9fa;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(45deg, #1a5f1a, #2d5a2d);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #2d5a2d, #4a7c59);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26,95,26,0.3);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #20c997, #17a2b8);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #ffd700);
    color: #333;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #20c997);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(45deg, #20c997, #28a745);
    transform: translateY(-2px);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table th {
    background: linear-gradient(45deg, #1a5f1a, #2d5a2d);
    color: white;
    font-weight: 600;
}

.table tr:hover {
    background: #f8f9fa;
}

.table-striped tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #2d5a2d;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1a5f1a;
    margin-bottom: 10px;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
}

.stat-icon {
    font-size: 48px;
    color: #ffd700;
    margin-bottom: 15px;
}

/* Login/Register Forms */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a5f1a 0%, #2d5a2d 50%, #4a7c59 100%);
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: fadeIn 0.8s ease-out;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    color: #1a5f1a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-subtitle {
    color: #6c757d;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .navbar {
        padding: 0 15px;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2d5a2d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a5f1a;
} 