* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Rose/Amber Color Scheme */
    --primary-rose: #f43f5e;
    --primary-amber: #f59e0b;
    --secondary-rose: #fb7185;
    --secondary-amber: #fbbf24;
    --accent-rose: #e11d48;
    --accent-amber: #d97706;

    /* Timeline Column Colors */
    --rose-25: #fef2f2;
    --rose-50: #fef2f2;
    --rose-100: #fee2e2;
    --rose-200: #fecaca;
    --rose-400: #f87171;
    --rose-700: #be123c;
    --pink-100: #fce7f3;

    /* Status Colors */
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-500: #22c55e;
    --green-700: #15803d;
    --blue-100: #dbeafe;
    --blue-300: #93c5fd;
    --blue-700: #1d4ed8;
    --red-100: #fee2e2;
    --red-300: #fca5a5;
    --red-500: #ef4444;
    --red-700: #b91c1c;
    --yellow-100: #fef3c7;
    --yellow-200: #fde68a;
    --yellow-700: #a16207;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-700: #c2410c;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-rose), var(--primary-amber));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-rose), var(--secondary-amber));
    --gradient-accent: linear-gradient(135deg, var(--accent-rose), var(--accent-amber));

    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Sidebar Navigation */
.sidebar {
    width: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    height: auto;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    overflow-x: auto; /* Add horizontal scroll */
    overflow-y: hidden; /* Prevent vertical scroll */
}

/* Add smooth scrolling and hide scrollbar for cleaner look */
.sidebar::-webkit-scrollbar {
    height: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-200);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-300);
}

.sidebar-header {
    padding: 1rem 2rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 1.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-200);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-300);
}

.sidebar-content {
    flex: 1;
    overflow-x: visible; /* Change from auto to visible */
    /* overflow-y: hidden; Keep vertical hidden */
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    margin-left: 2rem;
    white-space: nowrap; /* Prevent wrapping of nav items */
    flex-wrap: nowrap; /* Ensure items stay in one row */
}

.nav-item {
    margin: 0;
    flex-shrink: 0; /* Prevent nav items from shrinking */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    height: 40px;
    white-space: nowrap; /* Prevent text wrapping */
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
    transform: translateX(0.25rem);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.nav-link i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-top: 120px;
    padding: 2rem;
    background: var(--gray-50);
    width: 100%;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.header-left h1 {
    font-size: 2.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.wedding-date {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.user-profile {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-300);
    transform: translateY(-1px);
}

/* Events Grid */
.events-section {
    margin-bottom: 2rem;
}

.events-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-rose);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.stat-icon i {
    font-size: 1.125rem;
    color: var(--white);
}

.stat-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--gray-600);
    font-size: 0.75rem;
}

/* Network Container */
.network-container {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
    overflow: visible;
}

.network-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.network-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.network-subtitle {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
    margin-bottom: 1rem;
}

/* Category Filter */
.filter-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    margin-top: 1rem;
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0;
    border: none;
    background: none;
    margin-top: 0;
}

.category-filter > label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
    white-space: nowrap;
}

.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background: var(--white);
    color: var(--gray-700);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 200px;
    font-family: inherit;
}

.dropdown-button:hover {
    border-color: var(--primary-rose);
}

.dropdown-button:focus {
    outline: none;
    border-color: var(--primary-rose);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.dropdown-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    margin-top: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-content.show {
    display: block;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    color: var(--gray-700);
}

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

.checkbox-item:hover {
    background: var(--rose-50);
}

.checkbox-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-rose);
    cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked + span {
    color: var(--primary-rose);
    font-weight: 500;
}

.filter-status {
    font-size: 0.75rem;
    color: var(--primary-rose);
    font-weight: 500;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--rose-50);
    border-radius: 0.375rem;
    border: 1px solid var(--rose-200);
}

.network-canvas {
    padding: 1rem;
    background: var(--gray-50);
    min-height: 500px;
}

/* Timeline Scroll Container */
.timeline-scroll-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    min-height: 500px;
    scrollbar-width: thin;
    scrollbar-color: var(--rose-200) var(--rose-50);
}

.timeline-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.timeline-scroll-container::-webkit-scrollbar-track {
    background: var(--rose-50);
    border-radius: 4px;
}

.timeline-scroll-container::-webkit-scrollbar-thumb {
    background: var(--rose-200);
    border-radius: 4px;
}

.timeline-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--rose-300);
}

/* Timeline Columns */
.timeline-column {
    min-width: 200px;
    background: linear-gradient(to bottom, var(--rose-50), var(--rose-25));
    border: 1px solid var(--rose-200);
    border-radius: 0.75rem;
    height: fit-content;
    min-height: 400px;
    transition: all var(--transition-fast);
    position: relative;
}

.timeline-column:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -1rem;
    top: 1.5rem;
    color: var(--rose-400);
    font-size: 1.25rem;
    z-index: 1;
}

.timeline-column.drag-over {
    background: linear-gradient(to bottom, var(--rose-100), var(--rose-75)) !important;
    transform: scale(1.02);
}

.timeline-column .column-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--rose-200);
    background: linear-gradient(to right, var(--rose-100), var(--pink-100));
    border-radius: 0.75rem 0.75rem 0 0;
}

.timeline-column .column-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--rose-700);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.timeline-column .column-badge {
    background: var(--rose-200);
    color: var(--rose-700);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-column .column-content {
    padding: 0.75rem;
}

.timeline-column .empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
    border: 2px dashed var(--gray-200);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.document-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 50px;
    position: relative;
}

.task-container.drag-over {
    background: var(--rose-50);
    border-radius: 0.5rem;
    border: 2px dashed var(--rose-300);
}

/* Task Cards */
.task-card {
    /* padding: 1rem; */
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border-left: 4px solid var(--gray-300);
    background: var(--rose-100);
    transition: all 0.2s;
    border: 1px solid var(--rose-300);
    position: relative;
}

/* Overdue tasks - prominent red border and background */
.task-card.overdue {
    border: 2px solid var(--red-500);
    border-left: 4px solid var(--red-500);
    background: var(--red-50);
    box-shadow: 0 2px 4px 0 rgba(239, 68, 68, 0.2);
}

.task-card.overdue:hover:not(.dragging) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -1px rgba(239, 68, 68, 0.3);
    border-color: var(--red-600);
}

/* Completed tasks */
.task-card.completed {
    background: var(--green-100);
    border-left-color: var(--green-300);
    border-color: var(--green-300);
}

/* Overdue tasks that are completed should not show overdue styling */
.task-card.completed.overdue {
    border: 1px solid var(--green-300);
    border-left: 4px solid var(--green-300);
    background: var(--green-100);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* In Progress tasks - yellow styling */
.task-card.inprogress {
    background: var(--yellow-100);
    border-left-color: var(--yellow-700);
    border-color: var(--yellow-200);
}

.task-card.inprogress:hover:not(.dragging) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(251, 191, 36, 0.2);
}

/* Calendar in-progress tasks */
.calendar-task.inprogress {
    background: var(--yellow-100);
    border-color: var(--yellow-200);
    color: var(--yellow-700);
}

.calendar-task.inprogress:hover {
    background: var(--yellow-200);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
    z-index: 1000;
}

.task-card:hover:not(.dragging) {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.task-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
}

.task-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
    margin: 0;
    flex: 1;
    padding-right: 0.5rem;
}

.task-card-delete {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.task-card-delete:hover {
    color: var(--red-500);
    background: var(--red-50);
}

/* Update the risk indicator styles */
.task-card .risk-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 12px;
    height: 12px;
    background: var(--red-500);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* animation: pulse 2s infinite; */
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Remove the icon styles */
.task-card .risk-indicator i {
    display: none;
}

/* Modal Styles */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal[inert] {
    display: none;
}

/* Add polyfill support for older browsers */
@supports not (selector(:inert)) {
    [inert] {
        pointer-events: none;
        cursor: default;
        user-select: none;
    }
}

/* .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-normal);
} */

.modal-content {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp var(--transition-normal);
}

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

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    background: var(--white);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Notifications */
.notification-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-weight: 500;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-toast i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.notification-toast span {
    flex: 1;
}

.notification-success {
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
}

.notification-error {
    background: linear-gradient(135deg, var(--red-500), var(--red-700));
}

.notification-warning {
    background: linear-gradient(135deg, var(--orange-700), var(--yellow-700));
}

.notification-info {
    background: linear-gradient(135deg, var(--blue-700), var(--primary-rose));
}

/* Legacy notification support (deprecated, will be removed) */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    color: white;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background: var(--green-500);
}

.notification.error {
    background: var(--red-500);
}

.notification.warning {
    background: var(--primary-amber);
}

/* Calendar Styles */
.calendar-content {
    padding: 1rem;
}

.calendar-content .top-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.calendar-controls h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--gray-700);
    min-width: 200px;
    text-align: center;
}

.calendar-grid {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    overflow: hidden;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--rose-50);
    border-bottom: 1px solid var(--rose-200);
}

.calendar-weekdays div {
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: var(--rose-700);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-100);
}

.calendar-day {
    background: var(--white);
    min-height: 80px;
    padding: 0.25rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.calendar-day.other-month {
    background: var(--gray-50);
}

.calendar-day.today {
    background: var(--rose-50);
}

.day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.today .day-number {
    background: var(--rose-500);
    color: var(--white);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-add-task {
    opacity: 0;
    background: none;
    border: none;
    color: var(--rose-500);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all var(--transition-fast);
}

.calendar-day:hover .day-add-task {
    opacity: 1;
}

.day-add-task:hover {
    background: var(--rose-100);
    transform: scale(1.1);
}

.calendar-task {
    font-size: 0.7rem;
    padding: 0.15rem 0.25rem;
    border-radius: 0.25rem;
    background: var(--rose-100);
    border: 1px solid var(--rose-200);
    color: var(--rose-700);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.calendar-task:hover {
    background: var(--rose-200);
    transform: translateY(-1px);
}

/* Calendar overdue tasks */
.calendar-task.overdue {
    background: var(--red-100);
    border-color: var(--red-300);
    color: var(--red-700);
    font-weight: 600;
}

.calendar-task.overdue:hover {
    background: var(--red-200);
}

.calendar-task.completed {
    background: var(--green-100);
    border-color: var(--green-200);
    color: var(--green-700);
    text-decoration: line-through;
}

/* Make sure completed overdue tasks in calendar don't show overdue styling */
.calendar-task.completed.overdue {
    background: var(--green-100);
    border-color: var(--green-200);
    color: var(--green-700);
    text-decoration: line-through;
    font-weight: normal;
}

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

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Budget Page Styles */
.budget-content {
    padding: 1rem;
}

.budget-header {
    margin-top: 1rem;
}

.budget-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.budget-input-group label {
    font-weight: 500;
    color: var(--gray-700);
}

.budget-overview {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.budget-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.budget-chart-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 400px;
}

canvas#budgetPieChart {
    width: 100% !important;
    height: 400px !important;
}

.category-allocation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.allocation-item {
    display: grid;
    grid-template-columns: 1fr 80px;
    align-items: center;
    gap: 1rem;
}

.allocation-slider {
    width: 100%;
    /* -webkit-appearance: none; */
    height: 6px;
    border-radius: 3px;
    background: var(--rose-200);
}

.allocation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--rose-500);
    cursor: pointer;
    transition: all 0.2s;
}

.allocation-slider::-webkit-slider-thumb:hover {
    background: var(--rose-600);
    transform: scale(1.1);
}

.allocation-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    text-align: right;
}

.category-expenses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.category-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
}

.category-card h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.category-amount {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.category-progress {
    width: 100%;
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    margin-top: 0.5rem;
}

.category-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.expenses-list {
    background: var(--white);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    margin-top: 1rem;
}

.expense-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

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

.expense-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.expense-title {
    font-weight: 500;
    color: var(--gray-800);
}

.expense-category {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.expense-amount {
    font-weight: 600;
    color: var(--gray-700);
}

/* Budget Main Grid */
.budget-main-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.5rem; }
.budget-chart-card, .budget-categories-card {
    background: var(--white); border-radius: 0.75rem; padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); border: 1px solid var(--gray-200);
}
.budget-chart-card h2, .budget-categories-card h2, .budget-section h2 {
    font-size: 0.95rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.75rem;
}
.budget-chart-hint { font-size: 0.75rem; color: var(--gray-400); margin-bottom: 0.75rem; margin-top: -0.5rem; }
.budget-chart-wrapper { position: relative; height: fit-content; cursor: pointer; overflow: hidden; }
.budget-section { margin-top: 1.5rem; }
.budget-used-card { display: flex; align-items: center; gap: 1rem; }
.stat-icon-mini-chart { width: 48px; height: 48px; flex-shrink: 0; }
.stat-icon-mini-chart canvas { display: block; }

/* Slice Editor */
.slice-editor {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.85rem;
    margin-top: 0.75rem; background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: 0.5rem; animation: slideIn 0.15s ease;
    position: relative; z-index: 5;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.slice-editor-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.slice-editor-label { font-weight: 600; font-size: 0.875rem; color: var(--gray-700); min-width: 70px; }
.slice-editor-btn {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gray-300);
    background: var(--white); color: var(--gray-700); font-size: 1rem; font-weight: 600;
    cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.slice-editor-btn:hover { background: var(--rose-50); border-color: var(--rose-300); color: var(--rose-600); }
.slice-editor-input { width: 48px; text-align: center; font-size: 0.9rem; font-weight: 600; border: 1px solid var(--gray-300); border-radius: 0.375rem; padding: 0.25rem; }
.slice-editor-input:focus { border-color: var(--rose-400); outline: none; }
.slice-editor-pct { font-size: 0.85rem; color: var(--gray-500); margin-right: 0.5rem; }
.slice-editor-amount { font-size: 0.85rem; color: var(--gray-500); margin-left: auto; }

/* Allocation Rows */
.allocation-row {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.4rem;
    border-radius: 0.375rem; cursor: pointer; transition: background 0.15s;
}
.allocation-row:hover { background: var(--gray-50); }
.allocation-row.active { background: var(--rose-50); }
.allocation-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.allocation-row-name { font-size: 0.85rem; font-weight: 500; color: var(--gray-700); flex: 1; }
.allocation-row-pct { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); min-width: 32px; text-align: right; }
.allocation-row-amount { font-size: 0.8rem; color: var(--gray-500); min-width: 70px; text-align: right; }
.allocation-row-delete {
    background: none; border: none; color: var(--gray-300); cursor: pointer;
    font-size: 0.7rem; padding: 0.15rem 0.3rem; border-radius: 3px; line-height: 1;
    transition: all 0.15s;
}
.allocation-row-delete:hover { color: #ef4444; background: rgba(239,68,68,0.1); }
.add-category-row { justify-content: center; gap: 0.4rem; border-top: 1px dashed var(--gray-200); margin-top: 0.25rem; padding-top: 0.5rem; }
.add-category-row:hover { background: var(--rose-50) !important; }

/* Category Spending Cards */
.category-expenses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.category-spend-card { background: var(--white); border-radius: 0.75rem; padding: 1rem; border: 1px solid var(--gray-200); }
.category-spend-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.category-spend-name { font-weight: 600; font-size: 0.85rem; color: var(--gray-700); display: flex; align-items: center; gap: 0.4rem; }
.category-spend-pct { font-size: 0.75rem; color: var(--gray-500); }
.category-spend-amounts { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--gray-600); margin-bottom: 0.5rem; }
.category-spend-amounts span:first-child { font-weight: 600; color: var(--gray-800); }
.category-spend-bar { width: 100%; height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.category-spend-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }

/* Expenses Table */
.expenses-table { background: var(--white); border-radius: 0.75rem; border: 1px solid var(--gray-200); overflow: hidden; }
.expenses-table-header {
    display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr; padding: 0.65rem 1rem;
    background: var(--gray-50); font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--gray-500); border-bottom: 1px solid var(--gray-200);
}
.expense-sort-header { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 0.3rem; }
.expense-sort-header:hover { color: var(--gray-700); }
.expense-row {
    display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr; padding: 0.75rem 1rem;
    align-items: center; border-bottom: 1px solid var(--gray-100); font-size: 0.875rem; transition: background 0.15s;
}
.expense-row:last-child { border-bottom: none; }
.expense-row-clickable { cursor: pointer; }
.expense-row-clickable:hover { background: var(--rose-50) !important; }
.expense-row-title { font-weight: 500; color: var(--gray-800); }
.expense-row-category { color: var(--gray-600); display: flex; align-items: center; gap: 0.3rem; }
.expense-row-amount { font-weight: 600; color: var(--gray-800); }
.expense-row-receipt { text-align: center; }
.expense-row-receipt a { color: var(--rose-500); font-size: 0.85rem; }
.expenses-empty { padding: 2rem; text-align: center; color: var(--gray-400); font-size: 0.875rem; }
.receipt-row { display: grid; grid-template-columns: 2fr 1fr 1fr 0.5fr; padding: 0.75rem 1rem; align-items: center; border-bottom: 1px solid var(--gray-100); font-size: 0.875rem; }
.receipt-row:last-child { border-bottom: none; }

/* Inline Expense Editor */
.expense-inline-editor { padding: 1rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); animation: slideIn 0.15s ease; }
.expense-editor-row { display: flex; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.expense-editor-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 120px; }
.expense-editor-field label { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); }
.expense-editor-field input, .expense-editor-field select { padding: 0.4rem 0.5rem; border: 1px solid var(--gray-300); border-radius: 0.375rem; font-size: 0.85rem; outline: none; }
.expense-editor-field input:focus, .expense-editor-field select:focus { border-color: var(--rose-400); }
.expense-editor-docs { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; flex: 1; min-width: 120px; align-self: flex-end; }
.expense-editor-doc { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.5rem; background: var(--white); border: 1px solid var(--gray-200); border-radius: 0.25rem; font-size: 0.75rem; }
.expense-editor-doc a { color: var(--rose-600); text-decoration: none; }
.expense-editor-doc-remove { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 0.9rem; padding: 0 0.15rem; line-height: 1; }
.expense-editor-doc-remove:hover { color: #ef4444; }
.expense-editor-actions { display: flex; gap: 0.5rem; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* Assignee Tag Input */
.assignee-tag-container {
    display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.4rem;
    border: 1px solid var(--gray-300); border-radius: 0.375rem; background: var(--white);
    min-height: 38px; align-items: center; cursor: text;
}
.assignee-tag-container:focus-within { border-color: var(--rose-400); box-shadow: 0 0 0 2px rgba(244,114,182,0.15); }
.assignee-tag {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.15rem 0.5rem; background: var(--blue-50, #eff6ff); color: var(--blue-700, #1d4ed8);
    border-radius: 0.25rem; font-size: 0.8rem; font-weight: 500; white-space: nowrap;
}
.assignee-tag-remove {
    background: none; border: none; color: var(--blue-400, #60a5fa); cursor: pointer;
    font-size: 1rem; line-height: 1; padding: 0 0.1rem; margin-left: 0.1rem;
}
.assignee-tag-remove:hover { color: #ef4444; }
.assignee-tag-input {
    border: none; outline: none; font-size: 0.85rem; padding: 0.15rem 0.25rem;
    flex: 1; min-width: 100px; background: transparent; color: var(--gray-700);
}
.assignee-tag-input::placeholder { color: var(--gray-400); }

@media (max-width: 768px) {
    .budget-main-grid { grid-template-columns: 1fr; }
    .category-expenses-grid { grid-template-columns: 1fr; }
}


/* File Upload Styles */
.file-upload-container {
    margin-top: 0.5rem;
}

.file-upload-container input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    border: 1px dashed var(--gray-300);
    border-radius: 0.5rem;
    background: var(--gray-50);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload-container input[type="file"]:hover {
    border-color: var(--primary-rose);
    background: var(--rose-50);
}

.uploaded-files {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.uploaded-file i {
    color: var(--gray-500);
}

.uploaded-file button {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all var(--transition-fast);
}

.uploaded-file button:hover {
    color: var(--red-500);
    background: var(--red-50);
}

/* Budget Documents Section */
.budget-documents {
    background: var(--white);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    margin-top: 2rem;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
}

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

.document-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.document-icon {
    color: var(--gray-500);
}

.document-info {
    display: flex;
    flex-direction: column;
}

.document-title {
    font-weight: 500;
    color: var(--gray-800);
}

.document-task {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-actions button {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all var(--transition-fast);
}

.document-actions button:hover {
    color: var(--rose-500);
    background: var(--rose-50);
}

/* Add these styles at the end of your CSS file */

.expense-documents {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.document-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--rose-50);
    border: 1px solid var(--rose-200);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    color: var(--rose-700);
    text-decoration: none;
    transition: all 0.2s;
}

.document-preview:hover {
    background: var(--rose-100);
    border-color: var(--rose-300);
}

.document-preview i {
    font-size: 0.875rem;
}

.document-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-main {
    display: flex;
    flex-direction: column;
}

/* Risk Considerations Styles */
.risk-considerations {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--orange-50);
    border: 1px solid var(--orange-200);
    border-radius: 0.5rem;
}

.risk-considerations h4 {
    color: var(--orange-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.risk-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 0.375rem;
    border: 1px solid var(--orange-200);
}

.risk-item label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
}

.risk-item input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.checkbox-text {
    flex: 1;
    line-height: 1.5;
}

.risk-question {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 0.375rem;
    border: 1px solid var(--orange-200);
}

.risk-question label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.task-card.has-risks {
    border-left-color: var(--orange-500);
}

.task-card .risk-indicator {
    position: absolute;
    top: -8px;
    left: -8px;
    z-index: 2;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: white; */
    /* border-radius: 50%; */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.task-card .risk-indicator i {
    color: var(--yellow-500);
    font-size: 14px;
}

/* Vendor Contacts Styles */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.vendor-card {
    background: var(--white);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    transition: all var(--transition-fast);
    position: relative;
}

.vendor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--rose-300);
}

.vendor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vendor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--rose-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--rose-500);
}

.vendor-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.vendor-category {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.vendor-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.vendor-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.vendor-detail i {
    color: var(--rose-400);
    width: 1rem;
}

.vendor-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.vendor-actions button {
    background: none;
    border: none;
    color: var(--gray-400);
    padding: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.vendor-actions button:hover {
    background: var(--rose-50);
    color: var(--rose-500);
}

/* Documents Page Styles */
/* Document Filters - matching vendor filters */
.document-filters {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-container i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-container input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.document-filters select,
.vendor-filters select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: var(--white);
    cursor: pointer;
}

.document-filters select:focus,
.vendor-filters select:focus,
.search-container input:focus {
    outline: none;
    border-color: var(--primary-rose);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

.documents-container {
    padding: 0;
    margin: 0;
}

.documents-categories {
    display: none;
}

.category-list h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.category-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-list ul {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.category-list li {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    border: 1px solid var(--gray-200);
    background: var(--white);
}

.category-list li:hover {
    background: var(--rose-50);
    color: var(--rose-700);
    border-color: var(--rose-300);
}

.category-list li.active {
    background: var(--rose-100);
    color: var(--rose-700);
    font-weight: 500;
    border-color: var(--rose-300);
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: var(--white);
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    transition: all var(--transition-fast);
    position: relative;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--rose-300);
}

.document-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    background: var(--rose-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.document-icon i {
    font-size: 1.5rem;
    color: var(--rose-500);
}

.document-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 0.5rem 0;
}

.document-info p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.document-category {
    background: var(--rose-50);
    color: var(--rose-700);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.document-date,
.document-size {
    padding: 0.25rem 0;
}

.document-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.document-actions button,
.document-actions a {
    background: none;
    border: none;
    color: var(--gray-400);
    padding: 0.25rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.document-actions button:hover,
.document-actions a:hover {
    background: var(--rose-50);
    color: var(--rose-500);
}

.file-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Document upload progress */
.upload-progress {
    margin-top: 1rem;
    background: var(--gray-100);
    border-radius: 0.25rem;
    height: 4px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: var(--rose-500);
    transition: width 0.3s ease;
}

/* Empty state for documents */
.documents-grid .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
    border: 2px dashed var(--gray-200);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.empty-state .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Current file info display (for edit mode) */
.current-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--rose-50);
    border: 1px solid var(--rose-200);
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.current-file-info i {
    color: var(--rose-500);
}

.timeline-questions {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--blue-50);
    border-radius: 0.5rem;
}

.timeline-section {
    border: none;
    padding: 0;
    margin: 1.5rem 0;
}

.timeline-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.order-list {
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.sortable-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.sortable-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    margin: 0.25rem 0;
    border-radius: 0.25rem;
    cursor: move;
}

.remove-item {
    border: none;
    background: none;
    color: var(--red-500);
    cursor: pointer;
}

/* Add at the end of the file */

.timeline-content p {
    white-space: pre-line;
    line-height: 1.6;
}

/* ======= TIMELINE — Proportional Block Layout ======= */
.timeline-view {
    background: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
    padding: 1.25rem;
    overflow: hidden;
}

/* Scroll wrapper */
.tl-scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 1rem;
}
.tl-scroll::-webkit-scrollbar { height: 6px; }
.tl-scroll::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* Grid container */
.tl-grid { position: relative; }

/* Hour markers */
.tl-hour {
    position: absolute; left: 0; right: 0;
    display: flex; align-items: flex-start; pointer-events: none; z-index: 1;
}
.tl-hour-lbl {
    width: 68px; flex-shrink: 0;
    font-size: 0.7rem; font-weight: 700; color: var(--gray-400);
    text-align: right; padding-right: 8px;
    transform: translateY(-0.45em);
    letter-spacing: 0.02em;
}
.tl-hour-line {
    flex: 1; height: 1px; background: var(--gray-200);
}
.tl-half-hour {
    position: absolute; left: 76px; right: 0; height: 1px;
    background: var(--gray-100); pointer-events: none; z-index: 0;
}

/* Event blocks */
.tl-block {
    position: absolute;
    border-radius: 0.45rem;
    border-left: 4px solid;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.12s;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    z-index: 2;
}
.tl-block:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
    transform: translateY(-1px) scale(1.015);
    z-index: 20;
}

/* Block internals */
.tl-block-top {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 0.25rem;
}
.tl-block-title {
    font-size: 0.78rem; font-weight: 700; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.tl-block-time {
    font-size: 0.68rem; opacity: 0.7; margin-top: 0.1rem;
    display: flex; align-items: center; gap: 0.25rem;
}
.tl-block-time i { font-size: 0.6rem; }
.tl-block-meta {
    font-size: 0.65rem; opacity: 0.65;
    display: flex; align-items: center; gap: 0.2rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tl-block-meta i { font-size: 0.55rem; }
.tl-block-note {
    font-size: 0.65rem; opacity: 0.5; margin-top: auto;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Source badge */
.tl-src-badge {
    font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    background: rgba(0,0,0,0.08); padding: 0.08rem 0.35rem; border-radius: 0.2rem;
    white-space: nowrap; flex-shrink: 0;
}

/* Delete button */
.tl-del {
    background: none; border: none; cursor: pointer; color: inherit;
    opacity: 0; font-size: 0.65rem; padding: 0.1rem 0.2rem; border-radius: 3px;
    transition: all 0.15s; flex-shrink: 0;
}
.tl-block:hover .tl-del { opacity: 0.4; }
.tl-del:hover { opacity: 1 !important; background: rgba(0,0,0,0.12); }

/* Assignee avatars */
.tl-avatars {
    display: flex; gap: 0.15rem; margin-top: auto; padding-top: 0.2rem;
    flex-wrap: wrap;
}
.tl-av {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.58rem; font-weight: 800;
    background: rgba(255,255,255,0.75); color: inherit;
    border: 1.5px solid currentColor; flex-shrink: 0;
    line-height: 1;
}

/* Responsive */
@media (max-width: 640px) {
    .tl-block { padding: 0.3rem 0.45rem; }
    .tl-block-title { font-size: 0.72rem; }
}

.vendor-tag, .location-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background: var(--blue-100);
    color: var(--blue-700);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}

.location-tag {
    background: var(--green-100);
    color: var(--green-700);
}

/* .pro-tip-container {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
} */

.pro-tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--blue-700);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.pro-tip-content {
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}