/**
 * Your Grad Path - College Application Tracking System
 * Copyright (c) 2025 Enginuity Solutions. All rights reserved.
 * 
 * This software is proprietary and confidential.
 * Unauthorized copying, distribution, or use is strictly prohibited.
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Brand Colors */
:root {
    --primary-blue: #002F6C;
    --light-blue: #eaeeff;
    --accent-gold: #EFB700;
    --medium-blue: #002F6C;
    --neutral-gray: #F4F4F4;
    --white: #FFFFFF;
    --text-primary: #002F6C;
    --text-secondary: #4A6278;
}

/* Priority list unified layout */
.priority-list { list-style:none; padding-left:0; }
.priority-item { list-style:none; display:flex; align-items:flex-start; gap:12px; margin:6px 0; }
.priority-item .prio-icon { width:16px; flex:0 0 16px; display:flex; justify-content:center; align-items:center; font-weight:600; color:var(--text-primary); line-height:1; font-size:13px; margin-top:0; height:20px; }
/* Nudge individual glyphs for optical baseline alignment */
.priority-item .prio-check { color:#2e7d32; font-size:14px; line-height:1; transform:translateY(2px); }
.priority-item .prio-bullet { font-size:16px; line-height:1; position:relative; top:1px; transform:translateY(3px); }
.priority-item .prio-main { flex:1; line-height:1.35; }
.priority-item .prio-main .badge { margin-right:8px; vertical-align:baseline; }
.priority-item .prio-main .priority-note { display:inline-block; background:var(--neutral-gray); border:1px solid #dce3ea; border-radius:6px; padding:4px 8px; font-size:12px; line-height:1.35; margin:6px 0 0 0; color:var(--text-primary); }

/* TrackIt Desktop App Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

/* Screen Reader Only Content */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001a3d 100%);
    height: 100vh;
    overflow: hidden;
    color: var(--text-primary);
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    background: var(--white);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-bottom: 3px solid var(--accent-gold);
}

.app-header h1 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* New YGP logo in header */
.app-header .header-logo {
    width: 50px;
    height: 50px;
    vertical-align: middle;
}

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

/* (header search removed) */

/* User chip (logged-in username) */
.user-chip {
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.app-tagline {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.header-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #001a3d 100%);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.header-btn:hover {
    background: #EAEEFF;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-footer {
    text-align: center;
    color: #fff;
    font-size: 12px;
    padding: 10px 0 16px;
}
.header-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Compact icon-only header buttons (match admin icon look) */
.icon-btn { 
    display:inline-flex; 
    align-items:center; 
    justify-content:center; 
    width:42px; 
    height:42px; 
    border-radius:50%; 
    background: var(--white); 
    border: 1px solid var(--primary-blue); 
    color: var(--primary-blue); 
    cursor:pointer; 
    transition: all 0.3s ease; 
    line-height:0; 
}
.icon-btn img { width:22px; height:22px; display:block; margin: auto; }
/* Ensure admin icon is perfectly centered */
#admin-link img { margin: 0 auto; vertical-align: middle; }
.icon-btn:hover { 
    background: #EAEEFF; 
    color: var(--primary-blue);
    transform:translateY(-1px); 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.icon-btn:focus { outline:2px solid var(--primary-blue); outline-offset:2px; }
/* Global Completed Toggles in header */
#completed-toggles.global-toggles {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px;
    padding: 4px 8px;
    background: #f5f7fb;
    border: 1px solid #e2e6f0;
    border-radius: 8px;
    font-size: 12px;
    color: #333;
}
#completed-toggles .toggle-group { display: inline-flex; align-items: center; gap: 6px; }
#completed-toggles .label { font-weight: 600; color: #445; margin-right: 4px; }
#completed-toggles input[type="radio"] { margin: 0 2px 0 0; }
@media (max-width: 950px) {
    header .file-status #completed-toggles.global-toggles { display: none; }
}

/* Profile selector override (legibility on light background) */
#profile-select {
    background:#ffffff !important;
    color:#2a4258 !important;
    border:1px solid var(--primary-blue);
    border-radius:6px;
    font-weight:500;
    outline:none;
}
#profile-select:focus {
    box-shadow:0 0 0 2px rgba(106,151,198,0.35);
}
#profile-select option { color:#2a4258; }

.nav-bar {
    background: var(--neutral-gray);
    padding: 20px 30px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #E0E0E0;
}

.nav-top-level {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
}

.nav-single-row {
    display: flex;
    gap: 10px;
    align-items: center;
    overflow-x: auto;
    flex: 1;
}

.nav-tab-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.nav-tab-btn {
    background: var(--white);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    margin: 2px 0;
}

.nav-tab-btn:hover {
    background: #EAEEFF;
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-tab-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 47, 108, 0.3);
}

/* Sub-navigation level */
.nav-sub-level {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
    background: rgba(245, 248, 252, 0.8);
    border-radius: 8px;
    margin-top: 5px;
    overflow-x: auto;
    flex: 1;
}

.nav-sub-header {
    font-weight: 700;
    color: #2c5282;
    padding: 0 15px;
    white-space: nowrap;
    font-size: 15px;
}

.nav-sub-btn {
    background: rgba(106, 151, 198, 0.15) !important;
    border: 1px solid var(--primary-blue) !important;
    color: #2c5282 !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
}

.nav-sub-btn:hover {
    background: rgba(106, 151, 198, 0.25) !important;
    border-color: var(--primary-blue) !important;
    color: #1a365d !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(106, 151, 198, 0.2) !important;
}

.nav-sub-btn.active {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%) !important;
    color: white !important;
    border-color: var(--primary-blue) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 6px rgba(106, 151, 198, 0.3) !important;
}

/* Standalone nav buttons (like Dashboard) */
.nav-top-level > .nav-btn,
.nav-single-row > .nav-btn {
    background: var(--white);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    transition: all 0.3s ease;
    margin: 2px 0;
}

.nav-top-level > .nav-btn:hover,
.nav-single-row > .nav-btn:hover {
    background: #EAEEFF;
    color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-top-level > .nav-btn.active,
.nav-single-row > .nav-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(0, 47, 108, 0.3);
}

/* Responsive Design for Navigation */
@media (max-width: 768px) {
    .nav-bar {
        padding: 5px 10px;
    }
    
    .nav-top-level {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .nav-tab-btn {
        min-width: 100px;
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .nav-dropdown {
        position: relative;
        top: 0;
        left: 0;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin-top: 5px;
        box-shadow: none;
        background: #f8fafc;
    }
    
    .nav-tab-group:hover .nav-dropdown,
    .nav-tab-group.active .nav-dropdown {
        display: flex;
    }
    
    .nav-top-level > .nav-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .nav-top-level {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-tab-group {
        width: 100%;
    }
    
    .nav-tab-btn {
        width: 100%;
        border-radius: 8px;
        text-align: center;
    }
    
    .nav-dropdown {
        width: 100%;
        min-width: unset;
    }
}

/* Quick Links bar (now inside nav) */
.quick-links-bar,
.quick-links { 
    margin-left: auto; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    padding: 10px 0;
    border-top: 1px solid #e2e8f0;
    background: rgba(245, 248, 252, 0.8);
    border-radius: 8px;
    margin-top: 5px;
    padding-left: 15px;
    padding-right: 15px;
}

/* Quick Links Dropdown */
.quick-links-dropdown {
    position: relative;
    margin-left: auto;
}

.quick-links-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #d0d6e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-links-bar .quick-link-btn,
.quick-links .quick-link-btn,
.quick-links-menu .quick-link-btn { 
    background: #eef1f6; 
    border: 1px solid #d0d6e0; 
    color: #0f172a; 
    padding: 6px 10px; 
    font-size: 12px; 
    border-radius: 16px; 
    cursor: pointer; 
    line-height: 1.2; 
    font-weight: 600; 
    white-space: nowrap; 
    display: inline-flex; 
    align-items: center; 
    gap: 4px; 
}
.quick-links-bar .quick-link-btn:hover,
.quick-links .quick-link-btn:hover,
.quick-links-menu .quick-link-btn:hover { background: #EAEEFF; }
.quick-links-bar .quick-link-btn:focus,
.quick-links .quick-link-btn:focus,
.quick-links-menu .quick-link-btn:focus { outline: 2px solid var(--primary-blue); outline-offset: 2px; }

/* Combined row for sub-navigation and quick links */
.nav-combined-row {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

@media (max-width: 700px) { 
    .quick-links-bar,
    .quick-links { 
        order: 99; 
        width: 100%; 
        justify-content: flex-start; 
        flex-wrap: wrap; 
        margin-left: 0; 
        padding-top: 4px; 
    } 
    .nav-combined-row {
        flex-direction: column;
        gap: 5px;
    }
}

.main-content {
    flex: 1;
    overflow: hidden;
    background: var(--white);
    margin: 15px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 47, 108, 0.08);
}

.page {
    display: none;
    padding: 40px;
    height: 100%;
    overflow-y: auto;
}

.page.active {
    display: block;
}

.page h2 {
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.8rem;
}

.loading {
    text-align: center;
    padding: 50px;
    color: #666;
    font-size: 1.1rem;
}

/* Dashboard Styles */
.enhanced-dashboard {
    padding: 0;
    max-width: 1400px; /* Slightly increased for better layout */
    margin: 0 auto;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 30px;
}

.dashboard-welcome {
    font-size: 1.8rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin: 0;
}

/* Dashboard Layout - Three Column Top Row + Two Column Bottom Row */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: start;
    min-height: 400px;
}

/* Top Row: Progress Circle, Focus Today, KPI Cards */
.top-row {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 25px;
    width: 100%;
    align-items: start;
}

/* Bottom Row: Latest Updates and Upcoming Events */
.bottom-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    width: 100%;
}

/* Main Content Column */
.main-content-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* KPI Column - Fixed Width */
.kpi-column {
    width: 320px;
}

/* Full Width Upcoming Events Row */
.upcoming-events-full-row {
    grid-column: 1 / -1; /* Span both columns */
    margin-top: 0; /* Remove extra margin since we have grid gap */
}

/* Left Column - Progress Circle */
.progress-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: fit-content;
    width: 280px; /* Fixed width for consistency */
}

.progress-circle {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 15px;
}

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

.progress-circle .progress-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 8;
}

.progress-circle .progress-fill {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease-in-out;
}

.progress-percentage-svg {
    font-size: 14px;
    font-weight: 700;
    fill: var(--primary-blue);
    font-family: inherit;
}

.progress-label-svg {
    font-size: 3.5px;
    font-weight: 500;
    fill: #666;
    font-family: inherit;
}

/* Center Column - Focus Today */
.focus-section {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.focus-header {
    font-size: 1.3rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.focus-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
    transition: transform 0.2s ease;
}

.focus-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.focus-item.overdue {
    border-left-color: #f44336;
    background: #fef5f5;
}

.focus-item.due-soon {
    border-left-color: #ff9800;
    background: #fef9f2;
}

.focus-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.focus-icon.completed { background: #4CAF50; }
.focus-icon.overdue { background: #f44336; }
.focus-icon.due-soon { background: #ff9800; }
.focus-icon.pending { background: #2196F3; }

.focus-content {
    flex: 1;
}

.focus-event-name {
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 3px;
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
}

.focus-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    font-size: 0.9rem;
}

.focus-subtitle {
    font-size: 0.8rem;
    color: #666;
}

/* KPI Column - Status Grid */
.kpi-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 100%;
    width: 100%;
    justify-items: stretch;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .top-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 20px;
    }
    
    .bottom-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .kpi-column {
        width: 100%;
        order: 1; /* Show KPIs first on mobile */
    }
    
    .progress-section {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        order: 2;
    }
    
    .focus-section {
        order: 3;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .top-row {
        grid-template-columns: 260px 1fr 300px;
    }
    
    .progress-section {
        width: 260px;
    }
    
    .kpi-column {
        width: 300px;
    }
}

.status-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #003d7a 100%);
    border-radius: 14px;
    padding: 32px 28px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 47, 108, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 120px;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-gold));
}

.status-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 47, 108, 0.25);
    background: linear-gradient(135deg, #003d7a 0%, var(--primary-blue) 100%);
}

.status-number {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.status-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 4px;
}

.status-card.requested .status-number { color: #a5b4fc; }
.status-card.pending .status-number { color: #fde047; }
.status-card.submitted .status-number { color: #c4b5fd; }
.status-card.completed .status-number { color: #6ee7b7; }
.status-card.in-progress .status-number { color: #e5e7eb; }
.status-card.total .status-number { color: #ffffff; }
.status-card.accepted .status-number { color: #22c55e; }
.status-card.awarded .status-number { color: #fbbf24; }
.status-card.rejected .status-number { color: #ef4444; }
.status-card.not-started .status-number { color: #94a3b8; }
.status-card.cancelled .status-number { color: #64748b; }

/* Updates Section */
.updates-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.updates-header {
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    transition: background 0.2s ease;
}

.update-item:hover {
    background: #e9ecef;
}

.update-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.update-content {
    flex: 1;
}

.update-title {
    font-weight: 500;
    color: var(--primary-blue);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.update-time {
    font-size: 0.7rem;
    color: #999;
}

.motivational-message {
    text-align: center;
    padding: 20px 15px;
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

.motivational-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Upcoming Events Section */
.upcoming-events-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 200px;
}

.upcoming-events-list {
    min-height: 150px;
    max-height: none;
    overflow-y: visible;
}

.upcoming-events-list .deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.upcoming-events-list .deadline-item:hover {
    background: #e9ecef;
}

.upcoming-events-list .deadline-name {
    font-weight: 600;
    color: var(--primary-blue);
    flex: 1;
}

.upcoming-events-list .deadline-item > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upcoming-events-list .deadline-item:hover {
    background: #e9ecef;
    cursor: pointer;
}

.upcoming-events-list .deadline-date {
    font-weight: 600;
    color: var(--primary-blue);
    min-width: 60px;
    font-size: 0.75rem;
}

.upcoming-events-list .deadline-title {
    flex: 1;
    color: #333;
}

.upcoming-events-list .deadline-urgency {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.upcoming-events-list .deadline-urgency.red {
    background: #fee2e2;
    color: #dc2626;
}

.upcoming-events-list .deadline-urgency.yellow {
    background: #fef3c7;
    color: #d97706;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .progress-section,
    .focus-section,
    .status-section {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .status-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 500px;
        margin: 0 auto;
    }
    
    .bottom-sections {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .full-width-bottom-sections {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        gap: 15px;
        padding: 0 10px;
    }
    
    .status-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .progress-circle {
        width: 160px;
        height: 160px;
    }
    
    .progress-percentage-svg {
        font-size: 11px;
    }
    
    .progress-label-svg {
        font-size: 3px;
    }
    
    .dashboard-welcome {
        font-size: 1.5rem;
    }
    
    .bottom-sections {
        grid-template-columns: 1fr;
    }
    
    .full-width-bottom-sections {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .status-card {
        padding: 12px;
        min-height: 70px;
    }
    
    .status-number {
        font-size: 1.5rem;
    }
    
    .status-label {
        font-size: 0.7rem;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,0.15); }

/* Analytics */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

/* Profile Page Styles */
.profile-view-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header-section {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-initials-large {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
}

.profile-header-info h2 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.8rem;
}

.profile-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-section h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 1.3rem;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

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

.profile-info-item label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.profile-info-item span {
    color: #333;
    font-size: 1rem;
}

.resume-date-range {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 12px;
}

.resume-date-range label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #555;
}

.event-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.summary-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.summary-count {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.summary-label {
    font-size: 0.95rem;
    opacity: 0.95;
}
.charts-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1200px) {
    .charts-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .charts-row { grid-template-columns: 1fr; }
}
.chart-card {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.chart-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #233;
}

/* Dashboard: status-specific colors for three cards */
.stat-card.status-not-started {
    background: #6c757d; /* gray */
}
.stat-card.status-in-progress {
    background: #28a745; /* green */
}
.stat-card.status-completed {
    background: #007bff; /* blue */
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Form Styles */
.application-form {
    max-width: 800px;
    margin: 0 auto;
}
/* Completed indicators for priority & deadline buckets */
/* Completed emphasis */
.priority-item.is-completed { opacity:0.82; }
.priority-item.is-completed .prio-main .badge { outline:1px solid #2e7d32; }
/* Icon-only admin link */
.admin-icon-link { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:50%; text-decoration:none; background:rgba(255,255,255,0.9); border:1px solid #d8e2ec; transition:background .25s, box-shadow .25s, transform .25s; line-height:0; }

/* Tighter vertical align for header icon row vs profile controls */
.app-header .icon-btn, .app-header .admin-icon-link { margin-top:-4px; }
.admin-icon-link img { width:20px; height:20px; display:block; }
.admin-icon-link:hover { background:#f3f7fb; box-shadow:0 4px 10px -2px rgba(0,0,0,.12); transform:translateY(-1px); }
.admin-icon-link:focus { outline:2px solid var(--primary-blue); outline-offset:2px; }
/* Checklist checkmark column */
table.list th.chk { width:34px; text-align:center; }
table.list td.chk { width:34px; text-align:center; }
.chk-mark { display:inline-block; font-weight:600; color:#2e7d32; font-size:16px; line-height:1; }
.chk-mark.placeholder { visibility:hidden; }
tr.completed td.chk .chk-mark { visibility:visible; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* Three-column variant for event form */
.form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Four-column variant for event form */
.form-row.four {
    grid-template-columns: 120px 1fr 180px 150px;
    gap: 10px;
}

/* Five-column variant for compact layout */
.form-row.five {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    font-family: inherit;
    background-color: #fafbfc;
    color: #333;
}

/* Ensure status select starts with good contrast before JS styling */
#status {
    background-color: #fafbfc !important;
    color: #333 !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(106, 151, 198, 0.2);
    background-color: #ffffff;
}

.requirement-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 2fr 2fr 150px 120px 80px;
    gap: 10px;
    align-items: center;
}

.requirement-item select,
.requirement-item input[type="text"],
.requirement-item input[type="date"],
.requirement-item button {
    padding: 12px;
    min-height: 44px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

/* Extra spacing for the top action bar so buttons aren't too close to fields */
#form-actions-top {
    margin-bottom: 20px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #a8a8a8 0%, #777 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20963d 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Inline input row with compact button (used for Tracking URL open button) */
.input-row { display:flex; gap:6px; align-items:center; }
.input-row input[type="url"], .input-row input[type="text"], .input-row input[type="password"], .input-row input[type="number"], .input-row input[type="date"] { flex:1; }
.btn-compact { padding: 6px 8px; min-width: auto; line-height: 1; }

.page-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}
.page-actions.right { justify-content: flex-end; }
/* Make Manage page buttons compact to align with filter selects */
#manage .page-actions .btn { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
/* Small filter select */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
.page-actions .filter-select { min-width: 160px; }

/* Application Cards */
.application-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.application-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.list-count {
    color: #555;
    font-size: 14px;
    margin: 8px 0 12px 0;
    text-align: right;
}

.application-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.application-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

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

.btn-edit, .btn-delete, .btn-view {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

/* Manage collapse UI */
.btn-collapse {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}
.application-card.collapsed .application-details,
.application-card.collapsed .requirements-section {
    display: none;
}

.btn-edit:hover, .btn-delete:hover, .btn-view:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Distinct colors for Manage action buttons */
.btn-edit {
    background: #2b7bdc; /* blue */
    border-color: #2567b6;
    color: #fff;
}
.btn-delete {
    background: #c0392b; /* red */
    border-color: #a83227;
    color: #fff;
}

/* Override generic hover for colored variants */
.btn-edit:hover {
    background: #2f86f1;
    transform: translateY(-1px);
}
.btn-delete:hover {
    background: #d34a3d;
    transform: translateY(-1px);
}

/* Pagination styles */
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.pagination-info {
    color: #666;
    font-size: 14px;
    margin-right: 16px;
}

.pagination-controls .btn {
    padding: 6px 12px;
    font-size: 13px;
    min-width: auto;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

.pagination-controls .btn:hover:not(:disabled) {
    background: #f5f7fb;
    border-color: #002f6c;
    transform: none;
}

.pagination-controls .btn.btn-primary {
    background: #002f6c;
    color: #fff;
    border-color: #002f6c;
}

.pagination-controls .btn.btn-outline {
    background: #fff;
    color: #002f6c;
    border-color: #002f6c;
}

.pagination-controls .btn.btn-outline:hover {
    background: #002f6c;
    color: #fff;
}

.pagination-controls .btn:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
}

.pagination-dots {
    color: #999;
    padding: 0 4px;
    user-select: none;
}

/* Modal styles */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal .modal-content { width: min(800px, 92vw); background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.modal .modal-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #f5f7fb; border-bottom: 1px solid #e1e5e9; }
.modal .modal-body { padding: 16px; }
.modal .modal-footer { padding: 12px 16px; border-top: 1px solid #e1e5e9; display: flex; justify-content: flex-end; background: #fafbfe; }
.modal .modal-close { background: transparent; border: none; font-size: 22px; cursor: pointer; line-height: 1; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 10px; }
.link-grid a { display: block; background: #eef1f6; border: 1px solid #d0d6e0; padding: 10px 12px; border-radius: 8px; color: #0f172a; text-decoration: none; font-weight: 600; }
.link-grid a:hover { background: #EAEEFF; }

.application-details {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* View page two-column layout: details left, KPI right */
.view-card .view-main { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
.view-card .view-grid { grid-column: 1; display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 18px; }
.view-card .view-side { grid-column: 2; position: sticky; top: 10px; align-self: start; height: fit-content; }
@media (max-width: 900px) {
    .view-card .view-main { grid-template-columns: 1fr; }
    .view-card .view-side { grid-column: 1; }
}

/* View header: center title, equal-sized buttons on the right */
.view-card .view-header { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.view-card .view-header .vh-left { width:120px; flex:0 0 120px; }
.view-card .view-header .vh-title { flex:1; text-align:center; margin:0; font-size:1.4rem; }
.view-card .view-header .vh-right { display:flex; align-items:center; gap:10px; }
.view-card .view-header .vh-right .btn { min-width: 150px; justify-content:center; }
.view-card .view-header .vh-right .status-badge { margin-right: 6px; }
@media (max-width: 600px) {
    .view-card .view-header { flex-wrap: wrap; }
    .view-card .view-header .vh-left { display:none; }
    .view-card .view-header .vh-title { order: -1; width:100%; text-align:center; }
    .view-card .view-header .vh-right .btn { min-width: 120px; }
}

/* Make View page action button widths consistent with header buttons */
#view .page-actions { justify-content: flex-end; margin-bottom: 10px; }
#view .page-actions .btn { min-width: 160px; justify-content: center; }

/* Centered status under title on View page */
.view-status-center { text-align:center; margin: 6px 0 12px; font-weight: 600; }
.view-status-center .status-badge { vertical-align: middle; }

/* Subtle padding around View sections */
.view-card { padding: 8px 10px; }
.view-card .view-notes { margin-top: 12px; }
.view-card .view-notes .notes { 
    white-space: pre-wrap; 
    word-wrap: break-word; 
    margin-top: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-blue);
}
.view-card .view-reqs { margin-top: 16px; }
.view-card .view-grid > div { padding: 4px 0; }

/* Calendar nav button styling */
.cal-nav { 
    padding: 4px 8px; 
    font-size: 12px; 
    line-height: 1.2; 
    min-width: auto; 
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}
.cal-nav.btn.btn-secondary { background: #e2e8f0; color: #0f172a; border-color: #cbd5e1; }
.cal-nav.btn.btn-secondary:hover { background: #cbd5e1; }
.cal-nav.btn.btn-secondary:active { background: #b2c5d9; transform: translateY(1px); }

.status-dropdown, .requirement-status {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

/* KPI semicircle gauge on Event View */
.kpi-gauge { margin: 12px 20px 4px; }
.kpi-title { font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.kpi-gauge-wrap { position: relative; width: 220px; height: 120px; }
.kpi-gauge-svg { width: 100%; height: 100%; display: block; }
.kpi-arc-bg { stroke: #e6eef7; }
.kpi-arc { stroke: var(--kpi-color, #28a745); transition: stroke-dashoffset 0.5s ease; }
.kpi-gauge-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #2b2b2b; }

/* Priority page styles */
.priority-section { margin-bottom: 22px; }
.priority-section h3 { margin: 0 0 8px; color:#0f172a; }
.priority-list { margin-left: 18px; }
.priority-list li { margin: 6px 0; }
.priority-note { color:#334155; background:#f1f5f9; border:1px solid #e2e8f0; padding:8px 10px; border-radius:8px; display:inline-block; margin-top:6px; }
.badge { display:inline-block; padding:2px 8px; border-radius:12px; font-size:12px; font-weight:600; }
.badge-red { background:#dc2626; color:#fff; }
.badge-yellow { background:#f59e0b; color:#1f2937; }
.badge-gray { background:#cbd5e1; color:#0f172a; }
.badge-green { background:#28a745; color:#fff; }
.badge-blue { background:var(--primary-blue); color:#fff; }
/* Align badges nicely in Manage headers */
#manage .application-header h3 .badge { margin-left:8px; vertical-align:middle; }
.muted { color:#666; }
/* Colorize status controls on Manage page */
/* Also target generic selects with status classes for Add/Edit page */
.status-dropdown.status-not-started, .requirement-status.status-not-started,
.status-dropdown.status-cancelled, .requirement-status.status-cancelled,
select.status-not-started, select.status-cancelled {
    background: #6c757d; /* dark gray to support white text */
    color: #fff;
    border-color: #5c636a;
}
.status-dropdown.status-in-progress, .requirement-status.status-in-progress,
.status-dropdown.status-requested, .requirement-status.status-requested,
.status-dropdown.status-pending, .requirement-status.status-pending,
.status-dropdown.status-accepted, .requirement-status.status-accepted,
/* Rejected is red, handle below */
select.status-in-progress, select.status-requested, select.status-pending, select.status-accepted, select.status-rejected {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #218838;
}

/* Ensure option text is always visible */
select.status-in-progress option, 
select.status-requested option, 
select.status-pending option, 
select.status-accepted option {
    background: #fff !important;
    color: #333 !important;
}
/* Rejected = red for both badges and selects */
.status-dropdown.status-rejected, .requirement-status.status-rejected, select.status-rejected, .status-rejected { 
    background: #dc3545; 
    color: #fff; 
    border-color: #b02a37;
}
.status-dropdown.status-completed, .requirement-status.status-completed,
.status-dropdown.status-submitted, .requirement-status.status-submitted,
select.status-completed, select.status-submitted {
    background: #007bff;
    color: #fff;
    border-color: #0069d9;
}

/* Fix status dropdown options visibility */
select[name="status"] option {
    background: #fff;
    color: #000;
    padding: 8px;
}

/* Ensure status dropdown options are readable */
#status option {
    background: #fff;
    color: #333;
    padding: 8px;
}

.requirements-section {
    padding: 0 20px 20px;
}

.requirements-section h4 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
}

.req-item {
    background: #f8f9fa;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.requirement-type {
    font-weight: 600;
    flex: 1;
}

.requirement-due {
    color: #666;
    font-size: 0.9rem;
}

.btn-delete-req {
    background: #ff4757;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Activity and Recent Items */
.recent-activity, .upcoming-deadlines {
    margin-top: 30px;
}

.recent-activity h3, .upcoming-deadlines h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
}

/* Small icon used in section headings */
.section-icon {
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
    margin-right: 6px;
}

/* Dashboard urgency buckets */
.deadline-buckets h3 { color:#333; margin: 20px 0 12px; padding-bottom:5px; border-bottom:2px solid #f0f0f0; }
.bucket-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:12px; }
.bucket-card { background:#fff; border:1px solid #e1e5e9; border-radius:12px; padding:16px; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,0.06); transition: transform .15s ease, box-shadow .15s ease; }
.bucket-card .num { font-size:28px; font-weight:800; margin-bottom:6px; }
.bucket-card .label { color:#333; font-weight:600; }
.bucket-card:hover { transform: translateY(-2px); box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.bucket-card.red { border-left:6px solid #d90429; }
.bucket-card.yellow { border-left:6px solid #ffbf00; }
.bucket-card.other { border-left:6px solid var(--primary-blue); }

.activity-item, .deadline-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-status, .deadline-days {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}
/* Urgency colors for deadline badge */
.deadline-days.overdue,
.deadline-days.urgent {
    background: linear-gradient(135deg, #e63946 0%, #d90429 100%); /* red */
}
.deadline-days.soon {
    background: linear-gradient(135deg, #ffd24d 0%, #ffbf00 100%); /* yellow */
    color: #333;
}

/* Calendar view table */
.calendar-view {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 20px;
}
.calendar-view th, .calendar-view td {
    border: 1px solid #b0b0b0;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    min-width: 80px;
}
/* Keep Name (col 1) and Requirements (col 3) left-aligned; others (including Status col 2) are centered */
.calendar-view th:nth-child(2),
.calendar-view td:nth-child(2),
.calendar-view th:nth-child(4),
.calendar-view td:nth-child(4) {
    text-align: left;
}
.calendar-view th {
    background: var(--primary-blue);
    color: white;
}
.calendar-view tr:nth-child(even) {
    background: var(--light-blue);
}
.calendar-view tr:nth-child(odd) {
    background: white;
}
.calendar-view .manage-cell { width: 56px; min-width: 56px; }
.calendar-manage-btn { background: #eef1f6; border: 1px solid #d0d6e0; border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.calendar-manage-btn:hover { background: var(--light-blue); }
.calendar-view td.cell-open { background: #e7f3dc; } /* soft green */
.calendar-view td.cell-close { background: #f9d6d6; } /* soft red */
.calendar-view td.cell-result { background: #fff4cc; } /* soft yellow */
.calendar-view td.cell-open .open,
.calendar-view td.cell-close .close,
.calendar-view td.cell-result .result {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
}
.open {
    background: #7a9a3a;
    color: #fff;
    font-weight: bold;
}
.close {
    background: #b30000;
    color: #fff;
    font-weight: bold;
}

.result {
    background: #f4c542; /* yellow */
    color: #222;
    font-weight: bold;
}

/* Calendar legend */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    background: #f7f9fc;
    border: 1px solid #e1e6ef;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0 4px;
}
.calendar-legend .item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.calendar-legend .swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}
.calendar-legend .swatch.open { background: #e7f3dc; }   /* match cell-open */
.calendar-legend .swatch.close { background: #f9d6d6; }  /* match cell-close */
.calendar-legend .swatch.result { background: #fff4cc; } /* match cell-result */
.calendar-legend .notes {
    margin-left: auto;
    font-size: 12px;
    color: #666;
}

@media (max-width: 700px) {
    .calendar-legend { gap: 8px 14px; }
    .calendar-legend .notes { flex-basis: 100%; margin-left: 0; }
}

/* XML Viewer */
.xml-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.xml-viewer {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    height: 500px;
    overflow-y: auto;
}

.xml-viewer pre {
    padding: 20px;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Help content */
.help-layout { display:flex; gap:16px; height: calc(100% - 8px); min-height:560px; align-items:stretch; }
.help-header { display:flex; align-items:center; justify-content:flex-start; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.help-tabs { display:flex; align-items:center; gap:8px; }
.help-tab { border:1px solid #cbd5e1; background:#fff; color:#1f2937; border-radius:6px; padding:6px 10px; font-size:12px; cursor:pointer; }
.help-tab.active { background:#e5effa; border-color:#93c5fd; color:#0f172a; }
.help-search { border:1px solid #cbd5e1; border-radius:6px; padding:6px 10px; font-size:12px; min-width:220px; }
.help-sidebar { width:280px; min-width:240px; max-width:320px; background:#ffffff; color:#2a4258; border:1px solid #e1e5e9; border-radius:8px; padding:10px; overflow:auto; }
.help-body { flex:1; min-width:0; }
.help-content { background:#fff; border:1px solid #e1e5e9; border-radius:8px; padding:16px; }
.help-content h1, .help-content h2, .help-content h3 { margin: 10px 0; }
.help-content ul { margin: 8px 0 8px 20px; }
.help-content code { background:#f5f7fb; padding:2px 4px; border-radius:4px; }

/* Tree */
.help-tree { font-size:13px; line-height:1.3; }
.help-tree .tree-node { display:block; padding:4px 6px; border-radius:4px; color:#2a4258; cursor:pointer; user-select:none; }
.help-tree .tree-node:hover { background:#f3f7fb; }
.help-tree .tree-node.active { background:#e5effa; }
/* Keep top-level parents flush; children get strong indent */
.help-tree details { margin-left:0; }
.help-tree summary { list-style:none; cursor:pointer; padding:4px 6px; border-radius:4px; }
/* Parent (top-level) emphasis */
.help-tree > details > summary { text-decoration: underline; font-weight:700; color:#2a4258; }
/* Top-level leaf (e.g., Introduction, Settings & Lists) underline */
.help-tree > .tree-node { text-decoration: underline; font-weight:600; }
/* Increase indent for child nodes under a parent */
.help-tree details > .leaf { padding-left: 1.8em; margin-left: 14px; }
.help-tree details > details { margin-left: 16px; }
.help-tree details > summary { margin-left: 2px; }
.help-tree summary::-webkit-details-marker { display:none; }
.help-tree summary:before { content:'▸'; display:inline-block; width:1em; color:var(--primary-blue); }
.help-tree details[open] > summary:before { content:'▾'; }
.help-tree .leaf { padding-left:1.2em; display:block; }

/* Index and search */
.help-index, .help-search-results { font-size:13px; }
.help-index a, .help-search-results a { color:var(--primary-blue); text-decoration:none; }
.help-index a:hover, .help-search-results a:hover { text-decoration:underline; }
/* keep old rules for compatibility (already above) */

/* Requirement chips used in Calendar Requirements column */
.req-chip {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 4px 2px 0;
    border-radius: 12px;
    background: #eef1f6;
    color: #222;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid #d0d6e0;
}
.req-chip.completed {
    background: #007bff; /* blue, matches submitted; requested 'bluw' assumed blue */
    color: #fff;
    border-color: #0069d9;
}
.req-chip.in-progress {
    background: #28a745; /* green, matches in-progress/accepted palette */
    color: #fff;
    border-color: #218838;
}
.help-content code { background:#f5f7fb; padding:2px 4px; border-radius:4px; }

/* Status Bar */
.status-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Hide the file status text in the header; we'll show it in the status bar instead */
.file-status #file-status-text {
    display: none;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-color: #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-color: #f44336;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-color: #2196f3;
}

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

::-webkit-scrollbar-track {
    background: var(--neutral-gray);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--medium-blue);
}

/* Dropdown and Select element scrollbars */
select::-webkit-scrollbar,
.nav-dropdown::-webkit-scrollbar,
.quick-links-dropdown::-webkit-scrollbar,
.filter-select::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

select::-webkit-scrollbar-track,
.nav-dropdown::-webkit-scrollbar-track,
.quick-links-dropdown::-webkit-scrollbar-track,
.filter-select::-webkit-scrollbar-track {
    background: var(--neutral-gray);
    border-radius: 10px;
}

select::-webkit-scrollbar-thumb,
.nav-dropdown::-webkit-scrollbar-thumb,
.quick-links-dropdown::-webkit-scrollbar-thumb,
.filter-select::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 10px;
}

select::-webkit-scrollbar-thumb:hover,
.nav-dropdown::-webkit-scrollbar-thumb:hover,
.quick-links-dropdown::-webkit-scrollbar-thumb:hover,
.filter-select::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* View Page Grouped Sections */
.view-grouped-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    margin-right: 24px;
}

.view-section-content {
    padding: 20px;
}

.view-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.view-grid.basics-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.view-grid.schedule-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.view-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.view-field.full-width {
    grid-column: 1 / -1;
}

.view-field label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-field .field-value {
    font-size: 15px;
    color: var(--text-primary);
    min-height: 20px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.view-field .field-value.notes-value {
    min-height: 60px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.view-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.view-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-actions .btn-icon {
    font-size: 14px;
}

/* Responsive adjustments for view page */
@media (max-width: 768px) {
    .view-grouped-sections {
        margin-right: 0;
    }
    
    .view-main {
        flex-direction: column;
        gap: 24px;
    }
    
    .view-side {
        order: -1;
        flex-direction: row;
        justify-content: space-around;
        gap: 20px;
    }
    
    .view-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-row.three {
        grid-template-columns: 1fr;
    }
    .form-row.four {
        grid-template-columns: 1fr;
    }
    .form-row.five {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .requirement-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .application-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-bar {
        flex-wrap: wrap;
    }
    
    .app-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    color: #fff;
}
.status-not-started { background: #6c757d; }
.status-requested    { background: #28a745; }
.status-pending      { background: #28a745; }
.status-in-progress  { background: #28a745; }
.status-submitted    { background: #007bff; }
.status-accepted     { background: #28a745; }
.status-rejected     { background: #dc3545; }
.status-completed    { background: #007bff; }
.status-cancelled    { background: #6c757d; }

/* Print helpers */
@media print {
    :root { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .nav-bar, .app-header, .status-bar, .app-footer, .xml-actions, .page-actions { display: none !important; }
    .main-content { padding: 0; }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        margin: 5px;
    }
    
    .page {
        padding: 20px;
    }
}

/* Attachment Styles */
.btn-attachment {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-attachment:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.attachments-list {
    margin-top: 10px;
    padding: 10px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(222, 226, 230, 0.5);
    /* Span full width across the requirement row grid */
    grid-column: 1 / -1;
}

.attachments-list label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid rgba(222, 226, 230, 0.8);
}

.attachment-name {
    flex: 1;
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.attachment-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.btn-attachment-open {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-attachment-open:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

.btn-attachment-remove {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-attachment-remove:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.attachment-count {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 600;
    background: rgba(40, 167, 69, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

/* Project Attachments */
.project-attachments-list {
    margin-top: 10px;
    padding: 10px;
    background: rgba(248, 249, 250, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(222, 226, 230, 0.5);
    /* Span full width across the requirement row grid */
    grid-column: 1 / -1;
}

.project-attachments-list label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.btn-remove-attachment {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-remove-attachment:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Editable Tables for Project Forms */
.requirements-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.editable-table {
    width: 100%;
    min-width: 800px; /* Ensure minimum width for readability */
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.editable-table th {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.95rem;
    white-space: nowrap;
}

.editable-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.editable-table .editable-row:nth-child(even) {
    background: var(--light-blue);
}

.editable-table .editable-row:nth-child(odd) {
    background: white;
}

.editable-table .editable-row:hover {
    background-color: rgba(0, 47, 108, 0.15);
}

/* Table Input Styling */
.table-input, .table-select, .table-textarea {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.9rem;
    background: transparent;
    transition: all 0.2s ease;
}

.table-input:focus, .table-select:focus, .table-textarea:focus {
    border-color: #80bdff;
    background: white;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    outline: none;
}

.table-textarea {
    resize: vertical;
    min-height: 35px;
    font-family: inherit;
}

/* Specific column styling */
.requirement-title, .milestone-title, .meeting-title {
    min-width: 280px;
    max-width: 400px;
    width: 35%;
}

.requirement-desc, .milestone-desc, .meeting-desc {
    margin-top: 8px;
    opacity: 0.8;
    font-size: 0.85rem;
}

.type {
    width: 140px;
    min-width: 140px;
}

.status {
    width: 140px;
    min-width: 140px;
}

.assigned {
    width: 160px;
    min-width: 160px;
}

.due-date, .datetime {
    width: 160px;
    min-width: 160px;
}

.progress {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.duration {
    width: 120px;
    min-width: 120px;
}

.location {
    width: 180px;
    min-width: 180px;
}

.attachments {
    width: 120px;
    min-width: 120px;
    text-align: center;
}

.actions {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

/* Button styling in tables */
.editable-table .btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.editable-table .btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.editable-table .btn-attachment {
    padding: 4px 8px;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Responsive table styling */
@media (max-width: 768px) {
    .requirements-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .editable-table {
        font-size: 0.85rem;
        min-width: 700px; /* Maintain minimum width for usability */
    }
    
    .table-input, .table-select, .table-textarea {
        font-size: 0.85rem;
        padding: 6px 8px;
    }
    
    .requirement-title, .milestone-title, .meeting-title {
        min-width: 200px;
        max-width: 250px;
    }
    
    .editable-table th {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .editable-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .editable-table {
        font-size: 0.8rem;
        min-width: 650px;
    }
    
    .table-input, .table-select, .table-textarea {
        font-size: 0.8rem;
        padding: 5px 6px;
    }
}

/* Update requirement item styling to accommodate attachments */
.requirement-item {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    border: 1px solid rgba(222, 226, 230, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Checklist table (match print layout) */
.checklist-table { width: 100%; }
.checklist-table .list { width: 100%; border-collapse: collapse; }
.checklist-table .list th, .checklist-table .list td { border-bottom: 1px dashed #ccc; padding: 8px 6px; font-size: 13px; }
.checklist-table .list th { text-align: left; background: var(--primary-blue); color: white; }
.checklist-table .list tr:nth-child(even) { background: var(--light-blue); }
.checklist-table .list tr:nth-child(odd) { background: white; }
/* Align Status header text to right to match status column */
.checklist-table .list thead th.status { text-align: right; }
/* Center the Days column and keep it compact */
.checklist-table .list thead th.days, .checklist-table .list td.days {
    text-align: center;
    width: 140px;
    min-width: 120px;
    white-space: nowrap;
}
/* Make the checklist header sticky within the scroll container */
.checklist-table { position: relative; }
.checklist-table .list thead th { position: sticky; top: 0; z-index: 5; background: var(--primary-blue); color: white; }
.checklist-table .date { font-weight: 700; white-space: nowrap; }
.checklist-table .status { text-align: right; }
.checklist-table .sch { color: var(--primary-blue); font-weight: 600; }
.checklist-table .type { color: #555; }
.checklist-table .desc { color: #555; font-style: italic; }
.checklist-table tr.overdue td { border-left: 4px solid #ff4757; background: #fff7f7; }
.checklist-table tr.completed td {
    color: #6c757d;
    text-decoration: line-through;
    background: #f1f3f5; /* soft gray background for completed rows */
}

/* Settings table compact layout */
.settings-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
}
.settings-list th,
.settings-list td {
    padding: 6px 8px;
    border-bottom: 1px dashed #ddd;
    vertical-align: middle;
}
.settings-list thead th {
    text-align: left;
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
}
.settings-list tr:nth-child(even) { background: var(--light-blue); }
.settings-list tr:nth-child(odd) { background: white; }
.settings-list .toggle-cell { width: 68px; }
.settings-list .value-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.settings-list .settings-value { flex: 1; }
.settings-list .settings-delete {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.85rem;
}

/* Manage header actions: compact +/- collapse button and inline status dropdown */
#manage .application-card .application-actions .btn-collapse {
    width: 28px;
    height: 28px;
    padding: 0;
    line-height: 26px;
    text-align: center;
    font-size: 18px;
    border-radius: 8px;
}
#manage .application-card .application-actions .header-status {
    margin: 0 6px;
    height: 32px;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 8px;
}
/* Equal widths for Manage action buttons: Search Web and View */
#manage .application-card .application-actions .btn-view { min-width: 120px; text-align: center; }

/* ===== PROJECT TIMELINE CALENDAR STYLES ===== */

.project-timeline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 10px 0;
}

.project-timeline-table th {
    background: var(--primary-blue);
    color: white;
    border: 1px solid #dee2e6;
    padding: 8px 4px;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.project-timeline-table td {
    border: 1px solid #dee2e6;
    padding: 6px 4px;
    vertical-align: top;
    position: relative;
}

.project-timeline-row:nth-child(even) {
    background: var(--light-blue);
}

.project-timeline-row:nth-child(odd) {
    background: white;
}

.project-timeline-row:hover {
    background: rgba(0, 47, 108, 0.15);
}

/* Project month cell styling */
.project-month-cell {
    min-height: 50px;
    position: relative;
    padding: 4px !important;
}

.month-project-bar {
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 2px;
    margin: 2px 0;
    position: relative;
}

.timeline-item-marker {
    display: inline-block;
    margin: 1px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
}

.timeline-item-marker.completed {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.timeline-item-marker.in-progress {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.timeline-item-marker.pending {
    background: #e2e3e5;
    border-color: #d6d8db;
    color: #383d41;
}

.timeline-item-marker.blocked {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.meeting-marker {
    display: inline-block;
    margin: 1px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
}

.meeting-marker.scheduled {
    background: #cce5ff;
    color: #0056b3;
}

.meeting-marker.completed {
    background: #d4edda;
    color: #155724;
}

.meeting-marker.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.requirement-marker {
    display: inline-block;
    margin: 1px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
}

.requirement-marker.completed {
    background: #d4edda;
    color: #155724;
}

.requirement-marker.in-progress {
    background: #fff3cd;
    color: #856404;
}

.requirement-marker.pending {
    background: #e2e3e5;
    color: #383d41;
}

.empty-cell {
    color: #6c757d;
    font-size: 16px;
    opacity: 0.5;
}

/* Progress bar styling */
.progress-bar {
    position: relative;
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    min-width: 60px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #34ce57);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

/* Project actions column */
.project-actions {
    text-align: center;
    white-space: nowrap;
}

.project-actions .btn {
    margin: 0 1px;
    padding: 2px 6px;
    font-size: 11px;
    line-height: 1;
}

/* Status and priority badges */
.status-badge, .priority-badge, .type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-planning { background: #e3f2fd; color: #1565c0; }
.status-badge.status-active { background: #e8f5e8; color: #2e7d32; }
.status-badge.status-on-hold { background: #fff3e0; color: #ef6c00; }
.status-badge.status-completed { background: #e8f5e8; color: #2e7d32; }
.status-badge.status-cancelled { background: #ffebee; color: #c62828; }

.priority-badge.priority-low { background: #e8f5e8; color: #388e3c; }
.priority-badge.priority-medium { background: #fff3e0; color: #f57c00; }
.priority-badge.priority-high { background: #ffebee; color: #d32f2f; }
.priority-badge.priority-critical { background: #ffebee; color: #b71c1c; }

.type-badge {
    background: #f3e5f5;
    color: #7b1fa2;
    margin-right: 4px;
}

/* Upcoming items section */
.project-calendar-extras {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upcoming-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upcoming-item.overdue {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.upcoming-item.urgent {
    border-left-color: #fd7e14;
    background: #fff8f0;
}

.upcoming-item.soon {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.upcoming-date {
    text-align: center;
    min-width: 50px;
}

.upcoming-date strong {
    display: block;
    font-size: 18px;
    line-height: 1;
    color: #333;
}

.upcoming-date small {
    display: block;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

.upcoming-date .days-diff {
    display: block;
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.upcoming-details {
    flex: 1;
}

.upcoming-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.upcoming-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.upcoming-meta .location {
    font-size: 11px;
    color: #666;
}

/* 3-month view styling */
.project-timeline-table th:nth-child(n+8) {
    width: 180px !important; /* Make month columns wider for 3-month view */
}

.project-month-cell {
    min-width: 180px;
    padding: 8px !important;
}

/* Enhanced month header styling */
.project-timeline-table th small {
    display: block;
    font-weight: normal;
    font-size: 10px;
    opacity: 0.7;
    margin-top: 2px;
}

/* Better spacing for markers in wider columns */
.timeline-item-marker,
.meeting-marker,
.requirement-marker {
    margin: 2px 3px;
    padding: 3px 6px;
}

/* Enhanced Project View Styles */
.application-view {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.application-view-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.application-title-section h2 {
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.2;
}

.status-indicators {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.application-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.application-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.application-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.application-section h3 {
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
    flex: 1;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 1rem;
    color: #333;
    padding: 8px 0;
}

.description-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.description-section h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
}

.description-section p {
    color: #666;
    line-height: 1.6;
}

/* Formatted text styling for better readability */
.formatted-text {
    color: #666;
    line-height: 1.6;
}

.formatted-text p {
    margin: 0 0 12px 0;
    color: #666;
    line-height: 1.6;
}

.formatted-text p:last-child {
    margin-bottom: 0;
}

/* Enhanced requirement description styling */
.requirement-desc {
    margin-top: 8px;
    font-size: 0.9em;
    color: #777;
    line-height: 1.5;
}

.requirement-desc p {
    margin: 0 0 8px 0;
    color: #777;
    line-height: 1.5;
}

.requirement-desc p:last-child {
    margin-bottom: 0;
}

/* Impact badge styling for bottlenecks */
.impact-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impact-critical {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.impact-high {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffcc02;
}

.impact-medium {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
}

.impact-low {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.team-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.team-section h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
}

.team-members-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.team-member-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.member-avatar {
    font-size: 16px;
    opacity: 0.7;
}

.member-name {
    font-weight: 500;
    color: #333;
}

.progress-bar {
    width: 60px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
}

.notes-content {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-blue);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
}

.notes-content p {
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Stat card enhancements for project view */
.stat-card.urgent {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #f44336;
}

.stat-card.urgent .stat-number {
    color: #d32f2f;
}

.stat-subtitle {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
    font-weight: normal;
}

/* Requirements table responsive enhancements */
.requirements-table-container {
    overflow-x: auto;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.requirements-table {
    width: 100%;
    min-width: 800px; /* Ensure minimum width for readability */
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.requirements-table th {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requirements-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.requirements-table .requirement-row:nth-child(even) {
    background: var(--light-blue);
}

.requirements-table .requirement-row:nth-child(odd) {
    background: white;
}

.requirements-table .requirement-row:hover {
    background: rgba(0, 47, 108, 0.15);
}

.requirement-title strong {
    color: #333;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.requirement-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-top: 5px;
}

.requirement-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Project Edit Table Styles */
.edit-table-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.edit-table-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.edit-requirements-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.edit-requirements-table th {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edit-requirements-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.edit-requirements-table .edit-row:nth-child(even) {
    background: var(--light-blue);
}

.edit-requirements-table .edit-row:nth-child(odd) {
    background: white;
}

.edit-requirements-table .edit-row:hover {
    background: rgba(0, 47, 108, 0.15);
}

.edit-cell {
    position: relative;
}

.edit-cell input,
.edit-cell select,
.edit-cell textarea {
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 0.85rem;
    background: white;
    transition: border-color 0.2s ease;
}

.edit-cell input:focus,
.edit-cell select:focus,
.edit-cell textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(77, 121, 166, 0.1);
}

.edit-cell .form-control-sm {
    font-size: 0.8rem;
    padding: 4px 6px;
}

.edit-cell .description-input {
    margin-top: 5px;
    resize: vertical;
    min-height: 40px;
}

.edit-cell.actions {
    text-align: center;
    width: 60px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-icon.btn-danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

.empty-table-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
    background: white;
    border-radius: 6px;
    margin-top: 10px;
}

/* Column width adjustments for different table types */
.edit-requirements-table th:nth-child(1) { width: 25%; } /* Title */
.edit-requirements-table th:nth-child(2) { width: 12%; } /* Type */
.edit-requirements-table th:nth-child(3) { width: 12%; } /* Status */
.edit-requirements-table th:nth-child(4) { width: 15%; } /* Assigned */
.edit-requirements-table th:nth-child(5) { width: 12%; } /* Due Date */
.edit-requirements-table th:nth-child(6) { width: 10%; } /* Priority */
.edit-requirements-table th:nth-child(7) { width: 8%; }  /* Actions */

/* Timeline table specific widths */
#timelineEditTableBody ~ table .edit-requirements-table th:nth-child(6) { width: 10%; } /* Progress */

/* Meeting table specific widths */
#meetingsEditTableBody ~ table .edit-requirements-table th:nth-child(3) { width: 18%; } /* Date & Time */
#meetingsEditTableBody ~ table .edit-requirements-table th:nth-child(5) { width: 10%; } /* Duration */

/* Form enhancement for edit mode */
.form-group.editing {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.section-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 8px;
}

/* Cancel edit button styling */
#project-cancel-edit-btn-top,
#project-cancel-edit-btn {
    background: #6c757d;
    color: white;
    border: none;
}

#project-cancel-edit-btn-top:hover,
#project-cancel-edit-btn:hover {
    background: #5a6268;
}

/* Responsive adjustments for edit tables */
@media (max-width: 1200px) {
    .edit-requirements-table {
        font-size: 0.8rem;
    }
    
    .edit-requirements-table th,
    .edit-requirements-table td {
        padding: 6px 4px;
    }
    
    .edit-cell input,
    .edit-cell select,
    .edit-cell textarea {
        font-size: 0.75rem;
        padding: 4px 6px;
    }
    
    .description-input {
        min-height: 30px;
    }
}

@media (max-width: 768px) {
    .edit-table-container {
        padding: 15px;
        margin: 10px -10px;
        border-radius: 0;
    }
    
    .edit-requirements-table {
        font-size: 0.75rem;
    }
    
    .edit-table-actions {
        margin-bottom: 10px;
    }
    
    .btn-icon {
        padding: 2px 4px;
        font-size: 0.8rem;
    }
}

/* Responsive adjustments for timeline table */
@media (max-width: 1200px) {
    .project-timeline-table {
        font-size: 11px;
    }
    
    .project-timeline-table th:nth-child(n+8) {
        width: 150px !important;
    }
    
    .project-timeline-table th,
    .project-timeline-table td {
        padding: 4px 2px;
    }
    
    .timeline-item-marker,
    .meeting-marker,
    .requirement-marker {
        font-size: 9px;
        padding: 1px 2px;
        margin: 1px 2px;
    }
    
    .application-view-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .application-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .info-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .info-item {
        min-width: auto;
    }
}

/* Dashboard Two-Column Layout */
.dashboard-columns {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.events-column,
.projects-column {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.events-column h3,
.projects-column h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.events-column .section-icon,
.projects-column .section-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(20%) sepia(17%) saturate(1345%) hue-rotate(182deg) brightness(95%) contrast(87%);
}

.section-actions {
    margin-top: 15px;
    text-align: right;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
    border-radius: 4px;
}

.mini-stat-card {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mini-stat-card:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

.project-deadline-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    transition: background-color 0.2s ease;
}

.project-deadline-item:hover {
    background-color: #f8f9fa;
    margin: 0 -10px;
    padding: 8px 10px;
    border-radius: 4px;
}

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

.no-projects {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsive behavior for dashboard columns */
@media (max-width: 768px) {
    .dashboard-columns {
        grid-template-columns: 1fr !important;
    }
    
    .events-column,
    .projects-column {
        padding: 15px;
    }
}

/* Project Reports Styles */
.reports-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.report-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.report-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overview-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.overview-stats .stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.overview-stats .stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2980b9;
    margin-bottom: 5px;
}

.overview-stats .stat-label {
    font-size: 0.9rem;
    color: #666;
}

/* Gantt Chart Styles */
.gantt-chart {
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.gantt-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
    font-weight: bold;
}

.gantt-project-column {
    width: 250px;
    padding: 10px;
    border-right: 1px solid #ddd;
    background: #f1f3f5;
}

.gantt-timeline-header {
    flex: 1;
    display: flex;
    min-width: 600px;
}

.timeline-month {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-right: 1px solid #ddd;
    font-size: 0.9rem;
}

.gantt-body {
    max-height: 400px;
    overflow-y: auto;
}

.gantt-row {
    display: flex;
    border-bottom: 1px solid #eee;
    min-height: 50px;
}

.gantt-row:hover {
    background: #f8f9fa;
}

.gantt-project-info {
    width: 250px;
    padding: 10px;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.milestone-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 4px;
    padding-left: 10px;
}

.project-meta,
.milestone-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gantt-timeline {
    flex: 1;
    position: relative;
    min-width: 600px;
    min-height: 50px;
}

.project-bar {
    position: absolute;
    height: 20px;
    border-radius: 10px;
    top: 50%;
    transform: translateY(-50%);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.project-bar.active {
    background: #4CAF50;
}

.project-bar.planning {
    background: #2196F3;
}

.project-bar.completed {
    background: #9C27B0;
}

.project-bar.on-hold {
    background: #FF9800;
}

.project-bar.cancelled {
    background: #F44336;
}

.progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transition: width 0.3s ease;
}

.bar-label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 16px);
}

.milestone-row {
    background: rgba(0, 0, 0, 0.02);
}

.milestone-marker {
    position: absolute;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 12px;
    height: 12px;
}

.marker-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.milestone-marker.completed .marker-dot {
    background: #4CAF50;
}

.milestone-marker.in-progress .marker-dot {
    background: #FF9800;
}

.milestone-marker.pending .marker-dot {
    background: #9E9E9E;
}

.milestone-marker.overdue .marker-dot {
    background: #F44336;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 1px 3px rgba(244, 67, 54, 0.6), 0 0 10px rgba(244, 67, 54, 0.4); }
    100% { box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
}

.no-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
    font-size: 0.8rem;
}

/* Progress Charts */
.progress-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.chart-container h4 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1rem;
}

/* Resource Allocation */
.resource-allocation {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.team-workload {
    display: grid;
    gap: 15px;
}

.member-workload {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #2980b9;
}

.member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
}

.member-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.member-projects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-chip {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-name {
    color: #1565c0;
}

.project-progress {
    background: #1976d2;
    color: white;
    border-radius: 8px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Responsive Design for Reports */
@media (max-width: 1024px) {
    .progress-charts {
        grid-template-columns: 1fr;
    }
    
    .gantt-project-column,
    .gantt-project-info {
        width: 200px;
    }
    
    .gantt-timeline-header,
    .gantt-timeline {
        min-width: 500px;
    }
}

@media (max-width: 768px) {
    .overview-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gantt-project-column,
    .gantt-project-info {
        width: 150px;
    }
    
    .gantt-timeline-header,
    .gantt-timeline {
        min-width: 400px;
    }
    
    .member-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Simple Timeline Chart Styles (for View and Print) */
.gantt-row-label {
    padding: 8px;
    font-size: 11px;
    border-right: 1px solid #bdc3c7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-month {
    text-align: center;
    border-left: 1px solid #bdc3c7;
    font-size: 10px;
    padding: 4px 0;
    background: #ecf0f1;
    font-weight: bold;
}

.gantt-bar {
    position: absolute;
    border-radius: 3px;
    cursor: pointer;
}

.gantt-bar:hover {
    opacity: 0.8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Organization Pages Styles */
.section-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.org-card, .event-card, .event-admin-card {
    transition: all 0.2s ease;
}

.org-card:hover, .event-admin-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Subscribed Organization Cards */
.subscribed-org-card {
    background: var(--primary-blue) !important;
    border: 1px solid var(--primary-blue) !important;
    color: white !important;
}

.subscribed-org-card:hover {
    box-shadow: 0 6px 16px rgba(0, 47, 108, 0.3);
    transform: translateY(-3px);
}

.subscribed-org-card h4 {
    color: white !important;
}

.subscribed-org-card .btn {
    background: rgba(255,255,255,0.2) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: white !important;
}

.subscribed-org-card .btn:hover {
    background: rgba(255,255,255,0.3) !important;
    border: 1px solid rgba(255,255,255,0.5) !important;
}

/* Reuse Map Styles */
.reuse-map-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reuse-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.reuse-section h3 {
    background: linear-gradient(135deg, #4d79a6 0%, #6a97c6 100%);
    color: white;
    margin: 0;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
}

.reuse-section .section-description {
    padding: 16px 20px 0;
    margin: 0;
    color: #666;
    font-size: 14px;
}

.reuse-section.collapsible h3 {
    cursor: pointer;
    transition: background 0.2s ease;
}

.reuse-section.collapsible h3:hover {
    background: linear-gradient(135deg, #3d6996 0%, #5a87b6 100%);
}

/* Event Cards */
.event-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.event-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.event-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
}

.event-requirements {
    padding: 0;
}

/* Requirement Rows */
.requirement-row {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.requirement-row:last-child {
    border-bottom: none;
}

.requirement-row:hover {
    background-color: #f8f9fa;
}

.requirement-row.can-reuse {
    background-color: #f0f8ff;
    border-left: 4px solid #4d79a6;
}

.requirement-row.similar-prompt {
    background-color: #fff8f0;
    border-left: 4px solid #e0a400;
}

.requirement-info {
    flex: 1;
}

.requirement-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 4px;
}

.requirement-description {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.requirement-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.requirement-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 200px;
    max-width: 300px;
}

.reuse-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    min-width: 120px;
    max-width: 180px;
    box-sizing: border-box;
    visibility: visible;
    opacity: 1;
}

.reuse-indicator.can-reuse {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.reuse-indicator.similar-prompt {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.reuse-source {
    font-size: 10px;
    color: #666;
    font-weight: 600;
    line-height: 1.2;
    word-wrap: break-word;
    width: 100%;
    display: block;
    visibility: visible;
    opacity: 1;
}

.reuse-source[onclick] {
    color: #4d79a6;
    font-weight: 600;
    cursor: pointer;
}

.reuse-source[onclick]:hover {
    color: #3d6996;
    text-decoration: underline;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.in-progress {
    background-color: #fff3cd;
    color: #856404;
}

/* Completed Requirements Library */
#completed-requirements-library {
    padding: 20px;
}

.completed-req-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 8px;
}

.completed-req-info {
    flex: 1;
}

.completed-req-type {
    font-weight: 500;
    color: #2c3e50;
}

.completed-req-desc {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.completed-req-badges {
    display: flex;
    gap: 6px;
}

/* No events state */
.no-events-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-events-message h4 {
    color: #4d79a6;
    margin-bottom: 12px;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

/* Responsive design */
@media (max-width: 768px) {
    .requirement-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .requirement-status {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .requirement-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .event-meta {
        flex-direction: column;
        gap: 8px;
    }
}

.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-blue);
    background: #f8f9fa;
}

.file-upload-area.dragover {
    border-color: var(--primary-blue);
    background: #e7f3ff;
}

/* ========================================
   WORKFLOW FORM STYLES
   ======================================== */

/* Workflow Progress Indicator */
.workflow-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0 30px 0;
    position: relative;
}

.workflow-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    min-width: 120px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.workflow-step:hover {
    opacity: 0.8;
}

.workflow-step:hover .step-circle {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.workflow-step:hover .step-label {
    color: var(--primary-blue);
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.workflow-step.active .step-circle {
    background: var(--primary-blue);
    color: white;
}

.workflow-step.completed .step-circle {
    background: #4caf50;
    color: white;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    text-align: center;
}

.workflow-step.active .step-label {
    color: var(--primary-blue);
    font-weight: 600;
}

/* Workflow Form Layout */
.workflow-form {
    max-width: none;
}

.workflow-stage {
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.stage-content {
    flex: 1;
    margin-bottom: 30px;
}

.form-group-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f0f0;
}

/* Workflow Navigation */
.workflow-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-top: 2px solid #f0f0f0;
    margin-top: auto;
}

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

.workflow-navigation .btn {
    min-width: 140px;
    padding: 12px 20px;
    font-weight: 500;
}

/* Stage Transitions */
.workflow-stage {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.workflow-stage[style*="block"], 
.workflow-stage:not([style*="none"]):not([style*="hidden"]) {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive Workflow */
@media (max-width: 768px) {
    .workflow-progress {
        margin: 15px 0 20px 0;
    }
    
    .workflow-step {
        min-width: 80px;
    }
    
    .step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .form-group-section {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .workflow-navigation {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-right {
        width: 100%;
        justify-content: center;
    }
    
    .workflow-navigation .btn {
        min-width: 120px;
        width: 100%;
    }
}

/* Organization Calendar Styles */
.org-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: #ddd;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.calendar-header-row {
    display: contents;
}

.calendar-header-cell {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.calendar-week-row {
    display: contents;
}

.calendar-day-cell {
    background-color: white;
    min-height: 140px;
    padding: 8px;
    position: relative;
    border: 1px solid #eee;
    overflow-y: auto;
}

.calendar-day-cell.other-month {
    background-color: #f8f9fa;
    color: #6c757d;
}

.calendar-day-cell.today {
    background-color: var(--light-blue);
    border: 2px solid var(--primary-blue);
}

.calendar-day-number {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.calendar-day-events {
    position: absolute;
    top: 30px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    overflow-y: auto;
}

.calendar-event {
    background-color: var(--primary-blue);
    color: white;
    font-size: 11px;
    padding: 3px 5px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    line-height: 1.2;
    word-break: break-word;
    min-height: 16px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-event:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

/* Same-day open/close events */
.same-day-event {
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.same-day-event:hover {
    border-color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}

.calendar-event-split {
    background: linear-gradient(90deg, #28a745 0%, #28a745 50%, #dc3545 50%, #dc3545 100%);
    color: white;
    position: relative;
}

.calendar-event-split::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Responsive calendar */
@media (max-width: 768px) {
    .org-calendar-grid {
        font-size: 12px;
    }
    
    .calendar-day-cell {
        min-height: 80px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 14px;
    }
    
    .calendar-event {
        font-size: 9px;
        padding: 1px 2px;
    }
    
    .calendar-header-cell {
        padding: 8px 4px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .workflow-progress::before {
        left: 15%;
        right: 15%;
    }
    
    .workflow-step {
        min-width: 60px;
    }
    
    .step-label {
        font-size: 11px;
    }
}

/* Event Status Toggle */
.status-toggle-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 200px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 20px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.status-toggle.inactive {
    background: #f8f9fa;
    border-color: #dc3545;
    color: #dc3545;
}

.status-toggle.active {
    background: #d4edda;
    border-color: #28a745;
    color: #28a745;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 32px;
    height: 32px;
    background: #dc3545;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-toggle.active .toggle-slider {
    transform: translateX(160px);
    background: #28a745;
}

.toggle-label {
    flex: 1;
    text-align: center;
    pointer-events: none;
    z-index: 1;
}

.status-help-text {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

.status-help-text .active-help {
    display: none;
}

.status-toggle.active + .status-help-text .inactive-help {
    display: none;
}

.status-toggle.active + .status-help-text .active-help {
    display: inline;
}

.status-toggle:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Org Events Filter Buttons */
.btn-outline {
    background: transparent;
    border: 2px solid #dee2e6;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    border-color: #002f6c;
    color: #002f6c;
    background: rgba(0, 47, 108, 0.05);
}

.btn-outline.active {
    background: #002f6c;
    border-color: #002f6c;
    color: white;
}

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Event Modal Popup */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.event-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.event-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
}

.event-modal-header h2 {
    margin: 0;
    color: #002f6c;
    font-size: 20px;
    font-weight: 600;
}

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

.modal-close-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.event-modal-body {
    padding: 24px;
}

.event-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #002f6c;
}

.detail-item strong {
    color: #002f6c;
    min-width: 80px;
    font-weight: 600;
}

.event-description {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.event-description strong {
    color: #28a745;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.event-description p {
    margin: 0;
    line-height: 1.6;
    color: #495057;
}

.event-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.event-modal-actions .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Calendar Legend Styles */
.calendar-legend {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.legend-header {
    margin-bottom: 12px;
}

.legend-header h4 {
    margin: 0;
    color: #002f6c;
    font-size: 16px;
    font-weight: 600;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    min-width: 120px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
    flex-shrink: 0;
}

.legend-label {
    font-size: 12px;
    color: #495057;
    font-weight: 500;
}

.legend-item.special-indicator {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px dashed #6c757d;
}

.legend-indicator {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .legend-items {
        flex-direction: column;
        gap: 8px;
    }
    
    .legend-item {
        min-width: auto;
        width: 100%;
    }
}

/* Highlighted event from calendar navigation */
.highlighted-event {
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3) !important;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%) !important;
}

.highlighted-event .application-header {
    background: linear-gradient(135deg, #fff3cd 0%, #f8f9fa 100%) !important;
}

/* ========================================
   SIMPLIFIED EVENT FORM STYLES
   ======================================== */

/* Override workflow styles for simplified single-page form */
#add .application-form {
    max-width: 1200px;
    margin: 0 auto;
}

#add .form-group-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#add .section-title {
    color: var(--primary-blue);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

#add .section-icon {
    font-size: 1.1rem;
}

#add .form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    margin: 20px 0;
    border-top: 2px solid #f0f0f0;
}

#add .form-actions:first-child {
    border-top: none;
    margin-top: 0;
}

/* Responsive adjustments for simplified form */
@media (max-width: 768px) {
    #add .form-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #add .form-actions .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Organization Events List Layout */
.org-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.org-events-list .application-card {
    margin-bottom: 8px;
    width: 100%;
}

/* Templates Popup Styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.popup-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s ease-out;
    padding: 0;
}

.popup-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-popup:hover {
    background-color: #e9ecef;
    color: #333;
}

.popup-body {
    padding: 20px;
}

.popup-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
    text-align: center;
    color: #666;
    font-size: 12px;
}

.templates-menu {
    padding: 0 20px;
    margin: 20px 0;
}

.template-content {
    padding: 0 20px 20px 20px;
}

.template-btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.template-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.template-btn.active {
    font-weight: bold;
}

/* Event Timeline Visualization */
.event-timeline-container {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fb 0%, #ffffff 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 47, 108, 0.05);
    overflow: hidden;
}

.timeline-header {
    text-align: center;
    margin-bottom: 25px;
}

.timeline-header h4 {
    color: var(--primary-blue);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
}

.timeline-header p {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0;
}

.event-timeline {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
    padding: 30px 20px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    min-height: 200px;
}

.timeline-line {
    position: absolute;
    top: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-blue) 100%);
    border-radius: 2px;
    z-index: 1;
    /* Position will be set dynamically by JavaScript */
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 140px;
    margin: 0 15px;
    z-index: 2;
    flex-shrink: 0;
}

.timeline-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
    position: relative;
    z-index: 3;
    border: 3px solid white;
    flex-shrink: 0;
}

.timeline-circle::before {
    /* Removed semi-transparent overlay for fully opaque circles */
    display: none;
}

.timeline-circle.start {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-circle.deadline {
    background: linear-gradient(135deg, #FF9800, #f57c00);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-circle.results {
    background: linear-gradient(135deg, var(--primary-blue), #1e40af);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-circle.requirement {
    background: linear-gradient(135deg, #9C27B0, #7b1fa2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-circle.end {
    background: linear-gradient(135deg, #607D8B, #455a64);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-content {
    text-align: center;
    max-width: 140px;
    word-wrap: break-word;
}

.timeline-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 4px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 28px;
}

.timeline-date {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    font-weight: 500;
}

.timeline-description {
    font-size: 10px;
    color: #666;
    line-height: 1.2;
}

.timeline-item.current .timeline-circle {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
    50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
}

/* Today pointer styling */
.today-pointer {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.today-line {
    width: 2px;
    height: 45px; /* Reduced from 50px to avoid crossing the baseline */
    background-color: #dc3545; /* Red color for visibility */
    position: relative;
}

.today-line::before {
    content: '';
    position: absolute;
    top: -4px; /* Reduced from -8px to bring the arrow down */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid #dc3545; /* Red arrow pointing down */
}

.today-date {
    font-size: 11px;
    font-weight: bold;
    color: #dc3545;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 0px; /* Removed gap to bring text closer to line */
}

.today-label {
    display: none; /* Hide the old Today label */
    transform: translateX(-50%);
}

/* Responsive timeline */
@media (max-width: 768px) {
    .event-timeline {
        flex-direction: column;
        padding: 20px 10px;
    }
    
    .timeline-line {
        top: 0;
        bottom: 0;
        left: 50%;
        right: auto;
        width: 3px;
        height: auto;
        background: linear-gradient(180deg, #ddd 0%, var(--primary-blue) 50%, #ddd 100%);
    }
    
    .timeline-item {
        margin: 15px 0;
        min-width: auto;
    }
    
    .timeline-content {
        max-width: 200px;
    }
}

/* === SUBMISSION CHECKLIST STYLES === */

.btn-checklist {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-blue), #1e40af);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-checklist:hover {
    background: linear-gradient(135deg, #1e40af, var(--primary-blue));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-checklist:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.checklist-items {
    max-height: 400px;
    overflow-y: auto;
}

.checklist-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.checklist-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 35px;
    margin: 0;
}

.checklist-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid #9C27B0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checklist-label:hover .checkmark {
    background-color: #f3e5f5;
}

.checklist-checkbox:checked ~ .checkmark {
    background-color: #9C27B0;
    border-color: #9C27B0;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checklist-checkbox:checked ~ .checkmark:after {
    display: block;
}

.checklist-label .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.checklist-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.checklist-text.completed {
    color: #999;
    text-decoration: line-through;
}

/* Scrollbar styling for checklist */
.checklist-items::-webkit-scrollbar {
    width: 8px;
}

.checklist-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.checklist-items::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.checklist-items::-webkit-scrollbar-thumb:hover {
    background: #999;
}

