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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.navbar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: #2563eb;
    font-size: 1.5rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.privacy-toggle {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.privacy-toggle:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.privacy-toggle.active {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.privacy-icon {
    display: inline-block;
    transition: transform 0.2s ease;
}

.privacy-toggle.active .privacy-icon {
    transform: scale(0.8);
    opacity: 0.8;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.nav-btn:hover {
    background-color: #f3f4f6;
    text-decoration: none;
}

.nav-btn.active {
    background-color: #2563eb;
    color: white;
}

.nav-btn:visited {
    color: inherit;
}

.main-content {
    padding: 2rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 2rem;
    color: #1f2937;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
}

.net-worth-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
}

.net-worth-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.net-worth-amount {
    font-size: 3rem;
    font-weight: bold;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.accounts-summary {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.accounts-summary h3 {
    margin: 0;
    color: #1f2937;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.cashflow-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cashflow-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.cashflow-card h3 {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.amount {
    font-size: 1.5rem;
    font-weight: bold;
}

.amount.positive {
    color: #10b981;
}

.amount.negative {
    color: #ef4444;
}

.cashflow-tabs-wrapper {
    position: relative;
}

.tabs-scroll-hint {
    display: none;
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    animation: fadeInPulse 2s ease-in-out infinite;
}

@keyframes fadeInPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.cashflow-tabs {
    display: flex;
    background: white;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    background: #f9fafb;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.tab-btn.active {
    background: white;
    color: #2563eb;
    font-weight: 600;
}

.tab-content {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-pane {
    display: none;
    padding: 2rem;
}

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.currency-selector label {
    font-weight: 500;
    color: #374151;
}

.currency-selector select,
.date-format-selector select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

.date-format-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-format-selector label {
    font-weight: 500;
    color: #374151;
}

.export-controls {
    display: flex;
    gap: 0.5rem;
}

.time-controls select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.file-upload {
    margin-bottom: 2rem;
}

.upload-label {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: #2563eb;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-label:hover {
    background-color: #1d4ed8;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.account-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-info h4 {
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.account-info p {
    color: #6b7280;
    font-size: 0.875rem;
}

.account-balance {
    font-size: 1.25rem;
    font-weight: bold;
    position: relative;
}

.account-balance[data-editable="true"] {
    cursor: pointer;
}

.account-balance .balance-display {
    display: inline-block;
}

.account-balance .balance-input {
    font-size: 1.25rem;
    font-weight: bold;
    border: 2px solid #2563eb;
    border-radius: 4px;
    padding: 0.25rem;
    background: white;
    color: inherit;
    width: 120px;
    text-align: right;
}

.account-balance .edit-hint {
    font-size: 0.875rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.account-balance[data-editable="true"]:hover .edit-hint {
    opacity: 1;
}

.account-balance .balance-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Table cell inline editing */
td[data-editable="true"] {
    cursor: pointer;
    position: relative;
}

td .balance-display {
    display: inline-block;
}

td .balance-input {
    font-size: inherit;
    font-weight: inherit;
    border: 2px solid #2563eb;
    border-radius: 4px;
    padding: 0.25rem;
    background: white;
    color: inherit;
    width: 100px;
    text-align: right;
}

td .edit-hint {
    font-size: 0.75rem;
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

td[data-editable="true"]:hover .edit-hint {
    opacity: 1;
}

td .balance-input:focus {
    outline: none;
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
.footer {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 3rem;
    padding: 2rem 0;
    color: #64748b;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.footer-disclaimer {
    background: #e0f2fe;
    border: 1px solid #0891b2;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.footer-disclaimer p {
    margin: 0;
    color: #0c4a6e;
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer-disclaimer strong {
    color: #0369a1;
}

.footer-copyright {
    font-size: 0.875rem;
    color: #64748b;
}

.footer-copyright p {
    margin: 0;
}

/* User Tour */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
    z-index: 10001;
}

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

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

.tour-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.tour-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tour-body {
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
}

.tour-step {
    width: 100%;
}

.tour-step p {
    font-size: 1rem;
    line-height: 1.6;
    color: #374151;
    margin: 0;
}

.tour-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.tour-progress {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.tour-controls {
    display: flex;
    gap: 0.75rem;
}

.tour-highlight {
    position: absolute;
    border: 3px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 9999;
}

.tour-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
    z-index: 1000;
}

.tour-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

/* Tour responsive */
@media (max-width: 768px) {
    .tour-content {
        width: 95%;
        max-width: none;
    }
    
    .tour-header {
        padding: 1rem;
    }
    
    .tour-body {
        padding: 1.5rem;
        min-height: 150px;
    }
    
    .tour-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .tour-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .tour-trigger {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

.account-item {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.account-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.table tbody tr:hover {
    background-color: #f9fafb;
}

/* Account Details Page Styles */
.account-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-title h2 {
    margin: 0;
    font-size: 1.75rem;
}

.account-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.account-balance-display {
    text-align: right;
}

.balance-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.balance-amount {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
}

.account-transactions {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}

.transactions-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transactions-header h3 {
    margin: 0;
    color: #1f2937;
}

.transaction-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.transaction-filters select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

.date-range-filter, .amount-range-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range-filter label, .amount-range-filter label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.date-range-filter input, .amount-range-filter input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    width: 120px;
}

.cashflow-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.category-chart-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.chart-type-selector, .category-data-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-type-selector label, .category-data-selector label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.chart-type-selector select, .category-data-selector select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

/* Sortable table headers */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: #f3f4f6;
}

.sort-indicator {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.sortable-table {
    width: 100%;
}

.sortable-table th.sortable {
    padding: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

/* Table totals */
.table-total {
    background-color: #f9fafb;
    border-top: 2px solid #e5e7eb;
    font-weight: 600;
}

.table-total td {
    padding: 0.75rem;
    border-bottom: none;
}

.total-amount {
    text-align: right;
    font-size: 1.1rem;
    white-space: nowrap;
    min-width: 180px;
}

.table tfoot {
    background-color: #f9fafb;
}

/* Privacy mode - hide numbers */
.privacy-mode .amount,
.privacy-mode .balance-amount,
.privacy-mode .stat-value,
.privacy-mode .total-amount,
.privacy-mode .account-balance,
.privacy-mode .net-worth-amount,
.privacy-mode .positive,
.privacy-mode .negative,
.privacy-mode .cashflow-card .amount,
.privacy-mode td:last-child {
    color: transparent !important;
    background: repeating-linear-gradient(
        90deg,
        #d1d5db 0px,
        #d1d5db 4px,
        transparent 4px,
        transparent 8px
    ) !important;
    border-radius: 4px;
    position: relative;
}

.privacy-mode .amount::after,
.privacy-mode .balance-amount::after,
.privacy-mode .stat-value::after,
.privacy-mode .total-amount::after,
.privacy-mode .account-balance::after,
.privacy-mode .net-worth-amount::after,
.privacy-mode .positive::after,
.privacy-mode .negative::after,
.privacy-mode .cashflow-card .amount::after {
    content: "••••";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6b7280;
    font-weight: bold;
    background: transparent;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #e5e7eb;
    color: #374151;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.category-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 0.75rem;
    min-width: 120px;
    cursor: pointer;
}

.category-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.category-select option {
    padding: 0.25rem;
}

#accountTransactionsList {
    max-height: 500px;
    overflow-y: auto;
}

.account-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #2563eb;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #9ca3af;
}

.breadcrumb-current {
    color: #1f2937;
    font-weight: 500;
}

.mapping-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.mapping-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mapping-row label {
    min-width: 150px;
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.mapping-row select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.875rem;
}

.import-file-preview {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.import-file-preview h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.import-file-preview p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.rolling-update-analysis {
    margin-bottom: 1rem;
}

.analysis-info {
    background-color: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.analysis-info h6 {
    margin: 0 0 0.5rem 0;
    color: #0369a1;
    font-weight: 600;
}

.analysis-info p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #374151;
}

.rolling-update-checkbox {
    margin-right: 0.5rem;
}

/* Mobile-friendly table styles */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Resizable columns */
.table-resizable {
    table-layout: fixed;
    width: 100%;
}

/* Text truncation for table cells */
.table-resizable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Override truncation for mobile card view */
.table-mobile-cards.card-view td {
    overflow: visible;
    text-overflow: initial;
    white-space: normal;
}

/* Enhanced truncation styling */
.description-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Visual indicator for truncated text */
.description-cell[data-truncated="true"] .description-text::after {
    content: '...';
    color: #6b7280;
    font-weight: normal;
}

/* Description column specific styling */
.table-resizable td[data-label="Description"] {
    position: relative;
    cursor: help;
}

.table-resizable td[data-label="Description"]:hover {
    background-color: #f9fafb;
}

/* Account name truncation for dashboard */
.table-resizable td[data-label="Account"] {
    position: relative;
}

.table-resizable td[data-label="Account"]:hover {
    background-color: #f9fafb;
}

/* Tooltip for truncated text */
.text-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.4;
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.text-tooltip.show {
    opacity: 1;
}

.text-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #1f2937;
}

/* Flipped arrow for tooltips that appear below */
.text-tooltip[style*="--arrow-direction: up"]::before {
    top: auto;
    bottom: -4px;
    border-bottom: none;
    border-top: 4px solid #1f2937;
}

.table-resizable th {
    position: relative;
    user-select: none;
    cursor: pointer;
}

.table-resizable th:hover {
    background-color: #f9fafb;
}

.table-resizable th[title] {
    position: relative;
}

.table-resizable th:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

.column-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.column-resizer:hover {
    background-color: #2563eb;
}

.column-resizer.resizing {
    background-color: #1d4ed8;
}

/* Column width controls */
.column-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Hide column controls in card view */
.table-with-pagination:has(.table-mobile-cards.card-view) .column-controls {
    display: none;
}

.column-controls label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.column-width-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.column-width-control input[type="range"] {
    width: 100px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.column-width-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
}

.column-width-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #2563eb;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.column-width-value {
    font-size: 0.75rem;
    color: #6b7280;
    min-width: 35px;
}

.reset-columns-btn {
    background: #6b7280;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.reset-columns-btn:hover {
    background: #4b5563;
}

/* Responsive column controls */
@media (max-width: 1024px) and (min-width: 769px) {
    .column-controls {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .column-width-control {
        flex: 1;
        min-width: 200px;
    }
    
    .column-width-control input[type="range"] {
        width: 80px;
    }
}

.table-responsive {
    min-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile view toggle */
.mobile-view-toggle {
    display: none;
    margin-bottom: 1rem;
    text-align: center;
}

.scroll-hint {
    display: none;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .mobile-view-toggle {
        display: block;
    }
    
    /* Hide column controls on mobile */
    .column-controls {
        display: none;
    }
    
    .view-toggle-btn {
        background: #f3f4f6;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        padding: 0.5rem 1rem;
        margin: 0 0.25rem;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 0.875rem;
    }
    
    .view-toggle-btn.active {
        background: #2563eb;
        color: white;
        border-color: #2563eb;
    }
    
    .view-toggle-btn:hover:not(.active) {
        background: #e5e7eb;
    }

    /* Mobile card layout for tables */
    .table-mobile-cards.card-view {
        display: block;
    }
    
    .table-mobile-cards.table-view {
        display: table;
        width: 100%;
        min-width: 600px;
    }
    
    .table-container:has(.table-mobile-cards.table-view) .scroll-hint {
        display: block;
    }
    
    /* Fallback for browsers that don't support :has() */
    .table-mobile-cards.table-view + .scroll-hint,
    .table-container .scroll-hint {
        margin-bottom: 0.5rem;
    }
    
    .table-mobile-cards.table-view thead {
        display: table-header-group;
    }
    
    .table-mobile-cards.table-view tbody {
        display: table-row-group;
    }
    
    .table-mobile-cards.table-view tr {
        display: table-row;
        background: transparent;
        border: none;
        border-radius: 0;
        margin-bottom: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .table-mobile-cards.table-view td {
        display: table-cell;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.75rem;
        text-align: left;
        position: static;
        padding-left: 0.75rem;
    }
    
    .table-mobile-cards.table-view td:before {
        display: none;
    }
    
    .table-mobile-cards.card-view {
        display: block;
    }
    
    .table-mobile-cards thead {
        display: none;
    }
    
    .table-mobile-cards tbody {
        display: block;
    }
    
    .table-mobile-cards tr {
        display: block;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1.25rem; /* Increased padding for better spacing */
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        cursor: default;
    }
    
    .table-mobile-cards tr:hover {
        background-color: white !important;
    }
    
    .table-mobile-cards td {
        display: block;
        border: none;
        padding: 0.75rem 0; /* Increased padding for better spacing */
        text-align: left !important;
        position: relative;
        padding-left: 35%; /* Reduced to give more space for content */
        cursor: default;
        min-height: 1.5em; /* Ensure consistent height */
        border-bottom: 1px solid #f3f4f6; /* Subtle separator between fields */
    }
    
    .table-mobile-cards td:last-child {
        border-bottom: none; /* Remove border from last field */
    }
    
    .table-mobile-cards td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 30%; /* Reduced width to match padding-left adjustment */
        font-weight: 600;
        color: #374151;
        text-align: left;
        line-height: 1.5;
        padding-top: 0.1em; /* Slight adjustment for better alignment */
    }
    
    .table-mobile-cards .table-total {
        background-color: #f9fafb;
        border: 2px solid #e5e7eb;
        margin-top: 1rem;
    }
    
    .table-mobile-cards .table-total td {
        padding-left: 0;
        text-align: center !important;
        font-weight: 600;
    }
    
    .table-mobile-cards .table-total td:before {
        display: none;
    }
    
    /* Mobile-specific improvements for form elements in cards */
    .table-mobile-cards .category-select {
        width: 100%;
        max-width: none;
        margin-top: 0.5rem;
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 6px;
        border: 1px solid #d1d5db;
    }
    
    .table-mobile-cards.card-view .category-select {
        margin-top: 0.5rem;
    }
    
    /* Mobile card view - allow text wrapping for descriptions */
    .table-mobile-cards.card-view td[data-label="Description"] {
        white-space: normal;
        word-wrap: break-word;
        overflow: visible;
        text-overflow: initial;
    }
    
    .table-mobile-cards.card-view .description-text {
        display: block;
        max-height: 4.5em; /* Increased from 3em to 4.5em for more text */
        overflow: hidden;
        line-height: 1.5; /* Improved line height for better readability */
        position: relative;
        word-break: break-word;
    }
    
    .table-mobile-cards.card-view .description-text::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 25px; /* Reduced width for less intrusive fade */
        height: 1.5em;
        background: linear-gradient(to right, transparent, white);
        pointer-events: none;
    }
    
    /* Ensure amounts are never truncated in mobile card view */
    .table-mobile-cards.card-view td[data-label="Amount"] {
        white-space: nowrap;
        overflow: visible;
        text-overflow: initial;
        font-weight: 700;
        font-size: 1.2rem;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
    
    /* Make amount more prominent with better spacing */
    .table-mobile-cards.card-view td[data-label="Amount"]:before {
        font-size: 0.875rem;
        color: #6b7280;
        margin-bottom: 0.25rem;
    }
    
    /* Ensure dates are also not truncated */
    .table-mobile-cards.card-view td[data-label="Date"] {
        white-space: nowrap;
        overflow: visible;
        text-overflow: initial;
    }
    
    /* Special layout for description in mobile cards */
    .table-mobile-cards.card-view td[data-label="Description"] {
        padding-left: 0; /* Remove left padding for description */
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .table-mobile-cards.card-view td[data-label="Description"]:before {
        position: static; /* Make label appear above description */
        width: auto;
        display: block;
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
        color: #6b7280;
    }
    
    .table-mobile-cards .balance-input {
        width: 100%;
        max-width: 200px;
        margin-top: 0.25rem;
    }
    
    .table-mobile-cards .edit-hint {
        display: block;
        margin-top: 0.25rem;
    }
    
    /* Action buttons in mobile cards */
    .table-mobile-cards .table-delete-btn,
    .table-mobile-cards .delete-account-btn {
        margin-top: 0.5rem;
        width: auto;
        min-width: 3rem;
    }
    
    /* Duplicate badge improvements on mobile */
    .table-mobile-cards .duplicate-badge {
        display: inline-block;
        margin-top: 0.5rem;
        margin-left: 0;
        width: fit-content;
    }
    
    .table-mobile-cards.card-view .duplicate-badge {
        display: block;
        margin-top: 0.5rem;
        width: fit-content;
    }
    
    /* Better spacing for amounts in mobile cards */
    .table-mobile-cards .positive,
    .table-mobile-cards .negative {
        font-weight: 600;
        font-size: 1.1rem;
    }
    
    /* Improve sortable headers visibility on mobile table view */
    .table-mobile-cards.table-view .sortable {
        background-color: #f9fafb;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    /* Better horizontal scroll indicator */
    .table-container::-webkit-scrollbar {
        height: 8px;
    }
    
    .table-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    
    .table-container::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }
    
    .table-container::-webkit-scrollbar-thumb:hover {
        background: #a1a1a1;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
    }
    
    .nav-controls {
        order: -1;
        align-self: flex-end;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .cashflow-summary {
        grid-template-columns: 1fr;
    }
    
    .header-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .currency-selector {
        order: 2;
    }
    
    .date-format-selector {
        order: 3;
    }
    
    .export-controls {
        order: 1;
        flex-wrap: wrap;
    }
    
    .accounts-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .account-header-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .account-balance-display {
        text-align: left;
        margin-top: 1rem;
    }
    
    .transactions-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .transaction-controls {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .transaction-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .transaction-filters select {
        width: 100%;
    }
    
    .date-range-filter, .amount-range-filter {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .date-range-filter input, .amount-range-filter input {
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .cashflow-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .category-chart-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .chart-type-selector, .category-data-selector {
        width: 100%;
        justify-content: space-between;
    }
    
    .chart-type-selector select, .category-data-selector select {
        flex: 1;
        max-width: 200px;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-disclaimer {
        text-align: left;
    }
    
    .footer-disclaimer p {
        font-size: 0.8125rem;
    }
    
    .mapping-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mapping-row label {
        min-width: auto;
        width: 100%;
    }
    
    .mapping-row select {
        width: 100%;
    }
    
    /* Mobile table improvements */
    .table-with-pagination {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table {
        min-width: 600px; /* Ensure table has minimum width for horizontal scroll */
    }
    
    /* Category select improvements on mobile */
    .category-select {
        min-width: 100px;
        max-width: 150px;
    }
    
    /* Action buttons in tables */
    .table-delete-btn, .delete-account-btn {
        min-width: 2rem;
        padding: 0.25rem;
    }
    
    /* Improve touch targets on mobile */
    .btn {
        min-height: 44px; /* Apple's recommended minimum touch target */
        padding: 0.75rem 1rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
    }
    
    /* Better spacing for mobile forms */
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-group input,
    .form-group select {
        padding: 1rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    /* Improve modal on mobile */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Better pagination on mobile */
    .pagination-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem;
    }
    
    /* Improve navigation on mobile */
    .nav-btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Better spacing for cashflow tabs */
    .tab-btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Make cashflow tabs horizontally scrollable on mobile */
    .tabs-scroll-hint {
        display: block;
    }
    
    .cashflow-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        border-radius: 12px 12px 0 0;
        scroll-behavior: smooth;
    }
    
    .cashflow-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .cashflow-tabs::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .cashflow-tabs::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        text-align: center;
        border-right: 1px solid #e5e7eb;
    }
    
    .tab-btn:last-child {
        border-right: none;
    }
    
    /* Add visual indicators for scrollable tabs */
    .cashflow-tabs-wrapper::before,
    .cashflow-tabs-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 20px;
        pointer-events: none;
        z-index: 10;
        transition: opacity 0.3s ease;
    }
    
    .cashflow-tabs-wrapper::before {
        left: 0;
        background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
        opacity: 0;
    }
    
    .cashflow-tabs-wrapper::after {
        right: 0;
        background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
        opacity: 1;
    }
    
    /* Show/hide gradient indicators based on scroll position */
    .cashflow-tabs-wrapper.can-scroll-left::before {
        opacity: 1;
    }
    
    .cashflow-tabs-wrapper.can-scroll-right::after {
        opacity: 1;
    }
    
    /* Improve filter controls spacing */
    .cashflow-filters,
    .transaction-filters {
        gap: 1rem;
    }
    
    .cashflow-filters > *,
    .transaction-filters > * {
        margin-bottom: 0.5rem;
    }
}
/* Pag
ination Styles */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.page-size-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

.pagination-summary {
    font-size: 0.9rem;
    color: #6b7280;
    white-space: nowrap;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    min-width: 2.5rem;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9fafb;
}

.pagination-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination-btn.page-number {
    min-width: 2.5rem;
}

.pagination-ellipsis {
    padding: 0.5rem 0.25rem;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .pagination-info {
        justify-content: center;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 2rem;
    }
    
    .pagination-summary {
        text-align: center;
        width: 100%;
    }
}

/* Table container with pagination */
.table-with-pagination {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.table-with-pagination .table {
    margin-bottom: 0;
}

.table-with-pagination .pagination-container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid #e5e7eb;
}/* Accou
nts list with pagination */
.accounts-with-pagination {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.accounts-with-pagination .pagination-container {
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid #e5e7eb;
}/* Acco
unt Actions and Delete Button Styles */
.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.account-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.account-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    cursor: pointer;
}

.account-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.delete-account-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    min-width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-account-btn:hover:not(.disabled) {
    background: #dc2626;
    transform: scale(1.05);
}

.delete-account-btn.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.delete-account-btn.disabled:hover {
    transform: none;
}

/* Account Details Header Actions */
.account-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-danger:disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-danger.disabled {
    background: #9ca3af;
    border-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive adjustments for account items */
@media (max-width: 768px) {
    .account-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .account-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .account-actions {
        justify-content: center;
        margin-left: 0;
    }
    
    .account-header-actions {
        justify-content: center;
        margin-left: 0;
        margin-top: 1rem;
    }
}

/* Account details page header adjustments */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.account-header-info {
    flex: 1;
    min-width: 0;
}

.account-balance-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .account-balance-display {
        align-items: center;
        text-align: center;
    }
}/* 
Table delete button styles */
.table-delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-delete-btn:hover:not(.disabled) {
    background: #dc2626;
    transform: scale(1.05);
}

.table-delete-btn.disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.table-delete-btn.disabled:hover {
    transform: none;
}

/* Prevent row click when clicking delete button */
.table td {
    position: relative;
}

.table .delete-account-btn,
.table .table-delete-btn {
    z-index: 10;
    position: relative;
}

/* Duplicate Transaction Styles */
.duplicate-transaction {
    background-color: #fef3c7 !important;
    opacity: 0.7;
}

.duplicate-transaction:hover {
    background-color: #fde68a !important;
    opacity: 0.9;
}

.duplicate-badge {
    background: #f59e0b;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.duplicate-amount {
    text-decoration: line-through;
    opacity: 0.6;
}

.duplicate-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.duplicate-toggle label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.duplicate-toggle input[type="checkbox"] {
    margin: 0;
}

/* Duplicate tab specific styles */
#duplicates .cashflow-filters {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

#duplicates .btn-warning {
    background: #f59e0b;
    color: white;
    border: 1px solid #f59e0b;
}

#duplicates .btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}

/* Transaction filter adjustments */
.transaction-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.transaction-filters > * {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .transaction-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .duplicate-toggle {
        justify-content: center;
    }
}/* Ti
meframe Indicator Styles */
.timeframe-indicator {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.timeframe-label {
    font-size: 0.9rem;
    color: #374151;
}

.timeframe-label strong {
    color: #1f2937;
    font-weight: 600;
}

/* Responsive timeframe indicator */
@media (max-width: 768px) {
    .timeframe-indicator {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}/* 
Demo Controls Styling */
.demo-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #e5e7eb;
}

.demo-controls .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.demo-controls .btn-primary {
    background-color: #059669;
    border-color: #059669;
}

.demo-controls .btn-primary:hover {
    background-color: #047857;
    border-color: #047857;
}

.demo-controls .btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.demo-controls .btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Responsive adjustments for demo controls */
@media (max-width: 768px) {
    .demo-controls {
        flex-direction: column;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .demo-controls .btn {
        width: 100%;
        text-align: center;
    }
}/* 
Multi-Currency Support Styling */
.account-currency {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
    margin-top: 2px;
}

.edit-currency-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.edit-currency-btn:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.exchange-rate-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #e5e7eb;
}

.rate-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.rate-status.success {
    background: #d1fae5;
    color: #065f46;
}

.rate-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.rate-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.rate-status.updating {
    background: #dbeafe;
    color: #1e40af;
}

/* Currency selector enhancements */
.currency-selector label {
    font-weight: 500;
    margin-right: 0.5rem;
}

.currency-selector select {
    min-width: 120px;
}

/* Account form currency field */
#accountCurrency {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* Multi-currency balance display */
.account-balance {
    font-size: 0.9rem;
    line-height: 1.2;
}

.account-balance small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* Responsive adjustments for currency info */
@media (max-width: 768px) {
    .exchange-rate-info {
        flex-direction: column;
        align-items: flex-start;
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid #e5e7eb;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .rate-status {
        font-size: 0.7rem;
    }
    
    .account-currency {
        font-size: 0.75rem;
    }
}/
* Settings Page Styling */
.settings-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.settings-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section h3 {
    margin: 0 0 1.5rem 0;
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.setting-item select {
    width: 100%;
    max-width: 300px;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
}

.setting-description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Privacy Toggle Switch */
.privacy-setting {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #d1d5db;
    border-radius: 24px;
    margin-right: 0.75rem;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: #2563eb;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

/* Data Controls */
.data-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.data-controls .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Demo Controls in Settings */
.settings-section .demo-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.settings-section .demo-controls .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.settings-section .btn-success {
    background-color: #059669;
    border-color: #059669;
    color: white;
}

.settings-section .btn-success:hover {
    background-color: #047857;
    border-color: #047857;
}

/* Exchange Rate Info in Settings */
.settings-section .exchange-rate-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.settings-section .exchange-rate-info .btn {
    margin: 0;
}

.settings-section .rate-status {
    font-size: 0.875rem;
}

/* Responsive Settings */
@media (max-width: 768px) {
    .settings-content {
        padding: 0 0.5rem;
    }
    
    .settings-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .data-controls,
    .settings-section .demo-controls,
    .settings-section .exchange-rate-info {
        flex-direction: column;
    }
    
    .data-controls .btn,
    .settings-section .demo-controls .btn {
        width: 100%;
        text-align: center;
    }
    
    .setting-item select {
        max-width: 100%;
    }
}

/* Settings page specific currency selector */
.settings-section .currency-selector select {
    max-width: 400px;
}

.settings-section .date-format-selector select {
    max-width: 200px;
}