/**
 * Kharche - Premium CSS Stylesheet
 * Vibrant Glassmorphism, Theme Variables, and Dynamic Micro-animations
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables & Design System Tokens --- */
:root {
    /* Color Palette */
    --primary: hsl(250, 85%, 65%);
    --primary-hover: hsl(250, 85%, 58%);
    --primary-glow: hsla(250, 85%, 65%, 0.3);
    
    --success: hsl(142, 72%, 45%);
    --success-glow: hsla(142, 72%, 45%, 0.2);
    
    --danger: hsl(346, 80%, 55%);
    --danger-glow: hsla(346, 80%, 55%, 0.2);
    
    --warning: hsl(38, 92%, 50%);
    --warning-glow: hsla(38, 92%, 50%, 0.2);
    
    --info: hsl(199, 89%, 48%);

    /* Category Specific Colors */
    --color-food: hsl(19, 88%, 55%);
    --color-travel: hsl(199, 89%, 48%);
    --color-shopping: hsl(280, 80%, 65%);
    --color-bills: hsl(142, 72%, 45%);
    --color-entertainment: hsl(330, 85%, 60%);
    --color-salary: hsl(142, 72%, 45%);
    --color-investment: hsl(174, 75%, 42%);
    --color-others: hsl(215, 20%, 50%);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transitions & Shadows */
    --transition-speed: 0.3s;
    --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);

    /* Theme defaults (Dark Mode-first) */
    --bg-main: hsl(224, 25%, 8%);
    --bg-body-gradient: radial-gradient(circle at 50% 0%, hsl(224, 25%, 14%) 0%, hsl(224, 25%, 8%) 100%);
    --bg-surface: hsla(224, 25%, 14%, 0.6);
    --bg-surface-opaque: hsl(224, 25%, 14%);
    --border-color: hsla(224, 25%, 22%, 0.5);
    --border-glow: hsla(250, 85%, 65%, 0.15);
    
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 65%);
    --text-muted: hsl(215, 12%, 45%);
    
    --blur-strength: 16px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

/* Light Theme overrides */
[data-theme="light"] {
    --bg-main: hsl(220, 20%, 97%);
    --bg-body-gradient: radial-gradient(circle at 50% 0%, hsl(220, 20%, 99%) 0%, hsl(220, 20%, 94%) 100%);
    --bg-surface: hsla(220, 20%, 90%, 0.55);
    --bg-surface-opaque: hsl(220, 20%, 92%);
    --border-color: hsla(220, 20%, 82%, 0.6);
    --border-glow: hsla(250, 85%, 65%, 0.1);
    
    --text-primary: hsl(224, 25%, 12%);
    --text-secondary: hsl(224, 15%, 35%);
    --text-muted: hsl(224, 10%, 55%);
    
    --shadow-premium: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

/* --- Base & Scrollbar Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    background-image: var(--bg-body-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    transition: background var(--transition-speed), color var(--transition-speed);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-glow);
}

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

/* Navigation Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-surface);
    backdrop-filter: blur(var(--blur-strength));
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform var(--transition-speed);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.logo-icon {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.nav-item a i {
    font-size: 1.1rem;
    transition: transform var(--transition-speed);
}

.nav-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-glow), transparent);
    transition: width var(--transition-speed);
    z-index: -1;
}

.nav-item.active a, .nav-item a:hover {
    color: var(--text-primary);
    background: var(--border-color);
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item a:hover i {
    transform: scale(1.15);
}

.nav-item.active a::before {
    width: 100%;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* User Profile Badge */
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--info));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-family: var(--font-heading);
}

.username {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2.5rem;
    max-width: 1400px;
}

/* --- Common Components (Buttons, Forms, Modal) --- */

/* Glass Cards */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(var(--blur-strength));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) var(--ease-elastic);
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-family: var(--font-body);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

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

.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-surface-opaque);
}

.btn-success {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
    background: hsl(142, 72%, 38%);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-danger:hover {
    background: hsl(346, 80%, 48%);
    transform: translateY(-1px);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    color: var(--text-secondary);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

/* Top Action Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.welcome-section h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2.2rem;
    letter-spacing: -0.5px;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Theme Switcher */
.theme-switch {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: 30px;
    display: flex;
    cursor: pointer;
}

.theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-speed);
}

.theme-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* --- OVERVIEW PAGE VIEW --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-amount {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0.5rem 0;
    letter-spacing: -0.5px;
}

.stats-card.balance {
    background: linear-gradient(135deg, hsla(250, 85%, 65%, 0.15) 0%, hsla(250, 85%, 65%, 0.02) 100%);
    border-color: hsla(250, 85%, 65%, 0.25);
}

.stats-card.balance .stats-amount {
    color: var(--primary);
    text-shadow: 0 0 15px var(--primary-glow);
}

.stats-card.income {
    background: linear-gradient(135deg, hsla(142, 72%, 45%, 0.1) 0%, hsla(142, 72%, 45%, 0.02) 100%);
    border-color: hsla(142, 72%, 45%, 0.2);
}

.stats-card.income .stats-amount {
    color: var(--success);
}

.stats-card.expense {
    background: linear-gradient(135deg, hsla(346, 80%, 55%, 0.1) 0%, hsla(346, 80%, 55%, 0.02) 100%);
    border-color: hsla(346, 80%, 55%, 0.25);
}

.stats-card.expense .stats-amount {
    color: var(--danger);
}

.stats-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stats-indicator i {
    font-size: 1rem;
}

.stats-indicator.up i {
    color: var(--success);
}

.stats-indicator.down i {
    color: var(--danger);
}

/* Overview Main Section Splitting */
.visuals-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Mini Lists */
.mini-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mini-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed);
}

.mini-list-item:hover {
    transform: translateX(4px);
    border-color: var(--primary-glow);
}

.item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.item-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.item-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

.item-amount {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
}

.item-amount.in {
    color: var(--success);
}

.item-amount.out {
    color: var(--text-primary);
}

/* --- TRANSACTIONS VIEW --- */
.table-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-wrapper i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color var(--transition-speed);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Beautiful Modern Table */
.transaction-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.transaction-table th {
    background: var(--bg-surface-opaque);
    padding: 1rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.transaction-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.transaction-table tr:hover td {
    background: var(--border-color);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-in {
    background: var(--success-glow);
    color: var(--success);
    border: 1px solid hsla(142, 72%, 45%, 0.1);
}

.badge-out {
    background: var(--danger-glow);
    color: var(--danger);
    border: 1px solid hsla(346, 80%, 55%, 0.1);
}

.badge-category {
    background: var(--border-color);
    color: var(--text-secondary);
    border: 1px solid transparent;
}

/* Row Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* --- BUDGETS / LIMITS VIEW --- */
.budget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.budget-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.budget-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.budget-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.budget-category-title .cat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.budget-category-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
}

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

.budget-used {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.budget-total {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Glow-effect Progress Bar */
.progress-bar-wrapper {
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s var(--ease-elastic);
    background: var(--primary);
}

.progress-bar-fill.safe {
    background: var(--success);
    box-shadow: 0 0 10px var(--success-glow);
}

.progress-bar-fill.warning {
    background: var(--warning);
    box-shadow: 0 0 10px var(--warning-glow);
}

.progress-bar-fill.danger {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger-glow);
}

.budget-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.budget-message.overlimit {
    color: var(--danger);
    font-weight: 600;
}

/* --- DEBT & REMINDERS VIEW --- */
.debt-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.debt-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.debt-stat-card {
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.debt-stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.debt-stat-val {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.debt-stat-val.lend {
    color: var(--success);
}

.debt-stat-val.borrow {
    color: var(--danger);
}

.debt-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.debt-card-item {
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    transition: all var(--transition-speed);
}

.debt-card-item:hover {
    transform: scale(1.01);
    border-color: var(--primary-glow);
}

.debt-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debt-person {
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.debt-type-badge {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

.debt-type-badge.lend {
    background: var(--success-glow);
    color: var(--success);
}

.debt-type-badge.borrow {
    background: var(--danger-glow);
    color: var(--danger);
}

.debt-amount-due {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
}

.debt-amount-due.lend {
    color: var(--success);
}

.debt-amount-due.borrow {
    color: var(--danger);
}

.debt-row-2 {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.debt-row-3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
}

.debt-due-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.debt-due-date.overdue {
    color: var(--danger);
    font-weight: 600;
    animation: pulse-border 1.5s infinite;
}

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

/* --- MODAL DIALOGS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-premium);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-speed) var(--ease-elastic);
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background: var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-close {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styling */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.radio-btn {
    position: relative;
}

.radio-btn input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
    text-transform: capitalize;
}

.radio-btn input:checked + .radio-label.in {
    background: var(--success-glow);
    border-color: var(--success);
    color: var(--success);
}

.radio-btn input:checked + .radio-label.out {
    background: var(--danger-glow);
    border-color: var(--danger);
    color: var(--danger);
}

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

/* --- SETTINGS VIEW --- */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.settings-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background: var(--bg-surface-opaque);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.settings-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
}

.settings-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.settings-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- TOAST NOTIFICATIONS & ALERTS --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 9999;
}

.toast {
    background: var(--bg-surface-opaque);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-premium);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s var(--ease-elastic);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.danger {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Alarm indicator badge */
.badge-alarm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: white;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    right: 5px;
    animation: pulse-glow 1.5s infinite;
}

/* Nav Item Alert Dot */
.alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--danger);
}

/* --- ANIMATIONS --- */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 hsla(346, 80%, 55%, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px hsla(346, 80%, 55%, 0);
    }
    100% {
        box-shadow: 0 0 0 0 hsla(346, 80%, 55%, 0);
    }
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    .visuals-container {
        grid-template-columns: 1fr;
    }
    
    .debt-dashboard {
        grid-template-columns: 1fr;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: 0 4px 15px var(--primary-glow);
    cursor: pointer;
    font-size: 1.25rem;
}
