:root {
    --primary: #2d5016;
    --secondary: #4a7c59;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --gray: #95a5a6;
    --light-gray: #ecf0f1;
    --earth-brown: #8b6b4c;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(74, 124, 89, 0.05) 0%, transparent 55%),
        radial-gradient(circle at 75% 75%, rgba(45, 80, 22, 0.05) 0%, transparent 55%);
    z-index: -1;
}

.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, #1a3a0d 100%);
    color: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), #6b9c7a);
}

.sidebar-header h2 {
    margin-bottom: 8px;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-header p {
    font-size: 0.85rem;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-menu {
    padding: 20px 0;
}

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

.sidebar-menu li {
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-menu li a {
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-menu li:hover a {
    color: white;
    border-left: 3px solid var(--secondary);
}

.sidebar-menu li.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-menu li.active a {
    color: white;
    border-left: 3px solid var(--secondary);
    font-weight: 600;
}

.sidebar-menu i {
    margin-right: 12px;
    width: 22px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;
    margin-left: 280px;
    width: calc(100% - 280px);
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid rgba(74, 124, 89, 0.1);
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px 25px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.header h1 {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    padding-left: 15px;
}

.header h1::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 3px;
}

.user-info {
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(74, 124, 89, 0.2);
}

.user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    border: 3px solid var(--secondary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-info div div {
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
}

.user-info div small {
    color: var(--gray);
    font-size: 0.8rem;
    display: block;
    margin-top: 2px;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.1) 0%, rgba(45, 80, 22, 0.05) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: var(--primary);
    font-weight: 600;
    font-size: 1.3rem;
}

.card-body {
    padding: 25px;
}

/* Button Styles */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 124, 89, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3a0d 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 124, 89, 0.6);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #219653 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #219653 0%, #1e8749 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.6);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.6);
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-info:hover {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.6);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.btn-outline:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-3px);
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.1) 0%, rgba(45, 80, 22, 0.05) 100%);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr {
    transition: all 0.3s ease;
}

tr:hover {
    background-color: rgba(74, 124, 89, 0.05);
    transform: translateX(5px);
}

.status {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.status-open {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #d35400;
}

.status-progress {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

.status-completed {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: #006442;
}

.priority {
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.priority-low {
    background: linear-gradient(135deg, #dfe6e9 0%, #b2bec3 100%);
    color: #2d3436;
}

.priority-medium {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: #d35400;
}

.priority-high {
    background: linear-gradient(135deg, #fab1a0 0%, #e17055 100%);
    color: #c23616;
}

.priority-urgent {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.2);
    transform: translateY(-2px);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Dashboard Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 5px solid;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    font-size: 2.5em;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.stat-card h3 {
    font-size: 2.2em;
    margin-bottom: 8px;
    color: var(--primary);
    position: relative;
    z-index: 1;
    font-weight: 700;
}

.stat-card p {
    color: var(--gray);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    width: 550px;
    max-width: 90%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.1) 0%, rgba(45, 80, 22, 0.05) 100%);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    color: var(--primary);
    margin: 0;
    font-size: 1.4rem;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.close {
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--danger);
    background: rgba(231, 76, 60, 0.1);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    background: white;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.tab {
    padding: 15px 25px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--gray);
    position: relative;
}

.tab:hover {
    background-color: rgba(74, 124, 89, 0.05);
    color: var(--primary);
}

.tab.active {
    border-bottom: 3px solid var(--secondary);
    color: var(--primary);
    background-color: rgba(74, 124, 89, 0.08);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid;
    animation: slideIn 0.5s ease;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
    border-color: #27ae60;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: #e74c3c;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    color: #f39c12;
    border-color: #f39c12;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-color: #3498db;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
        padding: 20px;
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        overflow: visible;
    }
    
    .sidebar-header h2, .sidebar-header p, .sidebar-menu span {
        display: none;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-menu li {
        text-align: center;
        padding: 0;
    }
    
    .sidebar-menu li a {
        padding: 15px 10px;
        justify-content: center;
    }
    
    .sidebar-menu i {
        margin-right: 0;
        font-size: 1.3rem;
    }
    
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        align-self: stretch;
        justify-content: center;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        top: auto;
        z-index: 1000;
        height: 70px;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .sidebar-header {
        display: none;
    }
    
    .sidebar-menu {
        padding: 0;
    }
    
    .sidebar-menu ul {
        display: flex;
        justify-content: space-around;
        padding: 0;
        margin: 0;
    }
    
    .sidebar-menu li {
        flex: 1;
        margin: 0;
        border-radius: 0;
    }
    
    .sidebar-menu li a {
        flex-direction: column;
        padding: 10px 5px;
        font-size: 0.7rem;
    }
    
    .sidebar-menu i {
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 1.2rem;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        margin-bottom: 80px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        text-align: center;
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .user-info {
        padding: 8px 15px;
    }
    
    .user-info img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
    }
    
    .card-body {
        padding: 20px 15px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Animation for page transitions */
.page-transition {
    animation: pageFadeIn 0.5s ease;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--secondary), var(--primary));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary), #1a3a0d);
}

/* Leaf decorations for cards */
.leaf-decoration-card {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(74, 124, 89, 0.1);
    opacity: 0.3;
    border-radius: 50% 0 50% 0;
    z-index: 0;
}

.leaf-top-left {
    top: -10px;
    left: -10px;
    transform: rotate(45deg);
}

.leaf-bottom-right {
    bottom: -10px;
    right: -10px;
    transform: rotate(225deg);
}

/* Badge styles */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
}

.badge-primary {
    background: linear-gradient(135deg, rgba(74, 124, 89, 0.2) 0%, rgba(45, 80, 22, 0.1) 100%);
    color: var(--primary);
}

.badge-success {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.2) 0%, rgba(33, 150, 83, 0.1) 100%);
    color: #27ae60;
}

.badge-danger {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.1) 100%);
    color: #e74c3c;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: rgba(0, 0, 0, 0.1);
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.empty-state p {
    max-width: 400px;
    margin: 0 auto;
}