/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #10b981;
    --primary-green-dark: #059669;
    --primary-green-light: #d1fae5;
    --bg-color: #f3f4f6;
    --sidebar-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --red: #ef4444;
    --red-light: #fee2e2;
    --blue: #3b82f6;
    --blue-light: #dbeafe;
    --purple: #8b5cf6;
    --purple-light: #ede9fe;
    --orange: #f97316;
    --orange-light: #ffedd5;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--sidebar-bg);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Dashboard Layout */
.dashboard {
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--sidebar-bg);
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    z-index: 200;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary-green);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon i {
    width: 20px;
    height: 20px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item i {
    width: 18px;
    height: 18px;
}

.menu-item:hover {
    background: #f9fafb;
    color: var(--text-primary);
}

.menu-item.active {
    background: var(--primary-green-light);
    color: var(--primary-green);
}

.badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}

.upgrade-card {
    margin-top: auto;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border-radius: 16px;
    padding: 14px 16px;
    color: white;
}

.upgrade-icon {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.upgrade-text {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
    line-height: 1.4;
}

.upgrade-btn {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.upgrade-btn i {
    width: 14px;
    height: 14px;
}

.upgrade-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background: var(--bg-color);
    padding-top: 72px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--sidebar-bg);
    z-index: 100;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    width: 320px;
}

.search-bar i {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-bar input {
    border: none;
    outline: none;
    font-size: 14px;
    flex: 1;
    color: var(--text-primary);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.shortcut {
    font-size: 12px;
    color: var(--text-muted);
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.icon-btn i {
    width: 18px;
    height: 18px;
}

.icon-btn:hover {
    background: #f9fafb;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Welcome Section */
.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding: 0 32px;
    margin-top: 24px;
}

.welcome-text h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.welcome-text p {
    font-size: 14px;
    color: var(--text-secondary);
}

.welcome-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.date-display i {
    width: 16px;
    height: 16px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--text-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.export-btn i {
    width: 16px;
    height: 16px;
}

.export-btn:hover {
    background: #374151;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    padding: 0 32px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
}

.stat-icon i {
    width: 18px;
    height: 18px;
}

.stat-icon.expenses {
    background: var(--red-light);
    color: var(--red);
}

.stat-icon.savings {
    background: #fef3c7;
    color: #f59e0b;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    flex: 1;
}

.currency-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.currency-selector img {
    width: 18px;
    height: 14px;
    border-radius: 2px;
}

.currency-selector i {
    width: 14px;
    height: 14px;
}

.more-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
}

.more-btn i {
    width: 18px;
    height: 18px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.stat-change i {
    width: 14px;
    height: 14px;
}

.stat-change.positive {
    color: var(--primary-green);
}

.stat-change.negative {
    color: var(--red);
}

.change-text {
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn i {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-green-dark);
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Middle Section */
.middle-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 8px;
    margin-bottom: 20px;
    padding: 0 32px;
    align-items: stretch;
}

.middle-section .wallet-card {
    height: 100%;
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 0;
}

.middle-section .chart-card {
    height: 100%;
    margin: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.wallet-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.add-btn i {
    width: 14px;
    height: 14px;
}

.wallet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.wallet-flag img {
    width: 32px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wallet-currency {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.wallet-amount {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-status {
    font-size: 11px;
    font-weight: 500;
}

.wallet-status.active {
    color: var(--primary-green);
}

.wallet-status.inactive {
    color: var(--red);
}

/* Chart Card */
.chart-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin: 0 32px 20px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-green);
}

.time-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.time-selector i {
    width: 14px;
    height: 14px;
}

.chart-container {
    display: flex;
    gap: 12px;
    height: 280px;
}

.chart-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    padding-bottom: 24px;
    height: 280px;
}

.chart-area {
    flex: 1;
    position: relative;
    height: 280px;
}

.grid-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.grid-line {
    width: 100%;
    height: 1px;
    background: #f3f4f6;
}

.chart-bars {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 24px;
    padding-top: 8px;
}

.bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    position: relative;
}

.bar {
    width: 28px;
    background: #e5f5ed;
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    min-height: 10px;
}

.bar.highlight {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bar-label {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    font-weight: 500;
}

.bar-wrapper.active .bar-label {
    color: #10b981;
    font-weight: 600;
}

.bar-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    border-radius: 8px;
    padding: 10px 14px;
    min-width: 110px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.bar-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1f2937;
}

.tooltip-label {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tooltip-value {
    display: block;
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
}

/* Bottom Section */
.bottom-section {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    padding: 0 32px 32px;
}

.savings-plan-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.savings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.savings-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.savings-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.savings-icon i {
    width: 18px;
    height: 18px;
}

.savings-icon.goal {
    background: var(--blue-light);
    color: var(--blue);
}

.savings-icon.emergency {
    background: var(--orange-light);
    color: var(--orange);
}

.savings-info {
    flex: 1;
}

.savings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.savings-name {
    font-size: 14px;
    font-weight: 500;
}

.savings-percent {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.savings-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-green);
    border-radius: 3px;
}

.savings-amount {
    font-size: 12px;
    color: var(--text-muted);
}

.savings-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e5e7eb;
}

.dot.active {
    background: var(--text-muted);
}

/* Transaction Card */
.transaction-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.filter-btn i {
    width: 14px;
    height: 14px;
}

.transaction-table {
    width: 100%;
    border-collapse: collapse;
}

.transaction-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.transaction-table td {
    padding: 14px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.transaction-table tr:last-child td {
    border-bottom: none;
}

.activity-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    width: 18px;
    height: 18px;
}

.activity-icon.blue {
    background: var(--blue-light);
    color: var(--blue);
}

.activity-icon.purple {
    background: var(--purple-light);
    color: var(--purple);
}

.activity-icon.orange {
    background: var(--orange-light);
    color: var(--orange);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-green-light);
    color: var(--primary-green);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge i {
    width: 14px;
    height: 14px;
}

.more-btn.small {
    padding: 4px;
}

.more-btn.small i {
    width: 16px;
    height: 16px;
}

/* Notification Animations */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
