@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary: #1a7a4a;      
    --secondary: #27ae60;    
    --accent: #f39c12;       
    --light-green: #eafaf1; 
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --border: #d5e8d4;
    --danger: #e74c3c;
    --sidebar-width: 240px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f9f6;
    color: var(--text-dark);
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a7a4a 0%, #27ae60 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-box .logo i {
    font-size: 48px;
    color: var(--primary);
}

.login-box h2 {
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.login-box p {
    text-align: center;
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 25px;
}

.login-box .form-control {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
}

.login-box .form-control:focus {
    border-color: var(--secondary);
    box-shadow: none;
}

.btn-login {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--secondary);
    color: white;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--primary);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-align: center;
}

.sidebar-header h5 {
    color: white;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.sidebar-header i {
    color: var(--accent);
    font-size: 28px;
    margin-bottom: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    gap: 10px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255,255,255,0.15);
    color: white;
    padding-left: 28px;
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
}

.topbar {
    background: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

.topbar h4 {
    color: var(--primary);
    font-weight: 600;
    margin: 0;
    font-size: 18px;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray);
    font-size: 14px;
}

.topbar .user-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.page-content {
    padding: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

.stat-card .icon-box {
    width: 55px;
    height: 55px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.stat-card h3 {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
}

.stat-card p {
    margin: 0;
    color: var(--text-gray);
    font-size: 13px;
}

.bg-green   { background: var(--primary); }
.bg-blue    { background: #2980b9; }
.bg-orange  { background: var(--accent); }
.bg-purple  { background: #8e44ad; }

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    border: none;
    margin-bottom: 25px;
}

.card-header {
    background: var(--light-green);
    border-bottom: 2px solid var(--border);
    border-radius: 12px 12px 0 0 !important;
    padding: 15px 20px;
    font-weight: 600;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table th {
    background: #f8fffe;
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
    border-top: none;
}

.table td {
    font-size: 14px;
    vertical-align: middle;
}

.btn-primary {
    background: var(--primary) !important;
    border: none !important;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
}

.btn-primary:hover {
    background: var(--secondary) !important;
}

.btn-danger {
    border-radius: 7px;
    font-size: 13px;
}

.btn-warning {
    border-radius: 7px;
    font-size: 13px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    padding: 9px 12px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(39,174,96,0.15);
}

.alert {
    border-radius: 8px;
    font-size: 14px;
    border: none;
}

.badge {
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar.open {
        width: var(--sidebar-width);
    }
}
