/* ==========================================================================
   Sovereign Budget - Professional Dark Theme Stylesheet
   ========================================================================== */

/* 1. Global Custom Property Tokens */
:root {
    --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    
    /* Core Color Palette */
    --color-bg-main: #0a0d16;
    --color-bg-sidebar: #0f1322;
    --color-bg-card: rgba(20, 26, 46, 0.65);
    --color-bg-card-hover: rgba(28, 36, 62, 0.8);
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    
    /* Accent & Semantic Colors */
    --color-accent: #6366f1;         /* Indigo */
    --color-accent-hover: #4f46e5;
    --color-accent-glow: rgba(99, 102, 241, 0.3);
    
    --color-success: #10b981;        /* Emerald Green */
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-success-border: rgba(16, 185, 129, 0.25);
    
    --color-danger: #f43f5e;         /* Rose Red */
    --color-danger-bg: rgba(244, 63, 94, 0.1);
    --color-danger-border: rgba(244, 63, 94, 0.25);
    
    --color-warning: #f59e0b;        /* Amber Gold */
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-warning-border: rgba(245, 158, 11, 0.25);
    
    --color-info: #0ea5e9;           /* Sky Blue */
    --color-info-bg: rgba(14, 165, 233, 0.1);
    --color-info-border: rgba(14, 165, 233, 0.25);
    
    /* Text Colors */
    --color-text-primary: #f3f4f6;
    --color-text-secondary: #9ca3af;
    --color-text-muted: #6b7280;
    
    /* Effects & Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px -4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

/* 2. Base & Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-primary);
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 3. Utility Layout Classes */
.glass-panel {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: border-color var(--transition-normal), background-color var(--transition-normal);
}
.glass-panel:hover {
    border-color: var(--color-border-hover);
}

.flex-1 { flex: 1; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-amber { color: var(--color-warning) !important; }
.hidden { display: none !important; }

/* 4. Global Typography & Buttons */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

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

.btn-outline {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-text-secondary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-primary);
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
}
.btn-icon i {
    width: 18px;
    height: 18px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-disconnected {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border: 1px solid var(--color-danger-border);
}
.badge-connected {
    background: var(--color-success-bg);
    color: var(--color-success);
    border: 1px solid var(--color-success-border);
}
.badge-fallback {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border: 1px solid var(--color-warning-border);
}

/* 5. Layout Structure (Sidebar + Main) */
.app-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    min-width: 280px;
    height: 100%;
    border-radius: 0;
    border-top: none;
    border-bottom: none;
    border-left: none;
    background: var(--color-bg-sidebar);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 36px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-icon {
    width: 28px;
    height: 28px;
    color: var(--color-accent);
}
.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 40%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: all var(--transition-fast);
}
.nav-item i {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-primary);
}
.nav-item:hover i {
    transform: translateX(2px);
}
.nav-item.active {
    background: var(--color-accent-glow);
    color: var(--color-text-primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.db-status-container {
    margin-top: auto;
    padding: 16px;
    background: rgba(10, 15, 30, 0.5);
}
.db-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.db-status-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}
.db-info {
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.db-text-muted {
    color: var(--color-text-secondary);
}
.db-text-path {
    color: var(--color-success);
    word-break: break-all;
    font-family: monospace;
}
.db-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.save-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--color-success);
}
.save-icon {
    width: 14px;
    height: 14px;
}
.spinning {
    animation: spin 1.5s linear infinite;
}
@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Main Content Workspace */
.main-content {
    flex-grow: 1;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

/* Main Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    margin-bottom: 24px;
    border-radius: var(--radius-md);
}
.main-header h1 {
    font-size: 24px;
    color: var(--color-text-primary);
}
.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
}
.month-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}
.current-month-label {
    font-weight: 700;
    font-size: 14px;
    min-width: 110px;
    text-align: center;
}

/* Tabs Panel display */
.tab-panel {
    display: none;
    flex-grow: 1;
    animation: fadeIn 0.3s ease-out;
}
.tab-panel.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 6. Dashboard Component Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}
.stat-card:hover {
    border-color: var(--color-border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.card-income .stat-icon-wrapper { background: var(--color-success-bg); color: var(--color-success); }
.card-expense .stat-icon-wrapper { background: var(--color-danger-bg); color: var(--color-danger); }
.card-savings .stat-icon-wrapper { background: var(--color-warning-bg); color: var(--color-warning); }
.card-balance .stat-icon-wrapper { background: var(--color-info-bg); color: var(--color-info); }

.stat-info {
    display: flex;
    flex-direction: column;
}
.stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}
.stat-subtitle {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Savings Target detail component */
.savings-progress-detailed {
    padding: 20px;
}
.savings-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.savings-header-flex h3 {
    font-size: 16px;
}
.savings-header-flex span {
    font-weight: 700;
    font-size: 15px;
}
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-warning) 0%, #fbbf24 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Split grids */
.dashboard-split {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.split-left, .split-right {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.panel-header-flex h3 {
    font-size: 18px;
}

.recent-list-container {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 320px;
}

/* Transactions list UI */
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}
.transaction-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border-hover);
    transform: translateX(2px);
}
.tx-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tx-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.tx-icon i {
    width: 18px;
    height: 18px;
}
.tx-icon-expense {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}
.tx-icon-income {
    background: var(--color-success-bg);
    color: var(--color-success);
}
.tx-details {
    display: flex;
    flex-direction: column;
}
.tx-desc {
    font-size: 14px;
    font-weight: 600;
}
.tx-meta {
    font-size: 11px;
    color: var(--color-text-muted);
}
.tx-category-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.tx-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.tx-val {
    font-size: 15px;
    font-weight: 700;
}
.tx-val-expense { color: var(--color-danger); }
.tx-val-income { color: var(--color-success); }

/* Forms input controls */
.quick-form, .settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group-row {
    display: flex;
    gap: 16px;
}

label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-secondary);
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

/* Custom toggles */
.toggle-group {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 2px;
    height: 42px;
}
.toggle-group input[type="radio"] {
    display: none;
}
.toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.toggle-group input[value="expense"]:checked + .toggle-expense {
    background: var(--color-danger);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.toggle-group input[value="income"]:checked + .toggle-income {
    background: var(--color-success);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.input-currency-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.currency-symbol {
    position: absolute;
    left: 14px;
    font-weight: 700;
    color: var(--color-text-secondary);
    pointer-events: none;
}
.input-currency-wrapper input {
    padding-left: 28px;
}

/* Empty State Styling */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--color-text-muted);
    gap: 12px;
}
.empty-icon {
    width: 40px;
    height: 40px;
    stroke-width: 1.5;
}

/* 7. Settings Tab (Fixed & Savings) */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.settings-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.settings-card-header i {
    width: 22px;
    height: 22px;
}
.settings-card-header h3 {
    font-size: 18px;
}

.lists-container-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.list-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.list-panel h3 {
    font-size: 18px;
}

/* Tables styling */
.table-scroll-container {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}
.data-table th, .data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
}
.data-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}
.data-table tbody tr {
    transition: background-color var(--transition-fast);
}
.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Action icons inside tables */
.btn-delete-row {
    color: var(--color-danger);
    border-radius: 4px;
    padding: 4px;
    transition: background var(--transition-fast);
}
.btn-delete-row:hover {
    background: var(--color-danger-bg);
}
.btn-delete-row i {
    width: 16px;
    height: 16px;
}

/* 8. Transaction Log Styling */
.log-manager {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
    height: 100%;
}
.filter-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.search-input-wrapper {
    position: relative;
    width: 320px;
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
}
.search-input-wrapper input {
    padding-left: 36px;
}
.filter-selectors {
    display: flex;
    align-items: center;
    gap: 12px;
}
.filter-selectors select {
    width: 160px;
}

.main-log-table {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 480px;
}

.log-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 9. Reports Tab styling */
.reports-control-panel {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.reports-control-panel h3 {
    font-size: 18px;
}
.report-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}
.report-tabs .btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-secondary);
}
.report-tabs .btn.active {
    background: var(--color-accent);
    color: #fff;
}

.reports-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.report-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.report-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.chart-card {
    display: flex;
    align-items: center;
    justify-content: center;
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 280px;
    height: 280px;
    margin: 0 auto;
}
.chart-container-large {
    position: relative;
    width: 100%;
    height: 320px;
}

.insights-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.insight-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.metric-box {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.metric-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: block;
}
.metric-box h4 {
    font-size: 18px;
    font-weight: 800;
}
.divider {
    border: none;
    border-top: 1px solid var(--color-border);
}
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
}
.insights-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.insights-list li i {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* 10. Modals Markup and Overlays */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeInModal 0.2s ease-out;
}
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    width: 90%;
    max-width: 520px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--shadow-lg);
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 20px;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

/* Database specific choice list */
.db-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.db-option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.db-option-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-accent);
    transform: translateY(-1px);
}
.option-icon {
    width: 24px;
    height: 24px;
}
.option-details h4 {
    font-size: 14px;
    margin-bottom: 2px;
}
.option-details p {
    font-size: 12px;
    color: var(--color-text-secondary);
}

.alert {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
}
.alert-info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border: 1px solid var(--color-info-border);
}
.alert-info i {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* 11. Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    animation: slideInToast 0.25s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.3s ease var(--delay, 4s) forwards;
}
.toast-info { background: #0ea5e9; }
.toast-success { background: #10b981; }
.toast-error { background: #f43f5e; }
.toast-warning { background: #f59e0b; }

@keyframes slideInToast {
    from { transform: translateX(100%) translateY(8px); opacity: 0; }
    to { transform: translateX(0) translateY(0); opacity: 1; }
}
@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-8px); pointer-events: none; }
}

/* 12. Responsive Adjustments */
@media (max-width: 1024px) {
    .lists-container-split,
    .dashboard-split,
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        padding: 16px;
    }
    .sidebar-header {
        margin-bottom: 16px;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    .nav-item {
        padding: 8px 12px;
        white-space: nowrap;
    }
    .db-status-container {
        display: none; /* Hide DB panel in sidebar on mobile, show inside settings instead or simplify */
    }
    .main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }
    .header-left {
        justify-content: space-between;
    }
}
