/* Enhanced Navigation and File Management Styles */

/* Enhanced Navigation */
.nav-group {
    position: relative;
}

.nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    z-index: 1000;
    padding: 8px 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-group:hover .nav-submenu,
.nav-group.submenu-open .nav-submenu {
    display: block;
    opacity: 0.95; /* Increased opacity to 95% for better visibility */
    transform: translateY(0);
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-group .nav-link::after {
    content: '\f107'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-group.submenu-open .nav-link::after {
    transform: rotate(180deg);
}

/* Enhanced Notifications and Interactive Elements */

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

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

.notification-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background: var(--hover-bg);
}

/* Notification Types */
.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

/* Edit Mode Styles */
.card.editing {
    border: 2px solid var(--primary-color);
    background: var(--card-bg);
}

.card.editing .editable-field {
    margin-bottom: 12px;
}

.edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: var(--input-bg);
    color: var(--text-color);
    transition: border-color 0.2s ease;
}

.edit-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(103, 58, 183, 0.1);
}

/* Enhanced Task Styles */
.task-item.completed {
    background: rgba(16, 185, 129, 0.05);
    border-left: 3px solid #10b981;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.task-completed-at {
    color: #10b981;
    font-size: 12px;
    font-weight: 500;
}

/* Enhanced Activity Feed */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

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

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

.activity-icon.completed {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.activity-icon.uncompleted {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Progress Bar Enhancements */
.progress-bar {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 24px;
    margin-bottom: 16px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
    color: var(--text-color);
}

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

/* Enhanced Buttons */
.btn {
    transition: all 0.2s ease;
}

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

.btn:active {
    transform: translateY(0);
}

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

/* Enhanced Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.metric-item {
    text-align: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.metric-item:hover {
    background: var(--hover-bg);
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* CSS Variables for themes */
:root {
    --input-bg: #ffffff;
    --hover-bg: #f3f4f6;
}

/* Dark Theme Enhancements */
[data-theme="dark"] {
    --input-bg: #374151;
    --hover-bg: #374151;
}

[data-theme="dark"] .edit-input {
    background: var(--input-bg);
    border-color: #4b5563;
}

[data-theme="dark"] .edit-input:focus {
    border-color: var(--primary-color);
}

[data-theme="dark"] .notification {
    background: #1f2937;
    border-color: #374151;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
    
    .edit-input {
        font-size: 16px; /* Prevent zoom on mobile */
    }
}

.nav-sublink {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
}

.nav-sublink:last-child {
    border-bottom: none;
}

.nav-sublink:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.nav-sublink i {
    margin-right: 8px;
    width: 16px;
    font-size: 14px;
}

/* Enhanced Team Status Styles */
.team-member {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.member-summary {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.member-summary:hover {
    background: var(--hover-bg);
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.member-task {
    font-size: 14px;
    color: var(--text-secondary);
}

.member-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 12px;
}

.status-on-track {
    background: #d4edda;
    color: #155724;
}

.expand-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.expand-arrow i {
    font-size: 14px;
}

.member-details {
    padding: 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.member-details.hidden {
    display: none;
}

.member-role,
.member-progress,
.member-deadline {
    margin-bottom: 12px;
    font-size: 14px;
}

.member-activities {
    margin-bottom: 16px;
}

.member-activities ul {
    margin: 8px 0 0 20px;
    font-size: 14px;
}

.member-activities li {
    margin-bottom: 4px;
    color: var(--text-secondary);
}

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

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

/* Enhanced Recent Activity Styles */
.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    animation: slideInFromTop 0.3s ease-out;
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.activity-icon.completed {
    background: #d4edda;
    color: #155724;
}

.activity-icon.uncompleted {
    background: #f8d7da;
    color: #721c24;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 4px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
}

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

/* Enhanced Editable Content Styles */
.editable-field {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.editable-field:hover {
    background: var(--hover-bg);
    border-color: var(--border-color);
}

.editable-field label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
}

.editable-content {
    display: inline-block;
    min-width: 150px;
    padding: 6px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.editable-content.editing {
    background: var(--bg-card);
    border: 1px solid var(--accent-color);
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.editable-content:focus {
    outline: none;
}

.edit-hint {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
}

.goals-content {
    padding: 16px 0;
}

.progress-bar {
    background: var(--bg-secondary);
    border-radius: 8px;
    height: 24px;
    position: relative;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea, #764ba2);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 8px;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 1;
}

/* Enhanced Role Management Styles */
.role-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.role-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.role-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: background 0.2s ease;
}

.role-header:hover {
    background: var(--hover-bg);
}

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

.role-title i {
    color: var(--accent-color);
    font-size: 18px;
}

.role-title h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 16px;
}

.role-percentage {
    background: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.role-details {
    padding: 20px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.role-details.hidden {
    display: none;
}

.role-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.tab-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-color);
    color: white;
}

.tab-pane {
    display: none;
}

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

.tab-pane h5 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.tab-pane ul {
    margin: 0 0 16px 20px;
    font-size: 14px;
}

.tab-pane li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.daily-schedule {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 16px;
}

.day-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

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

.day-item strong {
    color: var(--text-primary);
}

/* Enhanced Campaign Timeline Styles */
.campaign-overview {
    margin-bottom: 30px;
}

.campaign-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.phase-current h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.timeline-container {
    space-y: 16px;
}

.phase-section {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.phase-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.phase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: background 0.2s ease;
}

.phase-header:hover {
    background: var(--hover-bg);
}

.phase-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.phase-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.phase-details h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
}

.phase-duration {
    color: var(--text-secondary);
    font-size: 14px;
}

.phase-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phase-status.current {
    background: #d4edda;
    color: #155724;
}

.phase-status.upcoming {
    background: #fff3cd;
    color: #856404;
}

.phase-status.future {
    background: #d1ecf1;
    color: #0c5460;
}

.phase-content {
    padding: 24px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.phase-content.hidden {
    display: none;
}

.month-sections {
    space-y: 16px;
}

.month-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: background 0.2s ease;
}

.month-header:hover {
    background: var(--hover-bg);
}

.month-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.month-content {
    padding: 16px;
    background: var(--bg-card);
}

.month-content.hidden {
    display: none;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.week-item {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.week-item h5 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 14px;
}

.task-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tasks-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.completion-rate {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-color);
}

.launch-timeline,
.momentum-activities {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
}

.critical-tasks {
    margin-top: 16px;
}

.critical-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-secondary);
}

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

.critical-item strong {
    color: var(--text-primary);
}
.modal-content.large {
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
    height: 800px;
}

.file-breadcrumbs {
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    margin: 0 0 16px 0;
    border: 1px solid var(--border-light);
}

.file-breadcrumbs nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

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

.breadcrumb-item.current {
    color: var(--text-primary);
    cursor: default;
    font-weight: 500;
}

.breadcrumb-item.current:hover {
    background: none;
    color: var(--text-primary);
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 12px;
}

.file-type-badge {
    font-size: 18px;
    margin-right: 8px;
}

/* Enhanced Controls */
.enhanced-controls {
    display: flex;
    gap: 8px;
    margin-right: 16px;
}

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

/* Adaptive File Container */
.adaptive-file-container {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.table-of-contents.collapsed {
    max-height: 50px;
}

.toc-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary-color);
    color: white;
    margin: 0;
}

.toc-header h4 {
    margin: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.toc-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toc-content {
    padding: 16px;
    max-height: 150px;
    overflow-y: auto;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin: 4px 0;
}

.toc-item.level-1 { padding-left: 0; }
.toc-item.level-2 { padding-left: 16px; }
.toc-item.level-3 { padding-left: 32px; }
.toc-item.level-4 { padding-left: 48px; }
.toc-item.level-5 { padding-left: 64px; }
.toc-item.level-6 { padding-left: 80px; }

.toc-item a {
    display: block;
    padding: 4px 8px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.toc-item a:hover {
    background: var(--primary-color);
    color: white;
}

/* Collapsible Sections */
.collapsible-sections {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.expandable-section {
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.expandable-section.highlighted {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.section-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.section-header:hover {
    background: var(--bg-hover);
}

.section-header.task-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid var(--primary-color);
}

.section-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: var(--text-primary);
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.section-header:hover .section-controls {
    opacity: 1;
}

.section-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.section-content {
    padding: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.section-content.expanded {
    max-height: 2000px;
    padding: 16px;
}

/* Task Progress */
.task-progress {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

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

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Task Controls */
.btn-task {
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 11px;
    padding: 4px 8px;
}

.btn-task:hover {
    background: var(--primary-dark);
}

/* Interactive Content */
.interactive-content {
    padding: 16px;
}

.interactive-content input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    cursor: pointer;
}

.interactive-content li.completed {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Enhanced Tables */
.enhanced-table {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 16px 0;
}

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

.enhanced-table th {
    background: var(--bg-secondary);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    position: relative;
}

.enhanced-table th:hover {
    background: var(--bg-hover);
}

.enhanced-table th::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid var(--text-muted);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.enhanced-table th:hover::after {
    opacity: 1;
}

.enhanced-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
}

/* Continuous Content */
.continuous-content {
    padding: 16px;
    line-height: 1.6;
}

.continuous-content h1,
.continuous-content h2,
.continuous-content h3,
.continuous-content h4,
.continuous-content h5,
.continuous-content h6 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.continuous-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.continuous-content ul,
.continuous-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.continuous-content li {
    margin-bottom: 8px;
}

/* Search Results Enhancements */
.search-results-list {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.search-result-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-header {
    background: var(--bg-secondary);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-title {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
}

.result-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.result-score {
    font-size: 12px;
    color: var(--text-muted);
}

.result-content {
    padding: 16px;
}

.matching-sections {
    max-height: 200px;
    overflow-y: auto;
}

.matching-section {
    margin-bottom: 12px;
    padding: 8px;
    background: var(--bg-light);
    border-radius: 4px;
}

.matching-section h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: var(--text-primary);
}

.matching-section p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.result-actions {
    padding: 12px 16px;
    background: var(--bg-light);
    display: flex;
    gap: 8px;
}

/* Search highlighting */
mark {
    background: var(--warning-color);
    color: var(--text-primary);
    padding: 1px 2px;
    border-radius: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content.large {
        max-width: 95vw;
        max-height: 95vh;
        width: auto;
        height: auto;
    }
    
    .file-breadcrumbs nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .section-controls {
        opacity: 1;
        flex-wrap: wrap;
    }
    
    .enhanced-controls {
        flex-wrap: wrap;
    }
    
    .toc-content {
        max-height: 100px;
    }
}

/* Enhanced Modals */
.modal.large .modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: 1200px;
    height: 800px;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.file-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-controls .btn {
    padding: 6px 12px;
    font-size: 14px;
}

/* File Viewer Styles */
.file-viewer-content {
    padding: 20px;
    height: calc(100% - 140px);
    overflow-y: auto;
}

.file-section {
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.section-header:hover {
    background: var(--bg-hover);
}

.section-title {
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.section-toggle {
    margin-right: 12px;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.section-toggle.fa-chevron-down {
    transform: rotate(90deg);
}

.section-controls {
    display: flex;
    gap: 8px;
}

.section-content {
    padding: 20px;
    background: var(--card-bg);
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

.section-editor {
    width: 100%;
    min-height: 200px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
}

.editor-controls {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

/* Search Modal Styles */
.search-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.search-input-large {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.search-input-large:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-results {
    max-height: 500px;
    overflow-y: auto;
}

.search-summary {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 16px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-result-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.result-title {
    margin: 0;
    color: var(--text-primary);
}

.result-category {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
}

.result-score {
    font-size: 12px;
    color: var(--text-secondary);
}

.result-content {
    padding: 16px 20px;
}

.matching-sections {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.matching-section {
    padding: 12px;
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.matching-section h5 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.matching-section p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.result-actions {
    padding: 12px 20px;
    background: var(--bg-light);
    display: flex;
    gap: 8px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Content Tab Styles */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.content-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 250px;
}

.content-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: calc(100vh - 120px);
}

.content-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px;
}

.content-main {
    padding: 20px;
    overflow-y: auto;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.category-item:hover,
.category-item.active {
    background: var(--primary-color);
    color: white;
}

.category-item i {
    margin-right: 12px;
    width: 16px;
}

.content-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.content-file-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.file-header h3 {
    margin: 0;
    color: var(--text-primary);
    text-transform: capitalize;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-preview {
    padding: 16px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 200px;
    overflow: hidden;
}

/* Campaign Tab Styles */
.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.campaign-controls {
    display: flex;
    gap: 12px;
}

.timeline-overview {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

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

.stat {
    text-align: center;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 6px;
}

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

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.phase-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s ease;
}

.phase-item:hover {
    transform: translateY(-2px);
}

.phase-item h4 {
    margin: 0 0 12px 0;
    color: var(--primary-color);
}

.phase-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.task-badge {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Implementation Tab Styles */
.implementation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.implementation-status {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
}

.status-badge.complete {
    background: var(--success-color);
    color: white;
}

.implementation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}

.implementation-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: var(--success-color);
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.checklist-item:hover {
    background: var(--bg-light);
}

.checklist-item.completed {
    opacity: 0.7;
}

.checklist-item.completed .item-text {
    text-decoration: line-through;
}

.item-text {
    font-weight: 500;
    color: var(--text-primary);
}

.item-description {
    margin: 4px 0 0 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.docs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.doc-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: transform 0.2s ease;
}

.doc-item:hover {
    transform: translateY(-2px);
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.doc-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.doc-description {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Enhanced Button Styles */
.btn.btn-small {
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.2;
}

/* Highlight styles for search */
mark {
    background: #fff3cd;
    color: #856404;
    padding: 2px 4px;
    border-radius: 2px;
}

/* Dark theme adjustments */
[data-theme="dark"] mark {
    background: #664d03;
    color: #fff3cd;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .nav-submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding: 0;
        background: transparent;
    }
    
    .nav-group.active .nav-submenu {
        display: block;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .content-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .implementation-grid {
        grid-template-columns: 1fr;
    }
    
    .modal.large .modal-content {
        width: 95vw;
        height: 95vh;
        max-width: none;
        max-height: none;
    }
    
    .timeline-stats {
        grid-template-columns: 1fr;
    }
    
    .phases-list {
        grid-template-columns: 1fr;
    }
    
    .content-files {
        grid-template-columns: 1fr;
    }
}

/* Animation for loading states */
.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading-content i {
    animation: spin 1s linear infinite;
    margin-right: 12px;
}

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

/* Enhanced form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-color), 0.1);
}

/* File content styling */
.file-content pre {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.file-content h1,
.file-content h2,
.file-content h3,
.file-content h4,
.file-content h5,
.file-content h6 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.file-content h1 {
    font-size: 28px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.file-content h2 {
    font-size: 24px;
}

.file-content h3 {
    font-size: 20px;
}

.file-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.file-content ul,
.file-content ol {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    padding-left: 24px;
}

.file-content blockquote {
    border-left: 4px solid var(--primary-color);
    margin: 16px 0;
    padding: 12px 20px;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-style: italic;
}

.file-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.file-content table th,
.file-content table td {
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    text-align: left;
}

.file-content table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.file-content table td {
    color: var(--text-secondary);
}

.file-content code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}