/* ============================================================================
   ACTION LOG REDESIGN - Complete Styling
   Card-Based UI with Modern Design
   ============================================================================ */

/* ============================================================================
   IMPROVED COLOR PALETTE
   ============================================================================ */
:root {
    /* Traditional status colors: Red (overdue), Yellow (in progress), Green (completed) */
    --action-overdue: #DC3545;
    --action-overdue-bg: #FFEBEE;
    --action-overdue-border: #EF5350;

    --action-warning: #F57C00;
    --action-warning-bg: #FFF3E0;

    --action-in-progress: #FFC107;
    --action-in-progress-bg: #FFF9E6;

    --action-completed: #28A745;
    --action-completed-bg: #E8F5E9;

    --action-pinned: #7B1FA2;
    --action-pinned-bg: #F3E5F5;

    --action-priority-high: #FF6F00;
}

/* ============================================================================
   MINIMAL STICKY HEADER
   ============================================================================ */
.timeline-header-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}

.btn-filter-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-filter-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-filter-panel svg {
    flex-shrink: 0;
}

/* ============================================================================
   FILTER PANEL (SLIDE-OUT)
   ============================================================================ */
.filter-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.filter-panel.open {
    right: 0;
}

.filter-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.filter-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.filter-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    border-bottom: 3px solid #F56E7B;
}

.filter-panel-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.filter-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.filter-panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.filter-panel-content {
    padding: 1.5rem 2rem 2rem 2rem;
}

/* ============================================================================
   FILTER SECTIONS
   ============================================================================ */
.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #F0F0F0;
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section-title {
    display: block;
    font-weight: 700;
    font-size: 1.05rem;
    color: #2C3E50;
    margin-bottom: 1rem;
}

/* Search Box in Panel */
.filter-section .search-box {
    position: relative;
    width: 100%;
}

.filter-section .search-box input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.filter-section .search-box input:focus {
    outline: none;
    border-color: #667EEA;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Checkboxes */
.filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #F8F9FA;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.filter-checkbox-label:hover {
    background: #E9ECEF;
    border-color: #667EEA;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667EEA;
}

.filter-checkbox-label span {
    font-size: 0.95rem;
    color: #2C3E50;
    font-weight: 500;
}

/* Select Groups */
.filter-selects {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-select-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-select-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #6C757D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #667EEA;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Action Buttons */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-action-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #F8F9FA;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2C3E50;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.filter-action-btn:hover {
    background: #667EEA;
    color: white;
    border-color: #667EEA;
    transform: translateX(4px);
}

/* ============================================================================
   TIMELINE SECTIONS CONTAINER
   ============================================================================ */
#timeline-sections-container {
    padding-top: 0 !important; /* Removed all padding to eliminate white space */
    margin-top: 0 !important;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .filter-panel {
        width: 100%;
        right: -100%;
    }
}

/* ============================================================================
   ACTION SECTION HEADERS
   ============================================================================ */
.action-section {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.action-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    position: relative;
}

.action-section-header:hover {
    opacity: 0.95;
}

.action-section-header.overdue {
    background: linear-gradient(135deg, var(--action-overdue) 0%, #C82333 100%);
    color: white;
}

.action-section-header.in-progress {
    background: linear-gradient(135deg, var(--action-in-progress) 0%, #E0A800 100%);
    color: #333;
}

.action-section-header.completed {
    background: linear-gradient(135deg, var(--action-completed) 0%, #218838 100%);
    color: white;
}

.action-section-header.pinned {
    background: linear-gradient(135deg, var(--action-pinned) 0%, #6A1B9A 100%);
    color: white;
}

.action-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    flex-shrink: 0;
}

.action-section-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.action-section-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 1rem;
}

.action-section-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.action-section-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.action-section-progress-text {
    font-size: 0.85rem;
    opacity: 0.9;
    white-space: nowrap;
}

.action-section-toggle {
    font-size: 1.3rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.action-section-toggle.collapsed {
    transform: rotate(-90deg);
}

.action-section-body {
    display: none;
    padding: 1rem;
}

.action-section-body.expanded {
    display: block;
}

/* ============================================================================
   ACTION CARDS GRID
   ============================================================================ */
.action-cards-grid {
    display: grid;
    gap: 1rem;
    padding: 4px; /* Prevent border/shadow cutoff on hover */
}

/* ============================================================================
   ACTION CARD
   ============================================================================ */
.action-card {
    background: white;
    border-radius: 10px;
    border-left: 5px solid transparent;
    padding: 1.25rem;
    transition: all 0.2s;
    position: relative;
}

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

.action-card.selected {
    background: #F8F9FA;
    box-shadow: 0 0 0 2px #667EEA;
}

/* Card status styling */
.action-card.overdue {
    border-left-color: var(--action-overdue);
    background: linear-gradient(90deg, var(--action-overdue-bg) 0%, white 5%);
}

.action-card.in-progress {
    border-left-color: var(--action-in-progress);
    background: linear-gradient(90deg, var(--action-in-progress-bg) 0%, white 5%);
}

.action-card.completed {
    border-left-color: var(--action-completed);
    background: linear-gradient(90deg, var(--action-completed-bg) 0%, white 5%);
    opacity: 0.85;
}

.action-card.pinned {
    border-left-color: var(--action-pinned);
    background: linear-gradient(90deg, var(--action-pinned-bg) 0%, white 5%);
}

.action-card.priority-high {
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(255, 111, 0, 0.15);
}

/* Card header */
.action-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.action-card-checkbox-wrapper {
    flex-shrink: 0;
    padding-top: 0.2rem;
}

.action-card-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667EEA;
}

.action-card-main {
    flex: 1;
    min-width: 0;
}

.action-card-top-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.action-card-id {
    background: #667EEA;
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.action-card-priority-high {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    animation: pulse-priority 2s infinite;
}

.action-card-priority-medium {
    background: linear-gradient(135deg, #ffd93d, #ffb700);
    color: #2C3E50;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.action-card-priority-low {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

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

.action-card-pinned {
    font-size: 1rem;
    color: var(--action-pinned);
}

.action-card-time {
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.action-card-time.overdue {
    background: var(--action-overdue-bg);
    color: var(--action-overdue);
    animation: pulse-overdue 2s infinite;
}

.action-card-time.due-today {
    background: var(--action-warning-bg);
    color: var(--action-warning);
}

.action-card-time.due-soon {
    background: var(--action-warning-bg);
    color: var(--action-warning);
}

.action-card-time.due-week {
    background: #E8F5E9;
    color: #2E7D32;
}

.action-card-time.due-later {
    background: #F5F5F5;
    color: #757575;
}

.action-card-time.no-date {
    background: #FFF9C4;
    color: #F57F17;
}

@keyframes pulse-overdue {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(211, 47, 47, 0);
    }
}

.action-card-menu-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: #9E9E9E;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: auto;
}

.action-card-menu-btn:hover {
    background: #F5F5F5;
    color: #424242;
}

.action-card-description {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2C3E50;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.action-card-description:hover {
    color: #667EEA;
}

.action-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-card-owners {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.action-card-owner-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-card-owner-badge {
    background: #667EEA;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-card-no-owner {
    font-size: 0.85rem;
    color: #9E9E9E;
    font-style: italic;
}

.action-card-due-date {
    font-size: 0.85rem;
    color: #757575;
}

.action-card-expand-btn {
    flex-shrink: 0;
    font-size: 1.2rem;
    color: #9E9E9E;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s;
}

.action-card-expand-btn:hover {
    color: #424242;
    background: #F5F5F5;
    border-radius: 4px;
}

/* Expanded card content */
.action-card-expanded {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 2px dashed #E0E0E0;
}

.action-card-detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.action-card-detail-label {
    font-weight: 700;
    color: #616161;
    font-size: 0.9rem;
}

.action-card-detail-value {
    color: #424242;
    line-height: 1.6;
}

.action-card-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.action-card-status-badge.overdue {
    background: var(--action-overdue-bg);
    color: var(--action-overdue);
}

.action-card-status-badge.in-progress {
    background: var(--action-in-progress-bg);
    color: var(--action-in-progress);
}

.action-card-status-badge.completed {
    background: var(--action-completed-bg);
    color: var(--action-completed);
}

.action-card-expanded-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.action-card-btn {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card-btn-edit {
    background: #667EEA;
    color: white;
}

.action-card-btn-edit:hover {
    background: #5568D3;
}

.action-card-btn-complete {
    background: var(--action-completed);
    color: white;
}

.action-card-btn-complete:hover {
    background: #2E7D32;
}

.action-card-btn-delete {
    background: var(--action-overdue);
    color: white;
}

.action-card-btn-delete:hover {
    background: #C62828;
}

/* ============================================================================
   ACTION CARD MENU (Context Menu)
   ============================================================================ */
.action-card-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
}

.action-card-menu-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    color: #424242;
}

.action-card-menu-item:hover {
    background: #F5F5F5;
}

.action-card-menu-item.danger {
    color: var(--action-overdue);
}

.action-card-menu-item.danger:hover {
    background: var(--action-overdue-bg);
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */
.action-empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.action-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.action-empty-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 0.75rem;
}

.action-empty-message {
    font-size: 1rem;
    color: #6C757D;
    line-height: 1.6;
}

.action-empty-message a {
    color: #667EEA;
    text-decoration: none;
    font-weight: 600;
}

.action-empty-message a:hover {
    text-decoration: underline;
}

/* ============================================================================
   BULK ACTIONS BAR
   ============================================================================ */
.bulk-actions-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.bulk-actions-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.bulk-actions-count {
    font-weight: 700;
    font-size: 1.1rem;
}

.bulk-actions-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.bulk-action-btn {
    padding: 0.65rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bulk-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.bulk-action-btn.danger {
    background: var(--action-overdue);
    border-color: var(--action-overdue);
}

.bulk-action-btn.danger:hover {
    background: #C62828;
    border-color: #C62828;
}

.bulk-action-btn.secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
}

.bulk-action-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */
@media (max-width: 768px) {
    .action-section-header {
        padding: 1rem;
        flex-wrap: wrap;
    }

    .action-section-progress {
        order: 3;
        width: 100%;
        margin: 0.75rem 0 0 0;
    }

    .action-card {
        padding: 1rem;
    }

    .action-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .action-card-top-row {
        width: 100%;
    }

    .action-card-detail-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .action-card-expanded-actions {
        flex-direction: column;
    }

    .action-card-btn {
        width: 100%;
    }

    .bulk-actions-content {
        flex-direction: column;
        align-items: stretch;
    }

    .bulk-actions-buttons {
        flex-direction: column;
    }

    .bulk-action-btn {
        width: 100%;
    }
}

/* ============================================================================
   QUICK FILTERS UI
   ============================================================================ */
.action-quick-filters {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-quick-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-quick-filter input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667EEA;
}

.action-quick-filter label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #424242;
    cursor: pointer;
}

/* ============================================================================
   GROUPING & SORTING CONTROLS
   ============================================================================ */
.action-controls-bar {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-control-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-control-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #616161;
}

.action-control-select {
    padding: 0.5rem 0.75rem;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.action-control-select:focus {
    outline: none;
    border-color: #667EEA;
}

.action-control-select:hover {
    border-color: #BDBDBD;
}

/* ============================================================================
   SEARCH CLEAR BUTTON
   ============================================================================ */
.search-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9e9e9e;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 2;
}

.search-clear-btn:hover {
    color: #DC3545;
}

.search-clear-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Override search input padding to make room for clear button */
.search-box input {
    padding-right: 3rem !important;
}

/* ============================================================================
   HEADER TOP ROW - Title and Menu
   ============================================================================ */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.timeline-title {
    margin: 0;
    font-size: 1.5rem;
}

/* ============================================================================
   ACTION MENU HAMBURGER DROPDOWN
   ============================================================================ */
.action-menu-dropdown {
    position: relative;
    display: inline-block;
}

.btn-action-menu {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.btn-action-menu:hover {
    background: linear-gradient(135deg, #5568d3, #6a3f8f);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.action-menu-item {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
    color: #2C3E50;
    font-size: 0.9rem;
}

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

.action-menu-item:hover {
    background: linear-gradient(135deg, #f8f9ff, #f3f4ff);
    color: #667eea;
}

/* Reduce overall header padding and spacing */
.timeline-header {
    padding: 0.75rem 1rem !important;
}

.action-quick-filters {
    margin-bottom: 0.5rem !important;
}

.action-controls-bar {
    margin-bottom: 0.5rem !important;
}
/* ============================================================================
   EDIT ACTION MODAL
   ============================================================================ */
.action-edit-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.action-edit-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

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

.action-edit-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E0E0E0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
}

.action-edit-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.action-edit-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-edit-modal-close:hover {
    opacity: 1;
}

.action-edit-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.edit-field {
    margin-bottom: 1.25rem;
}

.edit-field:last-child {
    margin-bottom: 0;
}

.edit-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.edit-field input,
.edit-field textarea,
.edit-field select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #DDD;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.edit-field input:focus,
.edit-field textarea:focus,
.edit-field select:focus {
    outline: none;
    border-color: #667EEA;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.edit-field textarea {
    resize: vertical;
    min-height: 80px;
}

.action-edit-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #E0E0E0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #F8F9FA;
}

.action-edit-modal-footer button {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.action-edit-modal-footer .btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #DDD;
}

.action-edit-modal-footer .btn-secondary:hover {
    background: #F5F5F5;
    border-color: #CCC;
}

.action-edit-modal-footer .btn-primary {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
}

.action-edit-modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* ============================================================================
   MODERN DATE INPUT & SELECT
   ============================================================================ */

.modern-date-input {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 10px 12px !important;
    color: #1F2937 !important;
}

.modern-select {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 10px 12px !important;
    color: #1F2937 !important;
    cursor: pointer;
}

/* ============================================================================
   PRIORITY SELECTOR
   ============================================================================ */

.priority-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.priority-btn {
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
}

.priority-btn:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.priority-btn.active {
    border-width: 2px;
}

.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

/* Priority Colors */
.priority-low .priority-dot {
    background: #10B981;
}

.priority-low.active {
    background: #ECFDF5;
    border-color: #10B981;
    color: #065F46;
}

.priority-medium .priority-dot {
    background: #F59E0B;
}

.priority-medium.active {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}

.priority-high .priority-dot {
    background: #EF4444;
}

.priority-high.active {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #991B1B;
}

.priority-critical .priority-dot {
    background: #8B5CF6;
}

.priority-critical.active {
    background: #F3E8FF;
    border-color: #8B5CF6;
    color: #5B21B6;
}
