/* ============================================
   STYLE - DUCK FARM BUMDes
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --bg: #f0f4f8;
    --text: #263238;
    --text-light: #78909C;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --sidebar-width: 260px;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--primary-dark);
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
}

.sidebar-brand h2 i {
    margin-right: 8px;
}

.sidebar-brand small {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 11px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
    border-left: 3px solid transparent;
    gap: 12px;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: #4CAF50;
}

.sidebar-nav a.logout {
    margin-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
    color: #ff6b6b;
}

.sidebar-nav a.logout:hover {
    background: rgba(244,67,54,0.2);
}

.sidebar-user {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user i {
    font-size: 30px;
    opacity: 0.8;
}

.sidebar-user strong {
    display: block;
    font-size: 14px;
}

.sidebar-user small {
    font-size: 12px;
    opacity: 0.7;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px 30px;
    min-height: 100vh;
}

.hamburger {
    display: none;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    margin-bottom: 15px;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h1 {
    font-size: 24px;
    color: var(--primary-dark);
}

.page-header h1 i {
    margin-right: 10px;
    color: var(--primary-light);
}

/* ============================================
   ALERT
   ============================================ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.alert-danger {
    background: #FFEBEE;
    color: #C62828;
    border: 1px solid #FFCDD2;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFE0B2;
}

.alert-info {
    background: #E3F2FD;
    color: #0D47A1;
    border: 1px solid #BBDEFB;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.stat-icon.blue { background: #2196F3; }
.stat-icon.green { background: #4CAF50; }
.stat-icon.orange { background: #FF9800; }
.stat-icon.purple { background: #9C27B0; }
.stat-icon.pink { background: #E91E63; }
.stat-icon.red { background: #f44336; }

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.stat-change {
    font-size: 11px;
    color: var(--text-light);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #E8ECF0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.card-header h3 i {
    margin-right: 8px;
    color: var(--primary-light);
}

.card-body {
    padding: 20px;
}

/* ============================================
   ROW GRID
   ============================================ */
.row-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #37474F;
    margin-bottom: 4px;
}

.form-group label i {
    margin-right: 6px;
    color: #4CAF50;
    width: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #E8ECF0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
    box-sizing: border-box;
    background: #F8FAFC;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.1);
    background: #ffffff;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary,
.btn-success,
.btn-danger,
.btn-warning {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.btn-primary { background: #2E7D32; }
.btn-primary:hover { background: #1B5E20; }

.btn-success { background: #4CAF50; }
.btn-success:hover { background: #388E3C; }

.btn-danger { background: #f44336; }
.btn-danger:hover { background: #d32f2f; }

.btn-warning { background: #ff9800; color: #333; }
.btn-warning:hover { background: #f57c00; }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success { background: #E8F5E9; color: #2E7D32; }
.badge-danger { background: #FFEBEE; color: #C62828; }
.badge-warning { background: #FFF3E0; color: #E65100; }
.badge-info { background: #E3F2FD; color: #0D47A1; }
.badge-primary { background: #E8EAF6; color: #1A237E; }
.badge-secondary { background: #F5F5F5; color: #616161; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f4f8;
    font-family: 'Poppins', sans-serif;
    padding: 20px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    min-height: 650px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.15);
    overflow: hidden;
    margin: 20px;
}

.login-left {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    min-width: 380px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.login-brand h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1B5E20;
    margin: 0;
}

.login-brand h1 span {
    color: #4CAF50;
    font-weight: 300;
}

.brand-sub {
    font-size: 13px;
    color: #78909C;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

.login-welcome {
    margin-bottom: 25px;
}

.login-welcome h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1B5E20;
    line-height: 1.3;
    margin: 0 0 5px 0;
}

.login-welcome p {
    font-size: 14px;
    color: #78909C;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #37474F;
    margin-bottom: 6px;
}

.login-form .form-group label i {
    margin-right: 8px;
    color: #4CAF50;
    width: 16px;
}

.login-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E8ECF0;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: 0.3s;
    background: #F8FAFC;
    box-sizing: border-box;
}

.login-form .form-group input:focus {
    border-color: #4CAF50;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(76,175,80,0.1);
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: 0.3s;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(46,125,50,0.35);
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #E8ECF0;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #B0BEC5;
    margin: 0;
}

.login-right {
    flex: 1.2;
    background: linear-gradient(145deg, #1B5E20, #2E7D32, #388E3C);
    padding: 50px 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 350px;
    position: relative;
    overflow: hidden;
}

.login-right::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.login-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.hero-icon {
    font-size: 72px;
    margin-bottom: 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.login-hero h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    letter-spacing: 0.5px;
}

.login-hero > p {
    font-size: 16px;
    opacity: 0.85;
    margin: 0 0 35px 0;
    font-weight: 300;
}

.hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 35px;
}

.feature-item {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    padding: 14px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.3s;
    border: 1px solid rgba(255,255,255,0.08);
}

.feature-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 18px;
    width: 30px;
    text-align: center;
}

.feature-item span {
    font-size: 13px;
    font-weight: 500;
}

.demo-credentials {
    background: rgba(0,0,0,0.2);
    border-radius: 14px;
    padding: 18px 22px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
}

.demo-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-label {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.demo-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    font-weight: 400;
}

.demo-items span {
    background: rgba(255,255,255,0.1);
    padding: 4px 14px;
    border-radius: 20px;
}

.demo-items strong {
    font-weight: 700;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }
    .login-left {
        padding: 35px 30px;
        min-width: auto;
        order: 2;
    }
    .login-right {
        padding: 35px 30px;
        min-width: auto;
        order: 1;
        border-radius: 24px 24px 0 0;
    }
    .login-right::before,
    .login-right::after {
        display: none;
    }
    .hero-icon { font-size: 48px; }
    .hero-features { grid-template-columns: 1fr 1fr; }
    .login-hero h2 { font-size: 22px; }
    .row-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    .hamburger {
        display: inline-block;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 10px;
        border-radius: 16px;
    }
    .login-left {
        padding: 25px 20px;
    }
    .login-right {
        padding: 25px 20px;
    }
    .login-welcome h2 { font-size: 18px; }
    .login-brand h1 { font-size: 20px; }
    .btn-login { font-size: 14px; padding: 14px; }
    .hero-features { grid-template-columns: 1fr 1fr; gap: 8px; }
    .demo-items { flex-direction: column; gap: 6px; font-size: 13px; }
    .stats-grid { grid-template-columns: 1fr; }
    .brand-icon { width: 40px; height: 40px; font-size: 18px; }
    .page-header h1 { font-size: 20px; }
}