/* =====================================================
   Friendship NGO - SED Monitoring System
   Main Stylesheet
   ===================================================== */

/* CSS Variables */
:root {
    --primary-dark: #1e3a5f;
    --primary: #2d5a87;
    --primary-light: #4a7fb5;
    --accent: #4ecdc4;
    --accent-dark: #44a08d;
    --success: #27ae60;
    --success-light: #2ecc71;
    --warning: #ef6c00;
    --warning-light: #ffb74d;
    --danger: #e74c3c;
    --danger-light: #ff6b6b;
    --purple: #7b1fa2;
    --purple-light: #ba68c8;
    --teal: #00796b;
    --gray-100: #f8f9fa;
    --gray-200: #f0f2f5;
    --gray-300: #e9ecef;
    --gray-400: #dee2e6;
    --gray-500: #adb5bd;
    --gray-600: #666;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --white: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --topbar-height: 70px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-200);
    color: var(--gray-800);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =====================================================
   Layout
   ===================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.content-wrapper {
    padding: 25px 30px;
}

/* =====================================================
   Sidebar
   ===================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, #152d4a 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
}

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

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    color: var(--white);
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
}

.logo-text span {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    font-weight: 400;
}

/* Sidebar Menu */
.sidebar-menu {
    padding: 15px 0;
}

.menu-section {
    padding: 18px 20px 10px;
    font-size: 11px;
    text-transform: uppercase;
    color: #4ecdc4;
    letter-spacing: 2px;
    font-weight: 700;
    position: relative;
}

.menu-section::before {
    content: '';
    position: absolute;
    left: 20px;
    bottom: 5px;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #4ecdc4 0%, transparent 100%);
    border-radius: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 12px;
    border-left: 3px solid transparent;
    color: #ffffff;
    font-weight: 500;
}

.menu-item:hover {
    background: linear-gradient(90deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    color: var(--white);
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(78, 205, 196, 0.3) 0%, rgba(78, 205, 196, 0.1) 100%);
    border-left-color: var(--accent);
    color: var(--white);
}

.menu-item .menu-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 18px;
    transition: all 0.3s ease;
}

/* Eye-catching colored icon backgrounds */
.menu-item[data-page="dashboard"] .menu-icon,
.menu-item:first-of-type .menu-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.menu-item[data-submenu="beneficiaries"] .menu-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.menu-item[data-submenu="production"] .menu-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.menu-item[data-submenu="trainings"] .menu-icon {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.4);
}

.menu-item[data-page="kpi"] .menu-icon {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.4);
}

.menu-item[data-submenu="reports"] .menu-icon {
    background: linear-gradient(135deg, #5ee7df 0%, #b490ca 100%);
    box-shadow: 0 4px 15px rgba(94, 231, 223, 0.4);
}

.menu-item[data-page="offices"] .menu-icon {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    box-shadow: 0 4px 15px rgba(253, 160, 133, 0.4);
}

.menu-item[data-page="users"] .menu-icon {
    background: linear-gradient(135deg, #96fbc4 0%, #f9f586 100%);
    box-shadow: 0 4px 15px rgba(150, 251, 196, 0.4);
}

.menu-item[data-page="settings"] .menu-icon {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    box-shadow: 0 4px 15px rgba(210, 153, 194, 0.4);
}

.menu-item:hover .menu-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255,255,255,0.3);
}

.menu-item .menu-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.menu-item .menu-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: var(--white);
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(238, 90, 36, 0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.menu-item .menu-badge.success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.4);
}

.menu-item .menu-arrow {
    font-size: 12px;
    transition: transform 0.2s;
}

.menu-item.expanded .menu-arrow {
    transform: rotate(90deg);
}

/* Submenu */
.submenu {
    background: rgba(0,0,0,0.2);
    display: none;
    overflow: hidden;
    border-left: 3px solid rgba(78, 205, 196, 0.3);
    margin-left: 20px;
}

.submenu.show {
    display: block;
}

.submenu-item {
    display: block;
    padding: 12px 20px 12px 35px;
    font-size: 13px;
    cursor: pointer;
    color: #b8d4e8;
    transition: all 0.3s;
    position: relative;
}

.submenu-item::before {
    content: '◆';
    font-size: 6px;
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #4ecdc4;
    opacity: 0;
    transition: all 0.3s;
}

.submenu-item:hover {
    color: var(--white);
    background: linear-gradient(90deg, rgba(78, 205, 196, 0.2) 0%, transparent 100%);
    padding-left: 42px;
}

.submenu-item:hover::before {
    opacity: 1;
}

.submenu-item.active {
    color: #4ecdc4;
    font-weight: 600;
}

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

.breadcrumb {
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb .current-page {
    color: var(--primary-dark);
    font-weight: 600;
}

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

/* Language Toggle */
.lang-toggle {
    display: flex;
    background: var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.lang-toggle button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    transition: all 0.2s;
}

.lang-toggle button.active {
    background: var(--white);
    color: var(--primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Search Box */
.search-box {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    width: 280px;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
}

/* Notification */
.notification-btn {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
    border: none;
}

.notification-btn:hover {
    background: var(--gray-300);
}

.notification-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--white);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.user-info:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
}

.user-details {
    text-align: right;
}

.user-details .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-dark);
}

.user-details .user-role {
    font-size: 12px;
    color: var(--gray-600);
}

/* =====================================================
   Page Header
   ===================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header-left .page-title {
    font-size: 26px;
    color: var(--primary-dark);
    font-weight: 700;
}

.page-header-left .page-subtitle {
    color: var(--gray-600);
    margin-top: 5px;
    font-size: 14px;
}

.page-header-actions {
    display: flex;
    gap: 10px;
}

/* =====================================================
   Cards
   ===================================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    color: var(--primary-dark);
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.card-body.no-padding {
    padding: 0;
}

/* =====================================================
   Stats Cards
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stats-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue { background: #e3f2fd; color: #1565c0; }
.stat-icon.green { background: #e8f5e9; color: #2e7d32; }
.stat-icon.orange { background: #fff3e0; color: #ef6c00; }
.stat-icon.purple { background: #f3e5f5; color: #7b1fa2; }
.stat-icon.teal { background: #e0f2f1; color: #00796b; }
.stat-icon.red { background: #ffebee; color: #c62828; }

.stat-card .stat-label {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-card .stat-change.up { color: var(--success); }
.stat-card .stat-change.down { color: var(--danger); }

.stat-card .stat-target {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 5px;
}

/* Highlighted Stat Card */
.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    border: none;
}

.stat-card.highlight .stat-label { color: rgba(255,255,255,0.8); }
.stat-card.highlight .stat-value { color: var(--white); }
.stat-card.highlight .stat-icon { background: rgba(255,255,255,0.2); color: var(--white); }
.stat-card.highlight .stat-target { color: rgba(255,255,255,0.7); }

/* =====================================================
   Progress Bars
   ===================================================== */
.progress-bar {
    height: 6px;
    background: var(--gray-300);
    border-radius: 3px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.progress-fill.blue { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.progress-fill.green { background: linear-gradient(90deg, #2e7d32, #66bb6a); }
.progress-fill.orange { background: linear-gradient(90deg, #ef6c00, #ffb74d); }
.progress-fill.purple { background: linear-gradient(90deg, #7b1fa2, #ba68c8); }

/* =====================================================
   Charts
   ===================================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 25px;
}

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

.chart-container.tall {
    height: 350px;
}

/* =====================================================
   Tables
   ===================================================== */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--gray-100);
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-300);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
    color: var(--gray-800);
}

tr:hover {
    background: var(--gray-100);
}

/* =====================================================
   Status Badges
   ===================================================== */
.status {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status.active { background: #e8f5e9; color: #2e7d32; }
.status.pending { background: #fff3e0; color: #ef6c00; }
.status.inactive { background: #ffebee; color: #c62828; }
.status.approved { background: #e3f2fd; color: #1565c0; }

/* =====================================================
   Buttons
   ===================================================== */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,58,95,0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), var(--success-light));
    color: var(--white);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39,174,96,0.3);
}

.btn-danger {
    background: #ffebee;
    color: #c62828;
}

.btn-danger:hover {
    background: #ffcdd2;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-400);
    color: var(--gray-600);
}

.btn-outline:hover {
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-400);
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.action-btn:hover { background: var(--gray-100); }
.action-btn.view:hover { background: #e3f2fd; border-color: #1565c0; color: #1565c0; }
.action-btn.edit:hover { background: #fff3e0; border-color: #ef6c00; color: #ef6c00; }
.action-btn.delete:hover { background: #ffebee; border-color: #c62828; color: #c62828; }

/* =====================================================
   Forms
   ===================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(78,205,196,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    padding: 10px 15px;
    border: 1px solid var(--gray-400);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
}

/* =====================================================
   Tabs
   ===================================================== */
.tabs {
    display: flex;
    gap: 5px;
    border-bottom: 2px solid var(--gray-300);
    margin-bottom: 20px;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-weight: 500;
}

.tab:hover { color: var(--primary-dark); }

.tab.active {
    color: var(--primary-dark);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

/* =====================================================
   User Cell (Table)
   ===================================================== */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell .avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.user-cell .user-info-text .name {
    font-weight: 500;
}

.user-cell .user-info-text .email {
    font-size: 12px;
    color: var(--gray-600);
}

/* =====================================================
   Activity List
   ===================================================== */
.activity-list {}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

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

.activity-icon.blue { background: #e3f2fd; color: #1565c0; }
.activity-icon.green { background: #e8f5e9; color: #2e7d32; }
.activity-icon.orange { background: #fff3e0; color: #ef6c00; }

.activity-content { flex: 1; }

.activity-content .activity-title {
    font-size: 14px;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.activity-content .activity-title strong { color: var(--primary-dark); }

.activity-content .activity-time {
    font-size: 12px;
    color: var(--gray-500);
}

/* =====================================================
   Approval Cards
   ===================================================== */
.approval-card {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--warning);
}

.approval-card .approval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.approval-card .member-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.approval-card .member-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.approval-card .member-name {
    font-weight: 600;
    color: var(--primary-dark);
}

.approval-card .member-id {
    font-size: 12px;
    color: var(--gray-600);
}

.approval-card .approval-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.approval-card .detail-item {}

.approval-card .detail-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

.approval-card .detail-value {
    font-size: 14px;
    color: var(--gray-800);
    font-weight: 500;
}

.approval-card .approval-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* =====================================================
   KPI Cards
   ===================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.kpi-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
}

.kpi-card .kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.kpi-card .kpi-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-dark);
}

.kpi-card .kpi-target {
    font-size: 12px;
    color: var(--gray-600);
}

.kpi-card .kpi-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.kpi-card .kpi-label {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 15px;
}

.kpi-progress {
    height: 10px;
    background: var(--gray-300);
    border-radius: 5px;
    overflow: hidden;
}

.kpi-progress .kpi-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.8s ease;
}

.kpi-card .kpi-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--gray-600);
}

/* =====================================================
   Report Cards
   ===================================================== */
.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.report-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.report-card .report-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.report-card .report-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.report-card .report-desc {
    font-size: 13px;
    color: var(--gray-600);
}

/* =====================================================
   Office Cards
   ===================================================== */
.office-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.office-card .rank {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-600);
}

.office-card .rank.gold { background: #fff8e1; color: #f9a825; }
.office-card .rank.silver { background: #eceff1; color: #607d8b; }
.office-card .rank.bronze { background: #efebe9; color: #8d6e63; }

.office-card .office-info { flex: 1; }

.office-card .office-name {
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.office-card .office-meta {
    font-size: 12px;
    color: var(--gray-600);
}

.office-card .office-stats {
    display: flex;
    gap: 30px;
}

.office-card .stat-item { text-align: center; }

.office-card .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.office-card .stat-label {
    font-size: 11px;
    color: var(--gray-500);
}

/* =====================================================
   Upload Area
   ===================================================== */
.upload-area {
    border: 2px dashed var(--gray-400);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(78,205,196,0.05);
}

.upload-area .upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area .upload-text {
    color: var(--gray-600);
}

.upload-area .upload-hint {
    color: var(--gray-500);
    font-size: 12px;
    margin-top: 5px;
}

/* =====================================================
   Pagination
   ===================================================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.pagination-info {
    color: var(--gray-600);
    font-size: 14px;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1400px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
    .report-grid { grid-template-columns: repeat(2, 1fr); }
    .kpi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .approval-card .approval-details { grid-template-columns: repeat(2, 1fr); }
    .hamburger-btn { display: flex !important; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 15px; align-items: flex-start; }
    .topbar { flex-wrap: wrap; gap: 10px; }
    .search-box { width: 100%; order: 3; }
    .report-grid { grid-template-columns: 1fr; }
    .table-responsive { margin: 0 -20px; padding: 0 20px; }
    .member-detail-grid { grid-template-columns: 1fr !important; }
}

/* =====================================================
   Hamburger Menu Button
   ===================================================== */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover span {
    background-color: var(--primary);
}

/* Hamburger animation when sidebar is open */
body.sidebar-open .hamburger-btn span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

body.sidebar-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
}

body.sidebar-open .hamburger-btn span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Topbar left section */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    pointer-events: all;
    min-width: 300px;
    max-width: 450px;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.toast-close {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #333;
}

/* Toast variants */
.toast-success { border-left: 4px solid #27ae60; }
.toast-success .toast-icon { background: #27ae60; color: white; }

.toast-error { border-left: 4px solid #e74c3c; }
.toast-error .toast-icon { background: #e74c3c; color: white; }

.toast-warning { border-left: 4px solid #f39c12; }
.toast-warning .toast-icon { background: #f39c12; color: white; }

.toast-info { border-left: 4px solid #3498db; }
.toast-info .toast-icon { background: #3498db; color: white; }

/* =====================================================
   Modal System
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

/* Modal sizes */
.modal-small { width: 400px; }
.modal-medium { width: 600px; }
.modal-large { width: 900px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

body.modal-open {
    overflow: hidden;
}

/* Member detail grid for modal */
.member-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.detail-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.detail-section h4 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.detail-row span:first-child {
    color: #666;
}

/* =====================================================
   Bulk Action Bar
   ===================================================== */
.bulk-action-bar {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.bulk-action-bar .selected-count {
    font-size: 14px;
    font-weight: 500;
}

.bulk-action-bar .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* =====================================================
   Loading Skeleton
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-card {
    height: 120px;
    border-radius: 8px;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =====================================================
   Settings Tabs
   ===================================================== */
.settings-tab {
    display: none;
}

.settings-tab:first-of-type {
    display: block;
}

/* =====================================================
   Additional Button Styles
   ===================================================== */
.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #d68910;
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
    .sidebar, .topbar { display: none; }
    .main-content { margin-left: 0; }
    .card { box-shadow: none; border: 1px solid #ddd; }
    .toast-container, .modal-overlay, .bulk-action-bar { display: none !important; }
}

/* =====================================================
   KPI Log Frame Styles
   ===================================================== */

/* Project Info Banner */
.project-info-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.project-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-info-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.project-info-value.countdown {
    color: #ef4444;
    font-weight: 700;
}

/* Executive Summary */
.executive-summary {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    margin-bottom: 25px;
}

.summary-main {
    display: flex;
    justify-content: center;
}

.overall-score-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    text-align: center;
    width: 100%;
}

.score-ring {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
}

.score-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.score-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
}

.score-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.score-detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.detail-label {
    color: #64748b;
}

.detail-value {
    font-weight: 600;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.summary-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-stat-icon {
    font-size: 28px;
}

.summary-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
}

.summary-stat-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.summary-stat-desc {
    font-size: 12px;
    color: #64748b;
}

.summary-stat.on-track { border-left: 4px solid #10b981; }
.summary-stat.at-risk { border-left: 4px solid #f59e0b; }
.summary-stat.behind { border-left: 4px solid #ef4444; }
.summary-stat.exceeded { border-left: 4px solid #f59e0b; }

/* Log Frame Container */
.logframe-container {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.logframe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    color: white;
}

.logframe-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.logframe-controls {
    display: flex;
    gap: 10px;
}

.logframe-controls .btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: white;
}

.logframe-controls .btn:hover,
.logframe-controls .btn.active {
    background: rgba(255,255,255,0.2);
}

/* Log Frame Levels */
.logframe-level {
    border-bottom: 1px solid #e2e8f0;
}

.logframe-level:last-child {
    border-bottom: none;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    transition: background 0.2s;
}

.level-header:hover {
    background: #f8fafc;
}

.impact-level .level-header { border-left: 5px solid #10b981; }
.outcome-level .level-header { border-left: 5px solid #3b82f6; }
.output-level .level-header { border-left: 5px solid #8b5cf6; }
.activity-level .level-header { border-left: 5px solid #f59e0b; }

.level-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.level-icon {
    font-size: 20px;
}

.level-name {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    letter-spacing: 0.5px;
}

.level-badge {
    padding: 4px 10px;
    background: #e2e8f0;
    border-radius: 12px;
    font-size: 12px;
    color: #64748b;
}

.level-summary {
    display: flex;
    align-items: center;
    gap: 15px;
}

.level-achievement {
    font-size: 14px;
    font-weight: 600;
    color: #10b981;
}

.level-toggle {
    font-size: 12px;
    color: #94a3b8;
    transition: transform 0.2s;
}

.level-content {
    display: none;
    padding: 0 25px 20px;
    background: #fafbfc;
}

.level-content.expanded {
    display: block;
}

/* Indicator Rows */
.indicator-row {
    display: grid;
    grid-template-columns: 1fr 280px 200px 80px;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

.indicator-row:hover {
    box-shadow: var(--shadow-md);
}

.indicator-row:last-child {
    margin-bottom: 0;
}

.indicator-main {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.indicator-status {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    flex-shrink: 0;
}

.indicator-status.on-track { background: #d1fae5; }
.indicator-status.at-risk { background: #fef3c7; }
.indicator-status.behind { background: #fee2e2; }
.indicator-status.exceeded { background: #fef3c7; }

.indicator-code {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.indicator-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.indicator-source {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.indicator-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.metric {
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.metric.highlight {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.metric-label {
    display: block;
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.metric-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.indicator-progress {
    width: 100%;
}

.progress-bar-container {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-bar-target {
    position: absolute;
    top: -3px;
    width: 2px;
    height: 16px;
    background: #1e293b;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #64748b;
    margin-top: 6px;
}

/* Output Grid */
.output-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.output-card {
    background: white;
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.output-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.output-card.on-track { border-top: 3px solid #10b981; }
.output-card.at-risk { border-top: 3px solid #f59e0b; }
.output-card.behind { border-top: 3px solid #ef4444; }

.output-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.output-status {
    font-size: 14px;
}

.output-code {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}

.output-name {
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
    min-height: 54px;
}

.output-metrics {
    margin: 15px 0 10px;
}

.output-current {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.output-target {
    font-size: 12px;
    color: #64748b;
}

.output-progress {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-mini {
    height: 100%;
    border-radius: 3px;
}

.output-achievement {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    text-align: right;
}

/* Activity Table */
.activity-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.activity-table table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table th,
.activity-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.activity-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
}

/* Bullet Chart */
.bullet-chart-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bullet-item {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 15px;
}

.bullet-label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.bullet-bar {
    position: relative;
    height: 24px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.bullet-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 100%);
}

.bullet-target {
    position: absolute;
    top: 0;
    width: 3px;
    height: 100%;
    background: #1e293b;
    z-index: 2;
}

.bullet-actual {
    position: relative;
    height: 100%;
    border-radius: 4px;
    z-index: 1;
}

.bullet-value {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    text-align: right;
}

/* Disaggregation */
.disaggregation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.disagg-card {
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.disagg-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.disagg-icon {
    font-size: 24px;
}

.disagg-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.disagg-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.disagg-stat {
    display: flex;
    flex-direction: column;
}

.disagg-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.disagg-label {
    font-size: 12px;
    color: #64748b;
}

.disagg-progress {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.disagg-bar {
    height: 100%;
    border-radius: 4px;
}

/* Office KPI Table */
.office-kpi-table {
    width: 100%;
    border-collapse: collapse;
}

.office-kpi-table th,
.office-kpi-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
}

.office-kpi-table th {
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
}

.office-kpi-table td:first-child,
.office-kpi-table td:nth-child(2) {
    text-align: left;
}

.top-performer {
    background: #f0fdf4;
}

.needs-support {
    background: #fef2f2;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
}

.rank-badge.gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; }
.rank-badge.silver { background: linear-gradient(135deg, #94a3b8, #64748b); color: white; }
.rank-badge.bronze { background: linear-gradient(135deg, #d97706, #b45309); color: white; }

.badge-inline {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    background: #fef3c7;
    color: #d97706;
}

.badge-inline.improvement {
    background: #d1fae5;
    color: #059669;
}

.badge-inline.warning {
    background: #fee2e2;
    color: #dc2626;
}

.kpi-cell {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.kpi-cell.on-track { background: #d1fae5; color: #059669; }
.kpi-cell.at-risk { background: #fef3c7; color: #d97706; }
.kpi-cell.behind { background: #fee2e2; color: #dc2626; }
.kpi-cell.exceeded { background: #dbeafe; color: #2563eb; }

.overall-score {
    font-size: 16px;
}

.overall-score.high { color: #059669; }
.overall-score.medium { color: #d97706; }
.overall-score.low { color: #dc2626; }

/* Alert List */
.alert-count {
    font-size: 13px;
    color: #64748b;
    padding: 4px 12px;
    background: #fef3c7;
    border-radius: 12px;
    color: #d97706;
}

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

.alert-item {
    display: flex;
    gap: 15px;
    padding: 18px;
    border-radius: 10px;
    background: #f8fafc;
}

.alert-item.critical {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.alert-item.warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.alert-item.success {
    background: #f0fdf4;
    border-left: 4px solid #10b981;
}

.alert-icon {
    font-size: 20px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.alert-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.alert-action {
    margin-top: 12px;
}

/* Data Quality */
.data-quality-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.quality-item {
    display: flex;
    gap: 15px;
    padding: 18px;
    background: #f8fafc;
    border-radius: 10px;
}

.quality-icon {
    font-size: 28px;
}

.quality-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.quality-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.confidence {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
}

.confidence.high {
    background: #d1fae5;
    color: #059669;
}

.confidence.medium {
    background: #fef3c7;
    color: #d97706;
}

/* Export Options */
.export-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.export-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.export-btn:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.export-icon {
    font-size: 32px;
}

.export-label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.export-desc {
    font-size: 12px;
    color: #64748b;
}

/* Responsive for KPI Page */
@media (max-width: 1400px) {
    .indicator-row {
        grid-template-columns: 1fr 240px 180px 70px;
    }
    .output-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .executive-summary {
        grid-template-columns: 1fr;
    }
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
    }
    .indicator-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .output-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .data-quality-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .export-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-info-banner {
        flex-direction: column;
        gap: 15px;
    }
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .output-grid {
        grid-template-columns: 1fr;
    }
    .disaggregation-grid {
        grid-template-columns: 1fr;
    }
    .bullet-item {
        grid-template-columns: 100px 1fr 50px;
    }
    .data-quality-grid {
        grid-template-columns: 1fr;
    }
    .export-options {
        grid-template-columns: 1fr;
    }
    .logframe-controls {
        flex-wrap: wrap;
    }
}
