/* ============================================
   BLOOM — Personal Finance Tracker
   Professional Dashboard Design System
   ============================================ */

:root {
    --cream: #f4f1ec;
    --warm-white: #faf8f5;
    --sage: #7a9e7e;
    --sage-light: #a8c5ac;
    --sage-dark: #4d7a52;
    --sage-darker: #2d5a32;
    --blush: #e8b4a0;
    --blush-light: #f5d9ce;
    --coral: #d4735a;
    --gold: #c9a84c;
    --gold-light: #f0dfa8;
    --ink: #2c2416;
    --ink-light: #6b5e4e;
    --ink-faint: #b8ad9e;
    --card-bg: #ffffff;
    --sidebar-bg: #f0ece6;
    --border-light: rgba(44, 36, 22, 0.06);
    --border-medium: rgba(44, 36, 22, 0.08);
    --border-dark: rgba(44, 36, 22, 0.12);
    --bg-hover: rgba(44, 36, 22, 0.04);
    --bg-card: rgba(212, 115, 90, 0.05);
    --shadow-xs: 0 1px 3px rgba(44, 36, 22, 0.04);
    --shadow: 0 4px 24px rgba(44, 36, 22, 0.06);
    --shadow-lg: 0 12px 48px rgba(44, 36, 22, 0.10);
    --box-shadow-card: 0 4px 16px rgba(77, 122, 82, 0.3);
    --radius: 16px;
    --radius-lg: 20px;
    --radius-sm: 10px;
    --sidebar-width: 240px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Color Scheme */
html.dark-mode {
    --cream: #1a1a1e;
    --warm-white: #2a2a30;
    --sidebar-bg: #252528;
    --card-bg: #2a2a30;
    --ink: #e8e8ec;
    --ink-light: #b0b0b8;
    --ink-faint: #686870;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.12);
    --border-dark: rgba(255, 255, 255, 0.15);
    --bg-hover: rgba(255, 255, 255, 0.08);
    --bg-card: rgba(168, 197, 172, 0.1);
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
    --box-shadow-card: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* Explicit Light Mode */
html.light-mode {
    --cream: #f4f1ec;
    --warm-white: #faf8f5;
    --sidebar-bg: #f0ece6;
    --card-bg: #ffffff;
    --ink: #2c2416;
    --ink-light: #6b5e4e;
    --ink-faint: #b8ad9e;
    --border-light: rgba(44, 36, 22, 0.06);
    --border-medium: rgba(44, 36, 22, 0.08);
    --border-dark: rgba(44, 36, 22, 0.12);
    --bg-hover: rgba(44, 36, 22, 0.04);
    --bg-card: rgba(212, 115, 90, 0.05);
    --shadow-xs: 0 1px 3px rgba(44, 36, 22, 0.04);
    --shadow: 0 4px 24px rgba(44, 36, 22, 0.06);
    --shadow-lg: 0 12px 48px rgba(44, 36, 22, 0.10);
    --box-shadow-card: 0 4px 16px rgba(77, 122, 82, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    text-align: left;
}

/* ensure all page headers default left, avoid right-shifted titles */
h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.article-title,
.error-title {
    text-align: left;
}

/* ============================================
   GLOBAL LOADER 
   ============================================ */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cream);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.global-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--sage-light);
    border-top-color: var(--sage-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-light);
    animation: pulseText 1.5s ease-in-out infinite;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px 16px 20px;
    z-index: 100;
    border-right: 1px solid var(--border-light);
    transition: transform var(--transition);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-collapse-btn {
    background: none;
    border: none;
    color: var(--ink-light);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    opacity: 0;
}

.sidebar:hover .sidebar-collapse-btn {
    opacity: 1;
}

.sidebar-collapse-btn:hover {
    background: var(--bg-hover);
    color: var(--ink);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .logo-name,
.sidebar.collapsed .logo-sub,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .logout-btn span,
.sidebar.collapsed .sidebar-bottom {
    display: none;
}

.sidebar.collapsed .sidebar-nav {
    gap: 8px;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    gap: 0;
    padding: 12px 14px;
}

.sidebar.collapsed .nav-item svg {
    width: 20px;
    height: 20px;
}

.sidebar.collapsed .user-avatar {
    margin: 0;
}

.sidebar.collapsed .sidebar-collapse-btn {
    opacity: 1;
}

/* Adjust main content margin when sidebar is collapsed */
.sidebar.collapsed~.main-wrapper {
    margin-left: 80px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--sage-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.1;
    font-style: italic;
}

.logo-sub {
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 500;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--ink-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--ink);
}

.nav-item.active {
    background: var(--card-bg);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--sage-dark);
    border-radius: 4px 0 0 4px;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-top: 1px solid var(--border-medium);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--coral) !important;
    width: 100%;
    cursor: pointer;
}

.logout-btn:hover {
    background: var(--bg-card) !important;
}

.logout-btn svg {
    color: var(--coral) !important;
    opacity: 1 !important;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--sage-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.user-role {
    font-size: 11px;
    color: var(--ink-faint);
}

/* ============================================
   MOBILE HEADER
   ============================================ */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 90;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid rgba(44, 36, 22, 0.06);
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    color: var(--ink);
}

.logo-icon-sm {
    width: 28px;
    height: 28px;
    background: var(--sage-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-profile {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--ink-light);
    padding: 8px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(44, 36, 22, 0.3);
    backdrop-filter: blur(4px);
    z-index: 95;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-right: auto;
    flex: 1;
    min-height: 100vh;
    padding: 0 24px 60px;
    width: calc(100% - var(--sidebar-width));
    max-width: 1300px;
}

/* ensure left classic interior alignment for page-level content */
.greeting-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.greeting-actions {
    margin-left: auto;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ============================================
   TOP BAR (Search + Actions)
   ============================================ */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border-radius: 40px;
    padding: 10px 20px;
    box-shadow: var(--shadow-xs);
    flex: 1;
    max-width: 400px;
    border: 1px solid rgba(44, 36, 22, 0.06);
    transition: all var(--transition);
}

.search-bar:focus-within {
    box-shadow: var(--shadow);
    border-color: var(--sage-light);
}

.search-bar svg {
    color: var(--ink-faint);
    flex-shrink: 0;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--ink);
    width: 100%;
}

.search-bar input::placeholder {
    color: var(--ink-faint);
}

.top-bar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(44, 36, 22, 0.08);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-light);
    transition: all var(--transition);
    position: relative;
}

.icon-btn:hover {
    background: var(--warm-white);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
}

.notif-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--coral);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

/* Profile Dropdown */
.profile-dropdown-wrapper {
    position: relative;
}

.profile-trigger {
    padding: 2px;
}

.profile-trigger-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sage-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(44, 36, 22, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: 200;
}

.profile-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-header {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.profile-dropdown-header strong {
    font-size: 14px;
    color: var(--ink);
}

.profile-dropdown-header span {
    font-size: 12px;
    color: var(--ink-faint);
    margin-top: 4px;
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(44, 36, 22, 0.06);
    margin: 4px 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--ink-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
}

.profile-dropdown-item:hover {
    background: var(--warm-white);
    color: var(--ink);
}

.profile-dropdown-item svg {
    color: var(--ink-faint);
}

.profile-dropdown-item.logout {
    color: var(--coral);
}

.profile-dropdown-item.logout:hover {
    background: rgba(212, 115, 90, 0.05);
}

.profile-dropdown-item.logout svg {
    color: var(--coral);
}

/* ============================================
   SECTIONS (page-like views)
   ============================================ */
.section-page {
    display: none;
    animation: fadeInUp 0.35s ease;
}

.section-page.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   GREETING ROW
    ============================================ */
.greeting-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 16px;
}

.greeting-label {
    font-size: 14px;
    color: #44604b;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    font-weight: 800;
    background: linear-gradient(90deg, #2d6a5b, #6ca987);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.15;
    margin-top: 2px;
    text-align: left;
    text-shadow: 0 3px 8px rgba(35, 100, 77, 0.15);
}

/* enforce left alignment on key page title styles */
.page-title,
.article-title,
.error-title,
h1,
h2,
h3 {
    text-align: left;
}

.greeting-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: var(--sage-dark);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 40px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    background: var(--sage-darker);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(77, 122, 82, 0.3);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--ink);
    border: 1.5px solid rgba(44, 36, 22, 0.12);
    padding: 10px 20px;
    border-radius: 40px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: var(--warm-white);
    border-color: var(--ink-faint);
    transform: translateY(-1px);
}

.btn-today {
    background: var(--card-bg);
    border: 1px solid rgba(44, 36, 22, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    color: var(--ink-light);
    transition: all var(--transition);
}

.btn-today:hover {
    background: var(--ink);
    color: #fff;
}

.full-width {
    width: 100%;
    justify-content: center;
}

.link-btn {
    background: none;
    border: none;
    color: var(--ink-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: color var(--transition);
    text-decoration: none;
}

.link-btn:hover {
    color: var(--sage-dark);
}

/* ============================================
   MONTH NAVIGATION
   ============================================ */
.month-nav-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.month-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(44, 36, 22, 0.1);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-light);
    transition: all var(--transition);
}

.month-arrow:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.month-nav-bar select {
    border: 1px solid rgba(44, 36, 22, 0.1);
    background: var(--card-bg);
    border-radius: 12px;
    padding: 7px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all var(--transition);
}

.month-nav-bar select:focus {
    border-color: var(--sage);
}

.month-label-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    padding: 0 8px;
}

/* ============================================
   SUMMARY CARDS GRID
   ============================================ */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.summary-card {
    background: linear-gradient(145deg, #ffffff 5%, #eef5ec 100%);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(31, 70, 55, 0.18);
    border: 1px solid rgba(122, 158, 126, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    min-height: 150px;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #63a37a, #2d7660);
}

.summary-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(25, 74, 56, 0.26);
    border-color: rgba(77, 122, 82, 0.35);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

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

.balance-badge {
    background: #eef3ee;
    color: var(--sage-dark);
}

.income-badge {
    background: #e8f0ea;
    color: var(--sage);
}

.expense-badge {
    background: #fce8e2;
    color: var(--coral);
}

.savings-badge {
    background: #f0eadc;
    color: var(--gold);
}

.card-amount {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
    color: #2a593f;
    text-shadow: 0 1px 3px rgba(31, 90, 68, 0.2);
    word-break: break-word;
}

.card-income .card-amount {
    color: #1f7d5e;
}

.card-expenses .card-amount {
    color: #d35945;
}

.card-savings .card-amount {
    color: #2f6b51;
}

.card-expenses .card-amount {
    color: var(--coral);
}

.card-balance .card-amount {
    color: var(--ink);
}

.card-savings .card-amount {
    color: var(--ink);
}

.card-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--sage-dark);
}

.card-sub {
    font-size: 12px;
    color: var(--ink-faint);
}

.card-sub-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--ink-faint);
    align-items: center;
}

.budget-label {
    font-size: 11px;
}

/* BUDGET PROGRESS */
.budget-progress {
    background: var(--cream);
    border-radius: 40px;
    height: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.budget-bar {
    height: 100%;
    border-radius: 40px;
    background: linear-gradient(90deg, var(--sage-light), var(--sage));
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   CHARTS ROW
   ============================================ */
.charts-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 22px;
    margin-bottom: 32px;
}

.chart-card {
    background: linear-gradient(150deg, #ffffff 15%, #edf8ef 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 14px 36px rgba(40, 84, 60, 0.14);
    border: 1px solid rgba(122, 158, 126, 0.16);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(24, 64, 45, 0.22);
}

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

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--ink);
}

.chart-period-toggle {
    display: flex;
    background: var(--cream);
    border-radius: 20px;
    padding: 3px;
}

.period-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--ink-faint);
    cursor: pointer;
    transition: all var(--transition);
}

.period-btn.active {
    background: var(--card-bg);
    color: var(--ink);
    box-shadow: var(--shadow-xs);
}

.area-chart-container {
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
}

.area-chart-container canvas {
    width: 100% !important;
    height: 220px !important;
}

.chart-stats-row {
    display: flex;
    gap: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--cream);
}

.chart-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-stat-label {
    font-size: 12px;
    color: var(--ink-faint);
}

.chart-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.chart-stat-month {
    font-size: 11px;
    font-weight: 700;
    color: var(--coral);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* DONUT CHART */
.donut-chart-card {
    display: flex;
    flex-direction: column;
}

.donut-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.donut-container {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}

.donut-container svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center-label {
    font-size: 10px;
    color: var(--ink-faint);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 2px;
}

.donut-center-val {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    display: block;
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    font-size: 13px;
    color: var(--ink-light);
    flex: 1;
}

.legend-pct {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

/* ============================================
   BOTTOM ROW
   ============================================ */
.bottom-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.transactions-card,
.heatmap-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.transactions-card:hover,
.heatmap-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(39, 81, 60, 0.15);
}

/* ============================================
   TRANSACTIONS CARD
   ============================================ */
.transactions-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(44, 36, 22, 0.04);
}

.full-tx-card {
    min-height: 400px;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pill {
    padding: 5px 14px;
    border-radius: 30px;
    border: 1.5px solid rgba(44, 36, 22, 0.1);
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-faint);
    cursor: pointer;
    transition: all var(--transition);
}

.pill.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.pill:hover:not(.active) {
    border-color: var(--ink-light);
    color: var(--ink);
}

.tx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--warm-white);
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease;
}

.tx-item:hover {
    background: #efeae2;
    transform: translateX(4px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

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

.tx-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tx-meta {
    font-size: 12px;
    color: var(--ink-faint);
    margin-top: 2px;
}

.tx-amount {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.tx-amount.income {
    color: var(--sage-dark);
}

.tx-amount.expense {
    color: var(--coral);
}

.tx-delete {
    background: none;
    border: none;
    color: var(--ink-faint);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.15s;
    line-height: 1;
    opacity: 0;
}

.tx-item:hover .tx-delete {
    opacity: 1;
}

.tx-delete:hover {
    color: var(--coral);
    background: var(--blush-light);
}

.empty-state {
    text-align: center;
    padding: 32px 20px;
    color: var(--ink-faint);
    font-size: 14px;
}

/* ============================================
   RIGHT COLUMN
   ============================================ */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* GOALS CARD is now hidden (removed from dashboard) */
.goals-card {
    display: none !important;
}

/* FINANCIAL TIP merged into background */
.tip-card {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(60, 97, 72, 0.16);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-height: 130px;
    color: #334f3b;
    backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 8px 22px rgba(23, 63, 42, 0.09);
    position: relative;
    overflow: hidden;
}

.tip-card::before,
.tip-card::after {
    display: none;
}

.tip-card .tip-label {
    color: #3d674b;
}

.tip-card .tip-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #2d533c;
    font-style: normal;
}

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

.fab-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sage-dark);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    box-shadow: 0 2px 8px rgba(77, 122, 82, 0.3);
}

.fab-btn:hover {
    transform: scale(1.1);
    background: var(--sage-darker);
}

.goals-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}

.goal-preview-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.goal-preview-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.goal-preview-pct {
    font-size: 11px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.goal-preview-amount {
    font-size: 13px;
    color: var(--ink-light);
    text-align: right;
}

.goal-progress {
    height: 6px;
    background: var(--cream);
    border-radius: 40px;
    overflow: hidden;
}

.goal-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--sage-light), var(--sage-dark));
    border-radius: 40px;
    transition: width 0.5s ease;
}

.create-goal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: 1.5px dashed var(--ink-faint);
    border-radius: 12px;
    background: transparent;
    color: var(--ink-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.create-goal-btn:hover {
    border-color: var(--sage);
    color: var(--sage-dark);
    background: rgba(122, 158, 126, 0.05);
}

/* FINANCIAL TIP CARD */
.tip-card {
    background: linear-gradient(145deg, var(--sage-darker) 0%, #1a3d1f 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.tip-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(168, 197, 172, 0.1);
}

.tip-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(168, 197, 172, 0.06);
}

.tip-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--sage-light);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.tip-text {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    position: relative;
    z-index: 1;
}

/* ============================================
   GOALS FULL LIST (Goals Section)
   ============================================ */
.goals-full-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.goal-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(44, 36, 22, 0.04);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
}

.goal-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* ============================================
   BUDGET SECTION
   ============================================ */
.budget-section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.budget-set-card,
.budget-overview-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(44, 36, 22, 0.04);
}

.budget-visual {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.budget-ring-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.budget-ring-svg {
    width: 100%;
    height: 100%;
}

.budget-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.budget-ring-pct {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    display: block;
    color: var(--ink);
}

.budget-ring-label {
    font-size: 9px;
    color: var(--ink-faint);
    letter-spacing: 0.12em;
    display: block;
}

.budget-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.budget-detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cream);
}

.budget-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.settings-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-xs);
    border: 1px solid rgba(44, 36, 22, 0.04);
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.data-management-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.data-management-grid .btn-secondary {
    width: 100%;
    justify-content: center;
    gap: 8px;
    display: flex;
    align-items: center;
}

/* ============================================
   MODALS
   ============================================ */

.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: none;
    z-index: 10050;
}

.tour-highlight {
    position: relative;
    box-shadow: 0 0 0 4px rgba(72, 182, 137, 0.35), 0 0 20px rgba(72, 182, 137, 0.45);
    border-radius: 14px;
    transition: all 0.2s ease;
    z-index: 10051;
}

.tour-tooltip {
    position: absolute;
    z-index: 10060;
    background: #fff;
    border: 1px solid rgba(83, 105, 86, 0.24);
    border-radius: 12px;
    padding: 14px;
    max-width: 340px;
    box-shadow: 0 20px 40px rgba(15, 32, 18, 0.26);
    color: #1f3624;
    font-family: Inter, sans-serif;
}

.tour-controls {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10100;
}

.tour-controls button {
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    z-index: 10099;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92%, 540px);
    max-width: 540px;
    background: var(--card-bg);
    border: 1px solid rgba(44, 36, 22, 0.12);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    z-index: 10100;
    color: var(--ink);
}

.modal.active {
    opacity: 1 !important;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    animation: modalPop 0.25s ease-out forwards;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.modal-overlay.active .modal.active {
    opacity: 1 !important;
    transform: translate(-50%, -50%);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    overflow: hidden !important;
}

.modal::-webkit-scrollbar,
.modal .modal-content::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(92%, 500px);
    max-width: 500px;
    background: var(--card-bg);
    border: 1px solid rgba(44, 36, 22, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden !important; /* Contain the scrollable body */
    opacity: 0;
    pointer-events: none;
    z-index: 10100;
    color: var(--ink);
    padding: 0; /* Remove padding from outer container to allow header/footer to be full width if needed */
}

.modal.active {
    opacity: 1 !important;
    pointer-events: auto;
    transform: translateY(0);
    animation: fadeInScale 0.2s ease-out;
}

.modal-overlay.active .modal.active {
    opacity: 1 !important;
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 16px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--cream);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    width: 100%;
}

.modal-footer {
    padding: 16px 32px 24px;
    flex-shrink: 0;
    border-top: 1px solid var(--cream);
    background: var(--card-bg);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--ink-faint);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    color: var(--ink);
    background: var(--cream);
}

.modal-stat-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--cream);
    padding: 12px 0;
    font-size: 14px;
}

.modal-stat-row:last-child {
    border-bottom: none;
}

.mini-stat-card {
    background: var(--warm-white);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.mini-stat-label {
    font-size: 11px;
    color: var(--ink-faint);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.mini-stat-val {
    font-size: 20px;
    font-weight: 700;
}

/* MODAL FORMS */
.modal-form-group {
    margin-bottom: 16px;
    position: relative;
}

.modal-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-light);
    margin-bottom: 6px;
}

.modal-input {
    width: 100%;
    background: var(--warm-white);
    border: 1.5px solid rgba(44, 36, 22, 0.1);
    border-radius: 12px;
    padding: 11px 14px;
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
}

html.dark-mode .modal-input {
    background: #252528;
    border-color: rgba(255, 255, 255, 0.2);
    color: #f2f2f2;
}

html.dark-mode .modal-input option {
    background: #252528;
    color: #f2f2f2;
}


.modal-input::placeholder {
    color: var(--ink-faint);
}

.modal-input:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.1);
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--warm-white);
    border: 1.5px solid rgba(44, 36, 22, 0.1);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html.dark-mode .suggestions-dropdown {
    background: #252528;
    border-color: rgba(255, 255, 255, 0.2);
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink);
    transition: background-color var(--transition);
}

html.dark-mode .suggestion-item {
    color: #f2f2f2;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
    background: var(--sage-light);
}

html.dark-mode .suggestion-item:hover,
html.dark-mode .suggestion-item.highlighted {
    background: rgba(122, 158, 126, 0.2);
}

/* TYPE TOGGLE (in modal) */
.type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.type-btn {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1.5px solid rgba(44, 36, 22, 0.1);
    background: transparent;
    color: var(--ink-faint);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.type-btn.active-income {
    background: rgba(168, 197, 172, 0.2);
    border-color: var(--sage-light);
    color: var(--sage-dark);
    font-weight: 600;
}

.type-btn.active-expense {
    background: rgba(212, 115, 90, 0.15);
    border-color: var(--blush);
    color: var(--coral);
    font-weight: 600;
}

/* ============================================
   CALENDAR
   ============================================ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 16px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    color: var(--ink-faint);
    font-weight: 600;
    margin-bottom: 8px;
}

.calendar-day {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    background: var(--warm-white);
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}

.calendar-day:hover {
    background: var(--sage-light);
    color: #fff;
}

.calendar-day.other-month {
    color: var(--ink-faint);
    opacity: 0.4;
}

.calendar-day.has-tx::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 5px;
    height: 5px;
    background: var(--sage);
    border-radius: 50%;
}

.calendar-day.today {
    border: 2px solid var(--sage);
}

/* ============================================
   YEAR VIEW BARS
   ============================================ */
.year-chart-container {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 200px;
    padding-top: 20px;
    gap: 8px;
    margin-top: 20px;
    border-top: 1px solid var(--cream);
}

.year-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 6px;
}

.year-bars {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 140px;
    width: 100%;
    justify-content: center;
}

.y-bar {
    width: 10px;
    border-radius: 4px 4px 0 0;
    background: var(--cream);
    transition: height 0.5s;
}

.y-bar.inc {
    background: var(--sage-light);
}

.y-bar.exp {
    background: var(--coral);
}

.y-label {
    font-size: 10px;
    color: var(--ink-faint);
}

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--toast-bg, var(--ink));
    color: var(--toast-color, #fff);
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 12px;
    visibility: hidden;
}

html.dark-mode .toast {
    --toast-bg: #1f1f24;
    --toast-color: #f8f8fa;
    background: var(--toast-bg);
    color: var(--toast-color);
}

html.light-mode .toast {
    --toast-bg: #2c2416;
    --toast-color: #fff;
    background: var(--toast-bg);
    color: var(--toast-color);
}

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

.toast-message {
    flex: 1;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 0.7;
}

/* Profile Picture Section */
.profile-picture-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--ink-faint);
}

.profile-picture-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--ink);
}

.profile-picture-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-picture-preview {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--ink-faint);
}

.profile-picture-buttons {
    flex: 1;
}

.profile-picture-buttons button {
    width: 100%;
    margin-bottom: 8px;
}

.profile-picture-buttons button:last-child {
    margin-bottom: 0;
}

.profile-picture-input {
    display: none;
}

.profile-picture-button {
    width: 100%;
    margin-bottom: 8px;
}

.profile-picture-remove {
    width: 100%;
    background: rgba(230, 126, 34, 0.1);
    color: var(--coral);
    border-color: var(--coral);
}

/* Button Styles */
.btn-logout {
    color: var(--coral) !important;
    border-color: var(--coral) !important;
    background: rgba(230, 126, 34, 0.1);
}

.settings-card {
    transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
    border: 1px solid rgba(122, 158, 126, 0.5);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

.settings-card h2.card-title {
    margin-top: 0;
}

.profile-picture-section {
    margin-top: 16px;
}

.account-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ink-faint);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.profile-picture-preview.large {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px;
    font-size: 42px;
    border: 3px solid var(--sage);
    position: relative;
}

.avatar-wrapper {
    display: inline-block;
    position: relative;
}

.avatar-edit-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s ease;
}

.avatar-edit-btn:hover {
    background: rgba(77, 122, 82, 0.85);
}

.avatar-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background: rgba(12, 16, 24, 0.95);
    border: 1px solid rgba(120, 136, 156, 0.2);
    border-radius: 10px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 10;
    min-width: 120px;
}

.avatar-menu-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.avatar-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}


.account-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-name-label {
    font-size: 12px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 600;
}

.account-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.5px;
}

.account-email-label {
    font-size: 12px;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    font-weight: 600;
}

/* Responsive and UX Improvements */
@media (max-width: 1100px) {
    .main-wrapper {
        width: calc(100% - 80px);
        margin-left: 80px;
        padding: 16px;
    }

    .summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .bottom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        position: fixed;
    }

    .main-wrapper {
        width: 100%;
        margin-left: 0;
        padding: 0 16px 40px;
    }

    .greeting-row,
    .month-nav-bar,
    .chart-stats-row,
    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar-overlay.active {
        display: block;
    }
}


.account-email {
    font-size: 14px;
    color: var(--ink-light);
    margin: 0;
    word-break: break-all;
}

.profile-picture-info {
    color: var(--ink-faint);
    font-size: 12px;
    margin-top: 10px;
}

/* Account Info */
.account-info {
    color: var(--ink-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.account-info strong {
    font-weight: 600;
}

/* Settings Help Text */
.settings-help-text {
    color: var(--ink-faint);
    font-size: 12px;
    margin-top: 8px;
}

.settings-help-text-dark {
    color: var(--ink-light);
    font-size: 13px;
    margin-bottom: 12px;
}

/* Theme Button */
.theme-button {
    width: 100%;
    justify-content: center;
    gap: 8px;
}

/* Empty State */

/* Responsive Settings and Profile Card */
@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .account-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-picture-preview.large {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px;
        font-size: 34px;
    }

    .account-header-info {
        width: 100%;
        gap: 8px;
    }
}

@media (max-width: 540px) {
    .settings-card {
        padding: 18px;
    }

    .account-name {
        font-size: 18px;
    }

    .account-email {
        font-size: 13px;
        word-break: break-word;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .profile-picture-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .hero,
    .features,
    .settings,
    .cta,
    .footer {
        padding-left: 12px;
        padding-right: 12px;
    }
}

.empty-state-inline {
    padding: 10px 0;
}

.empty-state-text {
    font-size: 13px;
    color: inherit;
    margin: 0;
}

/* Card Title No Margin */
.card-title-compact {
    margin-bottom: 0;
}

/* Filter Pills */
.filter-pills-container {
    margin-bottom: 16px;
}

/* Budget Display */
.budget-display {
    font-size: 14px;
    color: var(--ink-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Settings Help Text */
.settings-help-text {
    color: var(--ink-light);
    font-size: 13px;
    margin-bottom: 12px;
    margin-top: 0;
}

.settings-help-note {
    color: var(--ink-faint);
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* TABLET */
@media (max-width: 1100px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .bottom-row {
        grid-template-columns: 1fr;
    }

    .budget-section-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .mobile-header {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
        padding: 0 16px 60px;
        padding-top: 72px;
    }

    .greeting-row {
        flex-direction: column;
    }

    .page-title {
        font-size: 24px;
    }

    .greeting-actions {
        width: 100%;
    }

    .greeting-actions .btn-primary,
    .greeting-actions .btn-secondary {
        flex: 1;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 680px) {
    .summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-amount {
        font-size: 22px;
    }

    .summary-card {
        padding: 16px;
    }

    .chart-card {
        padding: 18px;
    }

    .chart-stats-row {
        gap: 16px;
    }

    .chart-stat-value {
        font-size: 18px;
    }

    .transactions-card,
    .goals-card {
        padding: 18px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        padding: 16px 0 12px;
    }

    .search-bar {
        max-width: none;
    }
}

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

    .card-amount {
        font-size: 26px;
    }

    .main-wrapper {
        padding: 0 12px 40px;
        padding-top: 68px;
    }

    .page-title {
        font-size: 22px;
    }

    .month-nav-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .greeting-actions {
        flex-direction: column;
    }

    .greeting-actions .btn-primary,
    .greeting-actions .btn-secondary {
        width: 100%;
    }

    .tx-item {
        gap: 10px;
        padding: 10px 12px;
    }

    .tx-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .modal {
        padding: 24px 18px;
    }

    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        text-align: center;
    }

    .chart-period-toggle {
        order: 2;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--ink-light);
}

/* ENHANCED BUTTON STYLES */
button:focus-visible {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

/* TOAST NOTIFICATIONS */
.toast {
    animation: slideInUp 0.3s ease-out forwards;
    box-shadow: 0 8px 24px rgba(44, 36, 22, 0.15);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* SMOOTH TRANSITIONS */
.modal.active {
    opacity: 1 !important;
    animation: none;
    /* Temporarily disable animation */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* DROPDOWN & MENU ENHANCEMENTS */
.dropdown-menu {
    animation: fadeInDown 0.2s ease-out;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* IMPROVED FORM STYLING */
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(122, 158, 126, 0.1);
}

/* IMPROVED CARD STYLING */
.card {
    transition: all var(--transition);
}

.card:hover {
    box-shadow: 0 8px 32px rgba(44, 36, 22, 0.12);
}

/* BADGE & LABEL ENHANCEMENTS */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--gold-light);
    color: var(--ink);
}

.badge.success {
    background: #d4f1d4;
    color: #1a5e1a;
}

.badge.danger {
    background: #f5d9d9;
    color: #8b1a1a;
}

/* IMPROVED LOADING STATE */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* DARK MODE SUPPORT (for future) */
@media (prefers-color-scheme: dark) {
    :root {
        --cream: #1a1a1a;
        --warm-white: #2a2a2a;
        --ink: #f0f0f0;
        --ink-light: #b0b0b0;
        --ink-faint: #606060;
        --card-bg: #252525;
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Selection */
::selection {
    background: var(--sage-light);
    color: var(--ink);
}

/* ADDITIONAL MEDIA QUERIES EXTENDED */
@media (max-width: 1024px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bottom-row {
        flex-direction: column;
    }

    .right-column {
        flex-direction: column;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .month-nav-bar select,
    .btn-today {
        width: 100%;
        margin-bottom: 8px;
    }

    .tx-right {
        width: 100%;
        text-align: right;
        margin-top: 10px;
    }
}

/* ============================================
   PHOTO EDIT OVERLAY
   ============================================ */
.photo-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44, 36, 22, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-edit-overlay.active {
    display: flex;
    opacity: 1;
}

.photo-edit-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(44, 36, 22, 0.08);
}

.photo-preview-wrapper {
    overflow: hidden;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.photo-edit-overlay.active .photo-edit-container {
    transform: translateY(0);
}

/* Responsive behavior for photo editor */
@media (max-width: 900px) {
    .photo-edit-container {
        max-width: 90%;
        padding: 24px;
    }
}

@media (max-width: 640px) {
    .photo-edit-container {
        max-width: 98%;
        padding: 16px;
    }

    .photo-edit-tabs {
        flex-wrap: wrap;
    }

    .photo-edit-tab {
        font-size: 13px;
        padding: 8px 10px;
        flex: 1 1 45%;
        text-align: center;
    }

    .photo-preview-wrapper {
        max-height: 220px;
    }

    .photo-edit-controls,
    .photo-preview-section,
    .photo-controls-section {
        width: 100%;
    }
}

.photo-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.photo-edit-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
}

.photo-edit-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--ink-faint);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.photo-edit-close:hover {
    color: var(--ink);
    background: var(--cream);
}

.photo-edit-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Photo Edit Tabs */
.photo-edit-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--ink-faint);
    padding-bottom: 12px;
}

.photo-edit-tab {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--ink-faint);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.photo-edit-tab.active {
    background: var(--sage);
    color: white;
}

.photo-edit-tab:hover:not(.active) {
    background: var(--warm-white);
    color: var(--ink);
}

.photo-edit-tab-content {
    display: none;
}

.photo-edit-tab-content.active {
    display: block;
}

/* Preview Section */
.photo-preview-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.photo-preview-image {
    max-width: 100%;
    max-height: 300px;
    display: block;
    border-radius: var(--radius-md);
}

/* Crop Overlay */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    cursor: crosshair;
}

.crop-area {
    position: absolute;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    cursor: move;
    min-width: 50px;
    min-height: 50px;
}

.crop-handle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    cursor: nw-resize;
}

.crop-handle.nw {
    top: -6px;
    left: -6px;
    cursor: nw-resize;
}

.crop-handle.ne {
    top: -6px;
    right: -6px;
    cursor: ne-resize;
}

.crop-handle.sw {
    bottom: -6px;
    left: -6px;
    cursor: sw-resize;
}

.crop-handle.se {
    bottom: -6px;
    right: -6px;
    cursor: se-resize;
}

/* Filter Buttons */
.filter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.filter-btn {
    padding: 8px 12px;
    border: 1px solid var(--ink-faint);
    background: var(--warm-white);
    color: var(--ink);
    font-size: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover {
    border-color: var(--sage);
    background: var(--sage-light);
}

.filter-btn.active {
    background: var(--sage);
    color: white;
    border-color: var(--sage);
}

/* Crop Controls */
.crop-presets {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.crop-preset-btn {
    padding: 6px 12px;
    border: 1px solid var(--ink-faint);
    background: var(--warm-white);
    color: var(--ink);
    font-size: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.crop-preset-btn:hover {
    border-color: var(--sage);
    background: var(--sage-light);
}

.crop-instructions {
    font-size: 12px;
    color: var(--ink-faint);
    text-align: center;
}

/* Resize Controls */
.resize-presets {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.resize-preset-btn {
    padding: 6px 12px;
    border: 1px solid var(--ink-faint);
    background: var(--warm-white);
    color: var(--ink);
    font-size: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.resize-preset-btn:hover {
    border-color: var(--sage);
    background: var(--sage-light);
}

/* Upload Area */
.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 20px;
    border: 2px dashed var(--ink-faint);
    border-radius: var(--radius-lg);
    background: var(--warm-white);
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    min-height: 140px;
}

.upload-area:hover {
    border-color: var(--sage);
    background: rgba(122, 158, 126, 0.05);
}

.upload-area.loading {
    pointer-events: none;
    opacity: 0.6;
}

.upload-icon {
    font-size: 36px;
    color: var(--sage);
}

.upload-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

.upload-hint {
    font-size: 12px;
    color: var(--ink-faint);
}

.upload-input {
    display: none;
}

/* Preview Section */
.photo-preview-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.photo-preview-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-light);
}

.photo-preview-container {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(44, 36, 22, 0.08);
}

.photo-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-placeholder {
    font-size: 48px;
    color: var(--ink-faint);
}

/* Controls Section */
.photo-controls-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--sage-dark);
}

/* Slider Input */
.photo-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--cream);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.photo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--sage);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(122, 158, 126, 0.3);
    transition: all 0.15s;
}

.photo-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(122, 158, 126, 0.4);
}

.photo-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--sage);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(122, 158, 126, 0.3);
    transition: all 0.15s;
}

.photo-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(122, 158, 126, 0.4);
}

/* Buttons Section */
.photo-edit-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.photo-edit-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 40px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.01em;
}

.photo-edit-btn-save {
    background: var(--sage-dark);
    color: #fff;
}

.photo-edit-btn-save:hover {
    background: var(--sage-darker);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(77, 122, 82, 0.3);
}

.photo-edit-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.photo-edit-btn-cancel {
    background: var(--card-bg);
    color: var(--ink);
    border: 1.5px solid rgba(44, 36, 22, 0.12);
}

.photo-edit-btn-cancel:hover {
    background: var(--warm-white);
    border-color: var(--ink-faint);
}

/* Loading State */
.photo-edit-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    color: var(--ink-light);
    font-size: 13px;
}

.photo-edit-loading.active {
    display: flex;
}

.edit-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--sage-light);
    border-top-color: var(--sage-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success State */
.photo-edit-success {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: rgba(122, 158, 126, 0.1);
    border-radius: var(--radius);
    color: var(--sage-dark);
    font-size: 13px;
    font-weight: 500;
}

.photo-edit-success.active {
    display: flex;
}

.success-icon {
    font-size: 18px;
}

/* Error State */
.photo-edit-error {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(212, 115, 90, 0.1);
    border-radius: var(--radius);
    color: var(--coral);
    font-size: 12px;
    font-weight: 500;
    border-left: 3px solid var(--coral);
}

.photo-edit-error.active {
    display: flex;
}

.error-icon {
    font-size: 16px;
    flex-shrink: 0;
}

/* ============================================
   SPENDING HEATMAP
   ============================================ */
.heatmap-card {
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.9), rgba(238, 248, 241, 0.95));
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: 0 14px 36px rgba(50, 73, 65, 0.16);
    border: 1px solid rgba(90, 150, 121, 0.18);
}

.heatmap-calendar {
    width: 100%;
}

.heatmap-cell {
    border: 1px solid rgba(107, 142, 118, 0.22);
}

.heatmap-cell:not(.empty):hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(47, 101, 80, 0.2);
    border-color: rgba(55, 134, 98, 0.45);
}

.intensity-0 {
    background: #fafdfb;
}

.intensity-1 {
    background: #dff8e7;
}

.intensity-2 {
    background: #b5e6c7;
}

.intensity-3 {
    background: #7ac69f;
}

.intensity-4 {
    background: #3f9b70;
}

.heatmap-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 16px;
    text-align: center;
}

.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 16px;
}

.heatmap-day-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-faint);
    text-align: center;
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all var(--transition);
    cursor: pointer;
}

.heatmap-cell.empty {
    background: transparent;
    cursor: default;
}

.heatmap-cell:not(.empty):hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xs);
}

.heatmap-day {
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1;
}

.heatmap-amount {
    font-size: 9px;
    font-weight: 600;
    color: var(--ink);
    margin-top: 2px;
    line-height: 1;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-faint);
}

.legend-colors {
    display: flex;
    gap: 2px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.intensity-0 {
    background: var(--cream);
}

.intensity-1 {
    background: #e8f4f0;
}

.intensity-2 {
    background: var(--sage-light);
}

.intensity-3 {
    background: var(--sage);
}

.intensity-4 {
    background: var(--sage-dark);
}

/* ============================================
   SUBSCRIPTIONS
   ============================================ */
.subscriptions-section {
    background: linear-gradient(120deg, #f8fff9 0%, #f2f9ff 100%);
    border: 1px solid rgba(122, 158, 126, 0.18);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin: 18px 0;
    box-shadow: 0 24px 40px rgba(44, 36, 22, 0.06);
}

.subscriptions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.subscriptions-header h1 {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    color: #276b58;
    letter-spacing: -0.02em;
}

.subscriptions-header .btn-primary,
.subscriptions-header .btn-secondary {
    margin-top: 6px;
}

.subscriptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.subscription-card {
    background: #ffffff;
    border: 1px solid rgba(44, 36, 22, 0.06);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 14px 24px rgba(44, 36, 22, 0.08);
    transition: all var(--transition);
}

.subscription-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(44, 36, 22, 0.12);
}

.subscription-header {
    margin-bottom: 14px;
}

.subscription-name {
    font-size: 22px;
    letter-spacing: 0.01em;
}

.subscription-category,
.subscription-frequency {
    color: #4d4e61;
    font-size: 14px;
}

.subscription-amount {
    font-size: 20px;
    font-weight: 700;
    color: #277b52;
}

.subscription-actions {
    margin-top: 12px;
}

/* Subscription manager responsive */
@media (max-width: 900px) {
    .subscriptions-section {
        padding: 22px;
    }

    .subscriptions-header h1 {
        font-size: 34px;
    }

    .subscription-card {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .subscriptions-header {
        flex-direction: column;
        align-items: stretch;
    }

    .subscriptions-header h1 {
        font-size: 28px;
        text-align: left;
    }

    .subscriptions-section {
        padding: 16px;
    }
}


.subscription-card {
    padding: 24px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subscription-card::before {
    content: '';
    position: absolute;
    left: -50px;
    top: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(122, 158, 126, 0.15) 0%, rgba(122, 158, 126, 0) 70%);
    pointer-events: none;
}

.subscription-card:hover {
    box-shadow: 0 24px 40px rgba(36, 41, 59, 0.18);
    transform: translateY(-4px);
    border-color: rgba(122, 158, 126, 0.4);
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 0;
}

.subscription-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

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

.subscription-name {
    font-size: 18px;
    font-weight: 700;
    color: #1c4f40;
    margin: 0 0 6px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subscription-category {
    font-size: 13px;
    color: #54786d;
    text-transform: capitalize;
    font-weight: 500;
    margin-bottom: 4px;
}

.subscription-frequency {
    font-size: 12px;
    color: #688a7e;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(104, 136, 126, 0.1);
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-block;
}

.subscription-amount {
    font-size: 20px;
    font-weight: 800;
    color: #2f7d57;
    margin: 0;
    text-align: right;
    letter-spacing: -0.02em;
}

.subscription-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.subscription-card:hover .subscription-actions {
    opacity: 1;
}

.subscription-delete {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #d4735a;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(212, 115, 90, 0.2);
}

.subscription-delete:hover {
    background: #d4735a;
    color: white;
    transform: scale(1.05);
}

.subscription-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.subscription-amount {
    font-size: 18px;
    font-weight: 700;
}

.income-amount {
    color: var(--sage-dark);
}

.expense-amount {
    color: var(--coral);
}

.subscription-frequency,
.subscription-next {
    font-size: 12px;
    color: var(--ink-faint);
    text-align: right;
}

.subscription-next {
    margin-top: 2px;
}

/* Crop Tools */
.crop-tools {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--warm-white);
    border-radius: var(--radius);
    border: 1px solid rgba(44, 36, 22, 0.06);
}

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

.crop-tool-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crop-tool-buttons {
    display: flex;
    gap: 6px;
}

.crop-tool-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid rgba(44, 36, 22, 0.1);
    background: var(--card-bg);
    color: var(--ink-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.crop-tool-btn:hover {
    border-color: var(--sage);
    color: var(--sage-dark);
    background: rgba(122, 158, 126, 0.05);
}

.crop-tool-btn.active {
    background: var(--sage-light);
    border-color: var(--sage);
    color: #fff;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(44, 36, 22, 0.12);
    background: var(--card-bg);
    color: var(--ink-light);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: capitalize;
}

.filter-btn:hover {
    border-color: var(--sage);
    color: var(--sage-dark);
}

.filter-btn.active {
    background: var(--sage);
    border-color: var(--sage);
    color: #fff;
    font-weight: 600;
}

/* ============================================
   PHOTO EDITOR MODAL (PREMIUM)
   ============================================ */
.photo-edit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.photo-edit-overlay.active {
    display: flex;
}

.photo-edit-container {
    background: var(--card-bg);
    width: 95%;
    max-width: 440px;
    height: 640px;
    /* Strong fixed height for layout stability */
    max-height: 95vh;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.photo-edit-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-faint);
    flex-shrink: 0;
    width: 100%;
}

.photo-edit-header h2 {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--ink);
    margin: 0;
}

.photo-edit-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--ink-faint);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.photo-edit-close:hover {
    color: var(--coral);
}

.photo-edit-content {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Grow to fill space but push buttons to bottom */
    overflow-y: auto;
    /* Only allow content to scroll if needed */
    width: 100%;
}

.photo-preview-section {
    margin-bottom: 12px;
}

.photo-preview-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--ink-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    text-align: center;
}

.photo-preview-container {
    width: 200px;
    /* Slightly larger to look better */
    height: 200px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    background: var(--warm-white);
    border: 4px solid var(--card-bg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.photo-preview-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: move;
}

.photo-preview-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    /* Initial centering */
    transform-origin: center;
    user-select: none;
    pointer-events: none;
    display: block;
}

/* REMOVE TOP RIGHT AVATAR */
.profile-trigger-avatar {
    display: none !important;
}

/* SIDEBAR AVATAR WITH MULTI-COLOR BOUNDARY */
.sidebar-user .user-avatar {
    position: relative;
    box-sizing: border-box;
    padding: 3px;
    background: linear-gradient(135deg, #4d7a52, #a8c5ac, #e8a87c, #7ab8c4);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Fixed circular frame mask */
.photo-frame-curtain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    border: 2px solid var(--sage);
    z-index: 10;
}

.photo-edit-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    background: var(--warm-white);
    padding: 4px;
    border-radius: 12px;
}

.photo-edit-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-light);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.photo-edit-tab.active {
    background: var(--card-bg);
    color: var(--sage-dark);
    box-shadow: var(--shadow-xs);
}

.photo-edit-tab-content {
    display: none;
}

.photo-edit-tab-content.active {
    display: block;
}

.crop-controls,
.reposition-controls {
    background: var(--warm-white);
    padding: 16px;
    border-radius: 16px;
}

.reposition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 240px;
    margin: 0 auto;
}

.reposition-grid button {
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
}

.photo-edit-buttons {
    display: flex;
    gap: 12px;
    padding: 24px;
    background: var(--warm-white);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.photo-edit-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.photo-edit-btn-cancel {
    background: var(--card-bg);
    color: var(--ink-light);
    border: 1px solid var(--border-medium);
}

.photo-edit-btn-save {
    background: var(--sage);
    color: white;
}

.photo-edit-btn-save:hover {
    background: var(--sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(77, 122, 82, 0.2);
}

.photo-edit-btn-save:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.photo-edit-loading,
.photo-edit-success,
.photo-edit-error {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
}

.photo-edit-loading.active,
.photo-edit-success.active,
.photo-edit-error.active {
    display: flex;
}

.edit-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--sage-light);
    border-top-color: var(--sage-dark);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.success-icon {
    font-size: 40px;
    color: var(--sage-dark);
}

.error-icon {
    font-size: 40px;
    color: var(--coral);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.photo-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 640px) {
    .photo-edit-container {
        width: 100%;
        max-width: calc(100% - 32px);
        margin: 16px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .photo-edit-header {
        padding: 16px 20px;
    }

    .photo-edit-content {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }

    .photo-preview-container {
        width: 200px;
        height: 200px;
    }

    .photo-edit-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .photo-edit-buttons {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .photo-edit-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .photo-preview-container {
        width: 170px;
        height: 170px;
    }

    .photo-edit-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .photo-edit-buttons {
        padding: 12px 20px;
    }

    .photo-edit-btn {
        padding: 12px;
        font-size: 13px;
    }
}

/* Global responsive improvements */
@media (max-width: 1100px) {
    .main-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 0 16px 56px;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .greeting-row {
        gap: 12px;
        margin-bottom: 18px;
    }

    .greeting-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .subscriptions-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .summary-card,
    .subscription-card,
    .monthly-savings-card {
        padding: 16px;
    }
}

@media (max-width: 800px) {

    .sidebar,
    .sidebar-collapsed {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 990;
        transform: translateX(-100%);
        transition: transform .3s ease;
        width: 240px;
    }

    .sidebar.active {
        transform: translateX(0);
        left: 0;
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
        padding: 0 12px 50px;
    }

    .greeting-row {
        flex-direction: column;
        align-items: stretch;
    }

    .greeting-actions {
        justify-content: stretch;
    }

    .transactions-header,
    .filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .modal {
        width: min(96%, 480px);
        max-width: 480px;
        padding: 20px;
    }

    .subscriptions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .main-wrapper {
        padding: 0 8px 40px;
    }

    .greeting-row {
        margin-bottom: 12px;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .summary-card,
    .subscription-card {
        padding: 14px;
    }

    .modal {
        width: 92vw;
        max-width: 92vw;
        padding: 16px;
    }

    .sub-title,
    .content-title {
        font-size: 1rem;
    }
}

/* Additional Photo Editor Styles */
.photo-edit-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(44, 36, 22, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edit-photo-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.edit-photo-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #fff;
}

.profile-picture-preview-large {
    width: 100%;
    height: 100%;
    font-size: 42px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 50%;
}

/* Delete Confirmation Modal */
.delete-photo-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.delete-photo-overlay.active {
    display: flex;
}

.delete-photo-container {
    background: var(--card-bg);
    max-width: 400px;
    width: 100%;
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.delete-photo-icon {
    font-size: 48px;
    color: var(--coral);
    margin-bottom: 20px;
}

.delete-photo-container h3 {
    margin-bottom: 12px;
    color: var(--ink);
}

.delete-photo-container p {
    color: var(--ink-light);
    font-size: 14px;
    margin-bottom: 24px;
}

.delete-photo-actions {
    display: flex;
    gap: 12px;
}

.photo-edit-wrapper:hover .photo-overlay {
    opacity: 1;
}

/* --- SKELETON LOADING --- */
body.loading-state .stat-amount,
body.loading-state .stat-change,
body.loading-state .tx-list,
body.loading-state .donut-center,
body.loading-state #donutSegments,
body.loading-state #chartLegend,
body.loading-state #spendingCanvas,
body.loading-state .chart-meta-val {
    position: relative;
    overflow: hidden;
    color: transparent !important;
    background: transparent !important;
    border-color: transparent !important;
    pointer-events: none;
}

body.loading-state .stat-amount::after,
body.loading-state .stat-change::after,
body.loading-state .tx-list::after,
body.loading-state .donut-center::after,
body.loading-state #donutSegments::after,
body.loading-state #chartLegend::after,
body.loading-state #spendingCanvas::after,
body.loading-state .chart-meta-val::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0ebe3 25%, #e6dfd3 50%, #f0ebe3 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    z-index: 10;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

#globalLoader {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 99999;
}

#globalLoader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.loading-state #globalLoader {
    display: flex !important;
}

.btn-text-only {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    color: var(--sage-dark);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.2s;
    margin: 0;
}

.btn-text-only:hover {
    opacity: 0.7;
}