/* FIP Central Performance Management System - Main CSS */
:root {
    --primary: #1a4f8b;
    --secondary: #3498db;
    --accent: #2ecc71;
    --light: #f5f7fa;
    --dark: #2c3e50;
    --danger: #e74c3c;
    --warning: #f39c12;
    --gray: #ecf0f1;
    --text: #333;
    --success: #27ae60;
    --info: #17a2b8;
    --white: #ffffff;
    --border: #dee2e6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

.container {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    padding: 20px 0;
    position: fixed;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

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

.logo h1 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 2px 0;
}

.menu {
    margin-top: 10px;
}

.menu-item {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
    font-size: 14px;
}

.menu-item:hover, .menu-item.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--accent);
    transform: translateX(5px);
}

.menu-item i {
    margin-right: 15px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Main Content Styles */
.main-content {
    grid-column: 2;
    padding: 20px;
    margin-left: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 25px;
    padding: 8px 20px;
    width: 350px;
    border: 1px solid var(--border);
}

.search-bar input {
    border: none;
    background: transparent;
    padding: 8px 10px;
    width: 100%;
    outline: none;
    font-size: 14px;
}

.search-bar i {
    color: var(--text);
    margin-right: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notifications {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background: var(--light);
    transition: all 0.3s ease;
}

.notifications:hover {
    background: var(--primary);
    color: white;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

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

.user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

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

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card .icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(26, 79, 139, 0.3);
}

.stat-info .value {
    font-size: 32px;
    font-weight: 700;
    margin: 8px 0;
    color: var(--primary);
}

.stat-info .label {
    color: #777;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trend {
    display: flex;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 500;
}

.trend.up {
    color: var(--success);
}

.trend.down {
    color: var(--danger);
}

.trend i {
    margin-right: 5px;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.chart-card h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light);
    color: var(--primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container {
    height: 350px;
    position: relative;
}

/* Department Summary */
.department-summary {
    margin-bottom: 30px;
}

.department-summary h3 {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light);
}

.summary-header i {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.summary-header h4 {
    color: var(--primary);
    font-size: 16px;
    margin: 0;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.summary-stats .stat {
    text-align: center;
    padding: 10px;
    background: var(--light);
    border-radius: 8px;
}

.summary-stats .label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.summary-stats .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

/* Activity Feed */
.activity-feed {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.activity-feed h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    background: var(--light);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(26, 79, 139, 0.05);
}

.activity-icon {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.activity-content strong {
    color: var(--primary);
    font-weight: 600;
}

.activity-time {
    font-size: 12px;
    color: #777;
    font-style: italic;
}

/* Data Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    margin: 20px 0;
}

.data-table th, 
.data-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.data-table th {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.data-table tr:nth-child(even) {
    background: rgba(245, 247, 250, 0.5);
}

.data-table tr:hover {
    background: rgba(26, 79, 139, 0.05);
}

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

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Department Header */
.department-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.department-header h1,
.department-header h2 {
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.department-header h1 {
    font-size: 28px;
}

.department-header h2 {
    font-size: 24px;
}

.department-header .icon {
    background: var(--primary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    border-color: var(--primary);
    background: rgba(26, 79, 139, 0.1);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Back Navigation */
.back-nav {
    margin-bottom: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Department Specific Styles */
.department-overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.metrics-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.quick-stats {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: var(--light);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.stat-box .number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    margin-bottom: 5px;
}

.stat-box .label {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .department-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .main-content {
        grid-column: 1;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .department-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}
