.progress-container {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.file-status-container {
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.file-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.file-status .filename {
    flex: 1;
    margin-right: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-status .status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background-color: #f3f4f6;
    color: #4b5563;
}

.status-processing {
    background-color: #dbeafe;
    color: #2563eb;
}

.status-success {
    background-color: #dcfce7;
    color: #16a34a;
}

.status-error {
    background-color: #fee2e2;
    color: #dc2626;
}:root {
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --secondary-light: #f472b6;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

.header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 150%, rgba(99, 102, 241, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 80% -50%, rgba(139, 92, 246, 0.6) 0%, transparent 50%);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.brand h1 {
    font-size: 3.5rem;
    margin: 0;
    letter-spacing: -1px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tagline {
    font-size: 1.4rem;
    margin: 15px 0 0;
    opacity: 0.9;
    font-weight: 300;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.intro-section {
    margin-bottom: 60px;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    margin: 0 0 16px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.analyzer-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 60px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.upload-container {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
    border: 2px dashed rgba(99, 102, 241, 0.3);
    padding: 32px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s ease;
}

.upload-container:hover {
    border-color: var(--primary-color);
}

.upload-info {
    flex: 1;
}

.upload-info p {
    font-size: 1.2rem;
    margin: 0 0 8px;
    color: var(--text-primary);
}

.upload-info small {
    color: var(--text-secondary);
}

.upload-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

.button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 40px;
}

.chart-container {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    height: 400px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.transactions {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    max-height: 500px;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
    position: relative; /* Add this */
}

.transactions table {
    width: 100%;
    border-collapse: collapse;
}

.transactions thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg);
}

.transactions th {
    background: var(--card-bg);
    padding: 16px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    text-align: left;
    position: relative; /* For sort indicators */
}

.transactions td {
    padding: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

/* Add shadow to header when scrolled */
.transactions thead::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 5px;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

table {
    width: 100%;
    border-collapse: collapse;
}
thead {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--card-bg);
}

th {
    background: var(--card-bg);
    padding: 16px;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    text-align: left;
    cursor: pointer;
    position: relative;
    padding-right: 25px !important;
}

th:after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    opacity: 0.3;
}

th.sort-asc:after {
    border-bottom: 5px solid var(--primary-color);
    border-top: none;
    opacity: 1;
}

th.sort-desc:after {
    border-top: 5px solid var(--primary-color);
    border-bottom: none;
    opacity: 1;
}

td {
    padding: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

tr:hover {
    background-color: rgba(99, 102, 241, 0.02);
}

.benefits-section {
    margin: 60px 0;
    text-align: center;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.benefit-item {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-item h3 {
    color: var(--primary-color);
    margin: 0 0 16px;
    font-size: 1.3rem;
}

/* Section headers */
h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .upload-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .upload-controls {
        flex-direction: column;
        width: 100%;
    }

    .header {
        padding: 40px 0;
    }

    .brand h1 {
        font-size: 2.5rem;
    }

    .feature-card, .benefit-item {
        padding: 24px;
    }
}

/* Scrollbar styling */
.transactions::-webkit-scrollbar {
    width: 8px;
}

.transactions::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

.transactions::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary-light), var(--accent-color));
    border-radius: 4px;
}

.transactions::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-dark));
}

/* Add these styles to your existing th styles in style.css */
th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px !important; /* Make room for the sort indicator */
}

th:after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

th:hover:after {
    opacity: 0.6;
}

th.sort-asc:after {
    border-bottom: 5px solid var(--primary-color);
    border-top: none;
    opacity: 1;
}

th.sort-desc:after {
    border-top: 5px solid var(--primary-color);
    border-bottom: none;
    opacity: 1;
}

/* Authentication Styles */
.auth-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 0 20px;
}

.auth-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.auth-form .button {
    width: 100%;
    margin-top: 20px;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.form-error {
    background-color: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: var(--border-radius);
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
    margin-top: 20px;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Categories Section Styles */
.categories-section {
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    margin-bottom: 60px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.add-category-form {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.table-container {
    overflow-x: auto;
}

#categoriesTable {
    width: 100%;
    margin-top: 20px;
}

#categoriesTable th {
    padding: 16px;
    font-weight: 600;
    color: var(--primary-color);
    text-align: left;
    border-bottom: 2px solid var(--primary-color);
}

#categoriesTable td {
    padding: 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.edit-button, .delete-button {
    padding: 6px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    border: none;
    transition: all 0.3s ease;
}

.edit-button {
    background-color: #60a5fa;
    color: white;
}

.delete-button {
    background-color: #ef4444;
    color: white;
}

.edit-button:hover {
    background-color: #3b82f6;
}

.delete-button:hover {
    background-color: #dc2626;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.button-save {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.button-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.button-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Add these styles to your style.css */

.edit-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.button-update {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.button-cancel {
    background: white;
    color: var(--text-primary);
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.button-update:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.button-cancel:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.button-update:disabled,
.button-cancel:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}
//Check This
.period-selector {
    margin-top: 20px;
}

.preset-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.button-secondary.active {
    background: var(--primary-color);
    color: white;
}

.custom-date-range {
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.summary-card {
    background: white;
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.summary-card h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.amount {
    font-size: 1.8rem;
    font-weight: 600;
}

.amount.positive {
    color: #059669;
}

.amount.negative {
    color: #dc2626;
}

//Check this complete

.pagination-controls {
    margin-top: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pagination-buttons {
    display: flex;
    gap: 12px;
}

.pagination-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.period-selector {
    margin-top: 20px;
}

.preset-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.button-secondary.active {
    background: var(--primary-color);
    color: white;
}

.custom-date-range {
    background: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

.transactions-container {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: 500px;
}

.transactions-table-wrapper {
    overflow-y: auto;
    flex-grow: 1;
    position: relative;
}

.pagination-controls {
    position: sticky;
    bottom: 0;
    background: var(--card-bg);
    padding: 15px 20px;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    margin-top: auto;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .user-menu {
        gap: 8px;
    }

    .user-menu .button-secondary {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Button Processing States */
.button.processing {
    background-color: #6b7280 !important;
    cursor: not-allowed;
}

.button.success {
    background-color: #10b981 !important;
}

.processing-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.success-icon {
    display: inline-block;
    margin-right: 8px;
    font-weight: bold;
    font-size: 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure button maintains consistent height during state changes */
.button {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}