:root {
    --primary-green: #2e8b57;
    --light-green: #e8f5e9;
    --medium-green: #66bb6a;
    --dark-green: #1b5e20;
    --accent-green: #81c784;
    --text-dark: #2e3a30;
    --text-light: #f5f9f6;
    --white: #ffffff;
    --gray-light: #f5f5f5;
    --gray: #e0e0e0;
    --gray-dark: #9e9e9e;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --sidebar-width: 250px;
    --sidebar-collapsed: 70px;
}

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

body {
    background-color: var(--light-green);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, var(--green), var(--primary-green));
    color: var(--white);
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.logo {
    display: flex;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo i {
    font-size: 24px;
    margin-right: 10px;
}

.logo span {
    font-size: 18px;
    font-weight: 600;
}

.sidebar.collapsed .logo span {
    display: none;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--accent-green);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    margin-top: 2px;
}

.badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin { background: #e74c3c; }
.badge-case_officer { background: #3498db; }
.badge-team_leader { background: #9b59b6; }
.badge-accountant { background: #e67e22; }
.badge-management { background: #2ecc71; }

.sidebar.collapsed .user-info .user-details {
    display: none;
}

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

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav li.active a {
    background-color: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent-green);
}

.sidebar-nav i {
    font-size: 18px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.sidebar.collapsed .sidebar-nav span {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-dark);
    cursor: pointer;
    margin-right: 20px;
}

.nav-left h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-green);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn {
    background: var(--primary-green);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: var(--dark-green);
}

/* Page Content */
.page-content {
    padding: 30px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 24px;
    color: var(--white);
}

.card-icon.green {
    background-color: var(--primary-green);
}

.card-icon.blue {
    background-color: #3498db;
}

.card-icon.orange {
    background-color: #e67e22;
}

.card-icon.purple {
    background-color: #9b59b6;
}

.card-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.card-info p {
    color: var(--gray-dark);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.grid-item.full {
    grid-column: 1 / -1;
}

.content-card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray);
    background-color: var(--light-green);
}

.card-header h2 {
    font-size: 18px;
    color: var(--dark-green);
}

.card-body {
    padding: 20px;
}

/* Role-specific content */
.role-permissions {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.permission-list {
    list-style: none;
}

.permission-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
}

.permission-list li:before {
    content: '✓';
    color: var(--primary-green);
    font-weight: bold;
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed);
    }
    
    .sidebar .logo span,
    .sidebar .sidebar-nav span,
    .sidebar .user-info .user-details {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed);
    }
    
    .stats-cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .top-nav {
        padding: 15px;
    }
}

/* Case Officer Specific Styles */
.welcome-section {
    margin-bottom: 30px;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 25px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.welcome-content h2 {
    margin-bottom: 10px;
    font-size: 24px;
}

.quick-actions {
    display: flex;
    gap: 15px;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: white;
    color: var(--primary-green);
}

.cases-list {
    max-height: 400px;
    overflow-y: auto;
}

.case-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-light);
}

.case-item:last-child {
    border-bottom: none;
}

.case-info h4 {
    color: var(--primary-green);
    margin-bottom: 5px;
    font-size: 14px;
}

.case-info p {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-dark);
}

.case-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.case-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open { background: #e3f2fd; color: #1976d2; }
.status-in-progress { background: #fff3e0; color: #f57c00; }
.status-under-review { background: #e8f5e8; color: var(--primary-green); }
.status-closed { background: #f5f5f5; color: var(--gray-dark); }

.case-date {
    font-size: 11px;
    color: var(--gray-dark);
}

.case-actions {
    display: flex;
    gap: 5px;
}

.case-action-btn {
    background: none;
    border: none;
    color: var(--primary-green);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s;
}

.case-action-btn:hover {
    background: var(--light-green);
}

.deadlines-list {
    max-height: 300px;
    overflow-y: auto;
}

.deadline-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}

.deadline-item.urgent {
    background: #ffebee;
    margin: 0 -20px;
    padding: 12px 20px;
    border-left: 4px solid #e74c3c;
}

.deadline-date {
    text-align: center;
    margin-right: 15px;
    min-width: 50px;
}

.deadline-date .day {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-green);
}

.deadline-date .month {
    display: block;
    font-size: 12px;
    color: var(--gray-dark);
    text-transform: uppercase;
}

.deadline-info h4 {
    font-size: 14px;
    margin-bottom: 3px;
    color: var(--text-dark);
}

.deadline-info p {
    font-size: 12px;
    color: var(--gray-dark);
    margin-bottom: 5px;
}

.deadline-time {
    font-size: 11px;
    color: var(--primary-green);
    font-weight: 500;
}

.quick-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.tool-item {
    background: var(--light-green);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tool-item:hover {
    background: var(--white);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.tool-item i {
    font-size: 24px;
    color: var(--primary-green);
    margin-bottom: 8px;
    display: block;
}

.tool-item span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dark);
}

.progress-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    font-weight: 500;
    color: var(--text-dark);
}

.progress-value {
    font-weight: 600;
    color: var(--primary-green);
}

.progress-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green), var(--medium-green));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.view-all {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

.stats-charts {
    height: 250px;
}