/* ==========================================================================
   AuraFinance Dashboard CSS Stylesheet - Modern Glassmorphism Dark System
   ========================================================================== */

:root {
    /* Color Palette Variables */
    --bg-app: #080c16;
    --bg-sidebar: #0d1324;
    --bg-card: rgba(17, 24, 43, 0.7);
    --bg-card-hover: rgba(23, 33, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.16);

    /* Core Branding Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.2);
    
    --danger: #f43f5e;
    --danger-glow: rgba(244, 63, 94, 0.2);
    
    --info: #06b6d4;
    --info-glow: rgba(6, 182, 212, 0.2);
    
    --warning: #fbbf24;
    --warning-glow: rgba(251, 191, 36, 0.2);

    /* Typography Color Variables */
    --text-main: #f8fafc;
    --text-sub: #cbd5e1;
    --text-muted: #64748b;
    --text-dark: #0f172a;

    /* Styling Parameters */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Font Configurations */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   RESET & SYSTEM INITIALIZATION
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Elegant Muted Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-muted {
    color: var(--text-muted);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   LAYOUT STRUCTURE (STICKY SIDEBAR + SPLIT VIEW)
   ========================================================================== */
.app-container {
    display: flex;
    min-height: calc(100vh - 38px);
    position: relative;
}

/* Persistent Disclaimer Banner */
.disclaimer-bar {
    background: rgba(245, 158, 11, 0.15);
    border-bottom: 1px solid rgba(245, 158, 11, 0.25);
    color: #f59e0b;
    padding: 10px 24px;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 9999;
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    line-height: 1.4;
    height: 38px;
}

/* SIDEBAR STYLES */
.sidebar {
    width: 340px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 38px);
    position: sticky;
    top: 38px;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.brand-icon {
    background: linear-gradient(135deg, var(--primary), var(--info));
    color: white;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-icon i {
    width: 22px;
    height: 22px;
}

.sidebar-brand h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.sub-brand {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--info);
    display: block;
    margin-top: -2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 28px;
    flex-grow: 1;
}

.nav-section-title {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.nav-section {
    display: flex;
    flex-direction: column;
}

.system-actions {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    gap: 12px;
}

/* MAIN CONTENT AREA */
.main-content {
    flex: 1;
    padding: 32px 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-intro h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.badge-status {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    position: relative;
}

.status-indicator.online {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   METRIC SUMMARY CARDS
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.metric-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-hover);
}

.card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.card-value {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin: 2px 0;
}

.card-subtext {
    font-size: 11px;
    color: var(--text-muted);
}

.card-ambient-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    top: -50px;
    right: -50px;
    filter: blur(40px);
    opacity: 0.15;
    z-index: 1;
    transition: opacity var(--transition-normal);
}

.metric-card:hover .card-ambient-glow {
    opacity: 0.25;
}

/* Specific Card Styling */
.card-income .card-icon-wrapper {
    background-color: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.card-income .card-ambient-glow { background-color: var(--success); }

.card-expense .card-icon-wrapper {
    background-color: rgba(244, 63, 94, 0.12);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}
.card-expense .card-ambient-glow { background-color: var(--danger); }

.card-investment .card-icon-wrapper {
    background-color: rgba(6, 182, 212, 0.12);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.2);
}
.card-investment .card-ambient-glow { background-color: var(--info); }

.card-net .card-icon-wrapper {
    background-color: rgba(99, 102, 241, 0.12);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}
.card-net .card-ambient-glow { background-color: var(--primary); }


/* ==========================================================================
   CSV INGESTION / UPLOAD STYLING
   ========================================================================== */
.csv-upload-card {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
    position: relative;
}

.csv-upload-card:hover, .csv-upload-card.drag-over {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    margin-bottom: 10px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.csv-upload-card:hover .upload-icon {
    color: var(--primary);
    transform: translateY(-2px);
}

.upload-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    margin-bottom: 4px;
}

.upload-text .highlight {
    color: var(--primary);
    font-weight: 600;
}

.file-info-text {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.hidden-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ==========================================================================
   FORMS & INPUT ELEMENT CUSTOMIZATION
   ========================================================================== */
.transaction-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
}

input, select {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    padding: 10px 14px;
    font-family: var(--font-body);
    font-size: 13px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    width: 100%;
}

input:hover, select:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background-color: rgba(255, 255, 255, 0.06);
}

input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

/* Form validation styling */
.form-group.invalid input, 
.form-group.invalid select {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px var(--danger-glow);
}

.error-msg {
    color: var(--danger);
    font-size: 11px;
    margin-top: 2px;
    display: none;
}

.form-group.invalid .error-msg {
    display: block;
}

/* Category Suggestions Wrapper */
.category-input-wrapper {
    position: relative;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    outline: none;
}

.btn-block {
    width: 100%;
}

.btn i {
    width: 16px;
    height: 16px;
}

/* Primary Brand Button */
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 16px var(--primary-glow);
    transform: translateY(-1px);
}

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

/* Secondary Actions Button */
.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Danger Button */
.btn-danger-outline {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger-outline:hover {
    background-color: rgba(244, 63, 94, 0.08);
    border-color: var(--danger);
}

/* Icon Only Pagination Buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-sub);
}

.btn-icon:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ==========================================================================
   GLASS PANELS & ANALYTICS VISUALIZATIONS
   ========================================================================== */
.glass-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    transition: border-color var(--transition-normal);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

/* CHARTS GRID */
.charts-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.9fr;
    gap: 24px;
}

.chart-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

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

.chart-header h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.chart-badge {
    background-color: rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.chart-container {
    position: relative;
    flex: 1;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chart Empty State Overlays */
.chart-empty-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 20px;
    z-index: 10;
    background-color: var(--bg-sidebar);
    border-radius: var(--radius-md);
}

.empty-icon {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.chart-empty-state p {
    font-size: 13px;
    color: var(--text-sub);
    max-width: 220px;
}


/* ==========================================================================
   LEDGER SECTION & HISTORICAL LOGS
   ========================================================================== */
.ledger-section {
    padding: 28px;
}

.ledger-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.ledger-title-group h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.ledger-title-group p {
    font-size: 12px;
    margin-top: 2px;
}

/* Ledger Filtering Controls */
.ledger-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* Keyword Search */
.search-input-wrapper {
    position: relative;
    flex-grow: 1;
    min-width: 240px;
}

.search-input-wrapper input {
    padding-left: 40px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Date Filters */
.filter-group {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    gap: 8px;
}

.filter-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.filter-group input[type="date"] {
    background-color: transparent;
    border: none;
    padding: 4px 6px;
    font-size: 12px;
    width: auto;
    outline: none;
}

.filter-group input[type="date"]:focus {
    box-shadow: none;
}

.filter-sep {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

.btn-clear-date {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 50%;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-clear-date:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.btn-clear-date i {
    width: 14px;
    height: 14px;
}

/* Select Filters */
.filter-select {
    width: auto;
    min-width: 130px;
}

/* LEDGER TABLE CANVAS */
.table-container {
    width: 100%;
    overflow-x: auto;
    position: relative;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-color);
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.ledger-table th, 
.ledger-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.ledger-table th {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: rgba(255, 255, 255, 0.02);
    user-select: none;
}

.ledger-table th.sortable {
    cursor: pointer;
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.ledger-table th.sortable:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.04);
}

.sort-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    opacity: 0.6;
}

.ledger-table tbody tr {
    transition: background-color var(--transition-fast);
}

.ledger-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Style Rows based on Type */
.ledger-table tbody tr.row-income {
    border-left: 3px solid var(--success);
}
.ledger-table tbody tr.row-expense {
    border-left: 3px solid var(--danger);
}
.ledger-table tbody tr.row-investment {
    border-left: 3px solid var(--info);
}

/* Badges */
.badge-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
}

.badge-type.income {
    background-color: rgba(16, 185, 129, 0.08);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.badge-type.expense {
    background-color: rgba(244, 63, 94, 0.08);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.15);
}

.badge-type.investment {
    background-color: rgba(6, 182, 212, 0.08);
    color: var(--info);
    border: 1px solid rgba(6, 182, 212, 0.15);
}

.badge-category {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-sub);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Amount formatting */
.amount-text {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
}

.amount-text.income { color: var(--success); }
.amount-text.expense { color: var(--danger); }
.amount-text.investment { color: var(--info); }

/* Table Action Buttons */
.btn-delete-row {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.btn-delete-row:hover {
    color: var(--danger);
    background-color: rgba(244, 63, 94, 0.08);
}

.btn-delete-row i {
    width: 15px;
    height: 15px;
}

/* Table Empty State Styling */
.table-empty-state {
    padding: 50px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-icon-lg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    opacity: 0.6;
}

.table-empty-state h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
}

.table-empty-state p {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 320px;
}

/* Table pagination and footer */
.ledger-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

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

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

.page-number {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-sub);
}


/* ==========================================================================
   TOAST / NOTIFICATION TOASTER STYLING
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    backdrop-filter: blur(10px);
    animation: toast-slide-in var(--transition-normal) forwards;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-danger {
    border-left: 4px solid var(--danger);
}

.toast.toast-info {
    border-left: 4px solid var(--info);
}

.toast.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast i {
    width: 18px;
    height: 18px;
}

.toast.toast-success i { color: var(--success); }
.toast.toast-danger i { color: var(--danger); }
.toast.toast-info i { color: var(--info); }
.toast.toast-warning i { color: var(--warning); }

.toast-body {
    flex-grow: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: var(--text-main);
}

@keyframes toast-slide-in {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast.toast-fade-out {
    animation: toast-slide-out var(--transition-normal) forwards;
}

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


/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
    }

    .disclaimer-bar {
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        top: auto;
    }

    .main-content {
        padding: 24px 20px;
    }
}

@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .ledger-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-wrapper, 
    .filter-group, 
    .filter-select {
        width: 100%;
    }

    .filter-group input[type="date"] {
        flex-grow: 1;
    }
}

/* AI Categorization Loader Spin */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.lucide-spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Custom Category Tags styling */
.category-tag {
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 3px 10px; 
    border-radius: 20px; 
    font-size: 11px; 
    color: var(--text-sub);
    transition: var(--transition-fast);
}

.category-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text-main);
}

.category-tag-delete {
    background: none; 
    border: none; 
    color: var(--text-muted); 
    cursor: pointer; 
    padding: 0; 
    display: inline-flex; 
    align-items: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    transition: var(--transition-fast);
}

.category-tag-delete:hover {
    color: var(--danger);
    transform: scale(1.1);
}
