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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #1a1a2e;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 0 20px 30px;
    border-bottom: 1px solid #2a2a3e;
    margin-bottom: 20px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #eee;
}

.menu {
    list-style: none;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: #aaa;
}

.menu-item:hover {
    background-color: #2a2a3e;
    color: #fff;
}

.menu-item.active {
    background-color: #4a4a6a;
    color: #fff;
}

.menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.menu-item.active img {
    opacity: 1;
}

.menu-item span {
    font-size: 0.95rem;
}

/* Content Area Styles */
.content {
    margin-left: 250px;
    flex: 1;
    padding: 40px;
    background-color: #fff;
    min-height: 100vh;
}

/* Title Bar Styles */
.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.title-bar-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.title-bar-right {
    display: flex;
    align-items: center;
}

.date-info, .time-info, .location-info {
    font-size: 0.95rem;
    color: #555;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background-color: #d0d0d0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.theme-toggle:hover {
    background-color: #dee2e6;
    transform: scale(1.1);
}

.theme-toggle .light-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    /*filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000) brightness(0) saturate(100%) invert(91%) sepia(18%) saturate(560%) hue-rotate(357deg) brightness(101%) contrast(101%);*/
}

.theme-toggle .dark-icon {
    display: none;
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(89%) sepia(0%) saturate(0%) hue-rotate(213deg) brightness(106%) contrast(93%);
}

body.dark-mode .theme-toggle {
    background-color: #2a2a3e;
}

body.dark-mode .theme-toggle .light-icon {
    display: none;
}

body.dark-mode .theme-toggle .dark-icon {
    display: block;
}

.time-info {
    display: flex;
    gap: 10px;
    font-weight: 600;
    color: #333;
}

#currentTime {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 1.1rem;
}

#timezone {
    color: #888;
    font-size: 0.85rem;
    align-self: center;
}

#location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-section {
    display: none;
}

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

.content-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.content-placeholder {
    background-color: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #888;
}

.content-placeholder p {
    font-size: 1rem;
}

/* Income/Expense Buttons */
.income-expense-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

#income-expense .content-placeholder {
    margin-top: 40px;
}

.income-btn,
.expense-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px dashed #ccc;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 10px;
}

.income-btn:hover {
    border-color: #4caf50;
    background-color: #f0f9f0;
    transform: scale(1.05);
}

.expense-btn:hover {
    border-color: #f44336;
    background-color: #fff0f0;
    transform: scale(1.05);
}

.income-btn img,
.expense-btn img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.income-btn span,
.expense-btn span {
    font-size: 0.95rem;
    color: #666;
}

.income-btn:hover span {
    color: #4caf50;
}

.expense-btn:hover span {
    color: #f44336;
}

/* Dark mode for Income/Expense buttons */
body.dark-mode .income-btn,
body.dark-mode .expense-btn {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .income-btn span,
body.dark-mode .expense-btn span {
    color: #aaa;
}

body.dark-mode .income-btn img,
body.dark-mode .expense-btn img {
    filter: brightness(0) invert(1) opacity(0.7);
}

body.dark-mode .income-btn:hover {
    background-color: #1a3a1a;
    border-color: #4caf50;
}

body.dark-mode .expense-btn:hover {
    background-color: #3a1a1a;
    border-color: #f44336;
}

/* Settings Page Styles */
.settings-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 3px dashed #ccc;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 15px;
}

.google-signin-btn img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.google-signin-btn:hover {
    border-color: #4285f4;
    background-color: #f0f7ff;
    transform: scale(1.05);
}

.plus-icon {
    font-size: 4rem;
    color: #4285f4;
    font-weight: 300;
    line-height: 1;
}

.hint-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    padding: 0 20px;
    line-height: 1.4;
}

/* Dark Mode Styles */
body.dark-mode {
    background-color: #121212;
}

body.dark-mode .content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

body.dark-mode .title-bar {
    background-color: #2a2a2a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .date-info,
body.dark-mode .time-info,
body.dark-mode .location-info {
    color: #b0b0b0;
}

body.dark-mode .time-info {
    color: #e0e0e0;
}

body.dark-mode #timezone {
    color: #888;
}

body.dark-mode .content-section h2 {
    color: #e0e0e0;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .content-placeholder {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #888;
}

body.dark-mode .google-signin-btn {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .google-signin-btn:hover {
    background-color: #333;
}

body.dark-mode .hint-text {
    color: #aaa;
}

body.dark-mode .google-signin-btn img {
    filter: brightness(0) invert(1) opacity(0.7);
}

/* Wallets Page Styles */
.wallets-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.add-wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px dashed #ccc;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 10px;
    align-self: center;
}

.add-wallet-btn:hover {
    border-color: #4285f4;
    background-color: #f0f7ff;
    transform: scale(1.05);
}

.add-wallet-btn .plus-icon {
    font-size: 3rem;
    color: #4285f4;
    font-weight: 300;
    line-height: 1;
}

.add-wallet-btn .btn-text {
    font-size: 0.9rem;
    color: #666;
}

.wallets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wallet-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
    position: relative;
}

.wallet-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wallet-edit-btn,
.wallet-delete-btn {
    position: absolute;
    top: 2px;
    width: 0px;
    height: 0px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.wallet-edit-btn {
    right: 45px;
}

.wallet-delete-btn {
    right: 5px;
}

.wallet-item:hover .wallet-edit-btn,
.wallet-item:hover .wallet-delete-btn {
    opacity: 1;
    transform: scale(0.72);
}

.wallet-edit-btn:hover {
    background-color: rgba(46, 125, 50, 0.15);
    transform: scale(0.8);
}

.wallet-edit-btn:hover img {
    filter: brightness(0) saturate(100%) invert(39%) sepia(58%) saturate(443%) hue-rotate(89deg) brightness(92%) contrast(88%);
}

.wallet-edit-btn img {
    width: 10px;
    height: 10px;
    object-fit: contain;
}

.wallet-delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.15);
    transform: scale(0.8);
}

.wallet-delete-btn:hover img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(97%) saturate(2092%) hue-rotate(346deg) brightness(97%) contrast(96%);
}

.wallet-delete-btn img {
    width: 10px;
    height: 10px;
    object-fit: contain;
}

.wallet-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.wallet-item-info {
    flex: 1;
}

.wallet-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.wallet-item-amount {
    color: #4285f4;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

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

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background-color: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #e0e0e0;
    color: #333;
}

.modal-content h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

/* Radio button group styles */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4285f4;
}

.radio-label span {
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group select {
    cursor: pointer;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4285f4;
}

.form-group input:focus {
    outline: none;
    border-color: #4285f4;
}

.icon-selection {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 35px 5px 10px 5px;
}

.icon-option {
    position: relative;
}

.icon-option:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
    pointer-events: none;
}

.icon-option {
    width: 50px;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 5px;
    position: relative;
}

.icon-option:hover {
    border-color: #4285f4;
    background-color: #f0f7ff;
}


.icon-option.selected {
    border-color: #4285f4;
    background-color: #e3f2fd;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.2);
}

.icon-option img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
}

.btn-cancel:hover {
    background-color: #e0e0e0;
}

.btn-submit {
    background-color: #4285f4;
    border: 1px solid #4285f4;
    color: #fff;
}

.btn-submit:hover {
    background-color: #3367d6;
}

/* Dark Mode for Wallets */
body.dark-mode .wallets-content .add-wallet-btn {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .add-wallet-btn .btn-text {
    color: #aaa;
}

body.dark-mode .wallet-item {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .wallet-item-name {
    color: #e0e0e0;
}

body.dark-mode .modal-content {
    background-color: #1e1e1e;
}

body.dark-mode .modal-content h3 {
    color: #e0e0e0;
}

body.dark-mode .form-group label {
    color: #b0b0b0;
}

body.dark-mode .form-group input[type="text"],
body.dark-mode .form-group input[type="number"] {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .radio-group {
    gap: 20px;
}

body.dark-mode .radio-label {
    color: #b0b0b0;
}

body.dark-mode .radio-label input[type="radio"] {
    accent-color: #4285f4;
}

body.dark-mode .modal-close {
    background-color: #2a2a2a;
    color: #aaa;
}

body.dark-mode .modal-close:hover {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .icon-option {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .icon-option:hover,
body.dark-mode .icon-option.selected {
    border-color: #4285f4;
    background-color: #1a3a5c;
}

body.dark-mode .wallet-item > img,
body.dark-mode .icon-option img {
    filter: brightness(0) invert(1) opacity(0.7);
}

body.dark-mode .wallet-edit-btn img,
body.dark-mode .wallet-delete-btn img {
    filter: brightness(0) invert(1) opacity(0.5);
}

body.dark-mode .wallet-edit-btn:hover img {
    filter: brightness(0) saturate(100%) invert(39%) sepia(58%) saturate(443%) hue-rotate(89deg) brightness(92%) contrast(88%);
}

body.dark-mode .wallet-delete-btn:hover img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(97%) saturate(2092%) hue-rotate(346deg) brightness(97%) contrast(96%);
}

body.dark-mode .btn-cancel {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #aaa;
}

body.dark-mode .btn-cancel:hover {
    background-color: #3a3a3a;
}

/* Income/Expense Modal Dark Mode */
body.dark-mode #incomeExpenseModal .modal-content {
    background-color: #1e1e1e;
}

body.dark-mode #incomeExpenseModal .modal-content h3 {
    color: #e0e0e0;
}

body.dark-mode #incomeExpenseModal .form-group label {
    color: #b0b0b0;
}

body.dark-mode #incomeExpenseModal .form-group input[type="text"],
body.dark-mode #incomeExpenseModal .form-group input[type="number"],
body.dark-mode #incomeExpenseModal .form-group select {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode #incomeExpenseModal .form-group select option {
    background-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode #incomeExpenseModal .btn-cancel {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #aaa;
}

body.dark-mode #incomeExpenseModal .btn-cancel:hover {
    background-color: #3a3a3a;
}

body.dark-mode #incomeExpenseModal .btn-submit {
    background-color: #4285f4;
    border-color: #4285f4;
}

body.dark-mode #incomeExpenseModal .modal-close {
    background-color: #2a2a2a;
    color: #aaa;
}

body.dark-mode #incomeExpenseModal .modal-close:hover {
    background-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .wallet-edit-btn:hover {
    background-color: rgba(46, 125, 50, 0.2);
}

body.dark-mode .wallet-delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.2);
}

/* Categories Page Styles */
.categories-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.add-category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px dashed #ccc;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 10px;
    align-self: center;
}

.add-category-btn:hover {
    border-color: #4285f4;
    background-color: #f0f7ff;
    transform: scale(1.05);
}

.add-category-btn .plus-icon {
    font-size: 3rem;
    color: #4285f4;
    font-weight: 300;
    line-height: 1;
}

.add-category-btn .btn-text {
    font-size: 0.9rem;
    color: #666;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
    position: relative;
}

.category-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.category-edit-btn,
.category-delete-btn {
    position: absolute;
    top: 2px;
    width: 0px;
    height: 0px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.category-edit-btn {
    right: 45px;
}

.category-delete-btn {
    right: 5px;
}

.category-item:hover .category-edit-btn,
.category-item:hover .category-delete-btn {
    opacity: 1;
    transform: scale(0.72);
}

.category-edit-btn:hover {
    background-color: rgba(46, 125, 50, 0.15);
    transform: scale(0.8);
}

.category-edit-btn:hover img {
    filter: brightness(0) saturate(100%) invert(39%) sepia(58%) saturate(443%) hue-rotate(89deg) brightness(92%) contrast(88%);
}

.category-edit-btn img {
    width: 10px;
    height: 10px;
    object-fit: contain;
}

.category-delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.15);
    transform: scale(0.8);
}

.category-delete-btn:hover img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(97%) saturate(2092%) hue-rotate(346deg) brightness(97%) contrast(96%);
}

.category-delete-btn img {
    width: 10px;
    height: 10px;
    object-fit: contain;
}

.category-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.category-item-info {
    flex: 1;
}

.category-item-name {
    font-weight: 600;
    color: #333;
}

/* Dark Mode for Categories */
body.dark-mode .categories-content .add-category-btn {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .add-category-btn .btn-text {
    color: #aaa;
}

body.dark-mode .category-item {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .category-item-name {
    color: #e0e0e0;
}

body.dark-mode .category-item > img,
body.dark-mode .icon-option img {
    filter: brightness(0) invert(1) opacity(0.7);
}

body.dark-mode .category-edit-btn img,
body.dark-mode .category-delete-btn img {
    filter: brightness(0) invert(1) opacity(0.5);
}

body.dark-mode .category-edit-btn:hover img {
    filter: brightness(0) saturate(100%) invert(39%) sepia(58%) saturate(443%) hue-rotate(89deg) brightness(92%) contrast(88%);
}

body.dark-mode .category-delete-btn:hover img {
    filter: brightness(0) saturate(100%) invert(27%) sepia(97%) saturate(2092%) hue-rotate(346deg) brightness(97%) contrast(96%);
}

body.dark-mode .category-edit-btn:hover {
    background-color: rgba(46, 125, 50, 0.2);
}

body.dark-mode .category-delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.2);
}

/* Transactions Page Styles */
.transactions-content {
    margin-top: 20px;
}

.transactions-header {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #dc3545;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.clear-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

body.dark-mode .clear-btn {
    background-color: #dc3545;
}

body.dark-mode .clear-btn:hover {
    background-color: #c82333;
}

body.dark-mode .clear-btn img {
    filter: brightness(0) invert(1);
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: #2e7d32;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background-color: #1b5e20;
    transform: translateY(-1px);
}

.download-btn img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

body.dark-mode .download-btn {
    background-color: #4285f4;
}

body.dark-mode .download-btn:hover {
    background-color: #3367d6;
}

body.dark-mode .download-btn img {
    filter: brightness(0) invert(1);
}

.transactions-table-container {
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.transactions-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.transactions-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.transactions-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.transactions-table tbody tr:hover {
    background-color: #f8f9fa;
}

.transactions-table tbody tr:last-child td {
    border-bottom: none;
}

/* Empty State Styles */
.transactions-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 60px 20px;
    text-align: center;
}

.transactions-empty-state .empty-state-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    opacity: 0.5;
}

.transactions-empty-state p {
    font-size: 1.1rem;
    color: #888;
    margin: 0;
    font-weight: 500;
}

.transactions-empty-state .empty-state-hint {
    font-size: 0.9rem;
    color: #aaa;
    text-align: center;
    max-width: 300px;
    line-height: 1.4;
}

body.dark-mode .transactions-empty-state p {
    color: #aaa;
}

body.dark-mode .transactions-empty-state .empty-state-hint {
    color: #888;
}

body.dark-mode .transactions-empty-state .empty-state-icon {
    filter: brightness(0) invert(1) opacity(0.3);
}

.transaction-type {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.transaction-type.income-transaction {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.transaction-type.expense-transaction {
    background-color: #ffebee;
    color: #c62828;
}

.transaction-amount {
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.transaction-amount.amount-income {
    color: #2e7d32;
}

.transaction-amount.amount-expense {
    color: #c62828;
}

/* Dark Mode for Transactions */
body.dark-mode .transactions-table-container {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
}

body.dark-mode .transactions-table thead {
    background-color: #333333;
    border-bottom-color: #444444;
}

body.dark-mode .transactions-table th {
    color: #b0b0b0;
}

body.dark-mode .transactions-table td {
    color: #e0e0e0;
    border-bottom-color: #3a3a3a;
}

body.dark-mode .transactions-table tbody tr:hover {
    background-color: #333333;
}

body.dark-mode .transaction-type.income-transaction {
    background-color: #1b5e20;
    color: #81c784;
}

body.dark-mode .transaction-type.expense-transaction {
    background-color: #b71c1c;
    color: #e57373;
}

body.dark-mode .transaction-amount.amount-income {
    color: #81c784;
}

body.dark-mode .transaction-amount.amount-expense {
    color: #e57373;
}

/* ========================================
   Income/Expense Summary Section
   ======================================== */

.summary-section {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.summary-card .card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-card .card-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.income-card .card-icon {
    background-color: rgba(76, 175, 80, 0.15);
}

.expense-card .card-icon {
    background-color: rgba(244, 67, 54, 0.15);
}

.balance-card .card-icon {
    background-color: rgba(66, 133, 244, 0.15);
}

.card-info {
    flex: 1;
}

.card-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}

.card-amount {
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.income-card .card-amount {
    color: #2e7d32;
}

.expense-card .card-amount {
    color: #c62828;
}

.balance-card .card-amount {
    color: #1976d2;
}

/* Monthly Stats */
.monthly-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

/* Charts Container */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.chart-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-card h3 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Dark Mode for Summary Section */
body.dark-mode .summary-card {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .card-label {
    color: #aaa;
}

body.dark-mode .income-card .card-amount {
    color: #81c784;
}

body.dark-mode .expense-card .card-amount {
    color: #e57373;
}

body.dark-mode .balance-card .card-amount {
    color: #64b5f6;
}

body.dark-mode .stat-card {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .chart-card {
    background-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .chart-card h3 {
    color: #b0b0b0;
}

/* Income/Expense Summary Section - Responsive */
@media screen and (max-width: 768px) {
    .summary-cards {
        grid-template-columns: 1fr;
    }

    .summary-card {
        padding: 15px;
    }

    .summary-card .card-icon {
        width: 45px;
        height: 45px;
    }

    .summary-card .card-icon img {
        width: 28px;
        height: 28px;
    }

    .card-amount {
        font-size: 1.2rem;
    }

    .monthly-stats {
        grid-template-columns: 1fr;
    }

    .stat-value {
        font-size: 1.3rem;
    }

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

    .chart-card {
        padding: 15px;
    }

    .chart-card h3 {
        font-size: 0.95rem;
    }

    .chart-wrapper {
        height: 220px;
    }
}

@media screen and (max-width: 480px) {
    .summary-card {
        padding: 12px;
        gap: 12px;
    }

    .summary-card .card-icon {
        width: 40px;
        height: 40px;
    }

    .summary-card .card-icon img {
        width: 24px;
        height: 24px;
    }

    .card-label {
        font-size: 0.8rem;
    }

    .card-amount {
        font-size: 1.1rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .chart-card {
        padding: 12px;
    }

    .chart-card h3 {
        font-size: 0.85rem;
    }

    .chart-wrapper {
        height: 200px;
    }
}

/* Income/Expense Summary Section */

/* Tablet and below (max-width: 1024px) */
@media screen and (max-width: 1024px) {
    .content {
        margin-left: 200px;
        padding: 30px 20px;
    }

    .sidebar {
        width: 200px;
    }

    .title-bar-left {
        gap: 15px;
    }
}

/* Mobile devices (max-width: 768px) */
@media screen and (max-width: 768px) {
    /* Container and Layout */
    .container {
        flex-direction: column;
    }

    /* Sidebar - Convert to bottom navigation bar */
    .sidebar {
        width: 100%;
        height: auto;
        min-height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px 0;
        background-color: #1a1a2e;
        border-top: 1px solid #2a2a3e;
        z-index: 100;
    }

    .logo {
        display: none;
    }

    .menu {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 0;
    }

    .menu-item {
        flex-direction: column;
        padding: 8px 12px;
        gap: 4px;
        font-size: 0.75rem;
    }

    .menu-item img {
        width: 20px;
        height: 20px;
        margin-right: 0;
    }

    .menu-item span {
        font-size: 0.7rem;
        text-align: center;
    }

    /* Content area */
    .content {
        margin-left: 0;
        margin-bottom: 70px;
        padding: 20px 15px;
        min-height: calc(100vh - 70px);
    }

    /* Title bar - Stack vertically */
    .title-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        margin-bottom: 15px;
    }

    .title-bar-left {
        flex-direction: column;
        gap: 8px;
        width: 100%;
        text-align: center;
    }

    .title-bar-right {
        width: 100%;
        justify-content: center;
    }

    .date-info,
    .time-info,
    .location-info {
        font-size: 0.85rem;
    }

    #currentTime {
        font-size: 1rem;
    }

    #timezone {
        font-size: 0.75rem;
    }

    /* Section headings */
    .content-section h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    /* Income/Expense buttons */
    .income-expense-buttons {
        gap: 20px;
        margin-top: 20px;
    }

    .income-btn,
    .expense-btn {
        width: 120px;
        height: 120px;
    }

    .income-btn img,
    .expense-btn img {
        width: 40px;
        height: 40px;
    }

    .income-btn span,
    .expense-btn span {
        font-size: 0.85rem;
    }

    /* Settings button */
    .google-signin-btn {
        width: 200px;
        height: 200px;
    }

    .google-signin-btn img {
        width: 40px;
        height: 40px;
    }

    .plus-icon {
        font-size: 3rem;
    }

    /* Wallets and Categories */
    .add-wallet-btn,
    .add-category-btn {
        width: 150px;
        height: 150px;
    }

    .add-wallet-btn .plus-icon,
    .add-category-btn .plus-icon {
        font-size: 2.5rem;
    }

    .add-wallet-btn .btn-text,
    .add-category-btn .btn-text {
        font-size: 0.8rem;
    }

    .wallets-list,
    .categories-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .wallet-item,
    .category-item {
        padding: 15px;
    }

    .wallet-item img,
    .category-item img {
        width: 40px;
        height: 40px;
    }

    .wallet-item-amount {
        font-size: 1rem;
    }

    /* Transactions table - Make scrollable */
    .transactions-header {
        flex-direction: column;
        gap: 10px;
    }

    .clear-btn,
    .download-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .clear-btn img,
    .download-btn img {
        width: 18px;
        height: 18px;
    }

    .transactions-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .transactions-table {
        min-width: 600px;
    }

    .transactions-table th,
    .transactions-table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }

    /* Empty state responsive */
    .transactions-empty-state {
        padding: 40px 20px;
    }

    .transactions-empty-state .empty-state-icon {
        width: 48px;
        height: 48px;
    }

    .transactions-empty-state p {
        font-size: 1rem;
    }

    .transactions-empty-state .empty-state-hint {
        font-size: 0.85rem;
        max-width: 250px;
    }

    /* Modal responsive */
    .modal-content {
        width: 95%;
        max-width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content h3 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }

    .radio-group {
        gap: 15px;
    }

    .radio-label {
        font-size: 0.9rem;
    }

    .radio-label input[type="radio"] {
        width: 16px;
        height: 16px;
    }

    .icon-selection {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 20px 5px 10px 5px;
    }

    .icon-option {
        width: 45px;
        height: 45px;
    }

    .form-actions {
        gap: 10px;
    }

    .btn-cancel,
    .btn-submit {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
}

/* Small mobile devices (max-width: 480px) */
@media screen and (max-width: 480px) {
    .content {
        padding: 15px 10px;
        margin-bottom: 65px;
    }

    .title-bar {
        padding: 12px 10px;
        margin-bottom: 12px;
    }

    .date-info,
    .time-info,
    .location-info {
        font-size: 0.75rem;
    }

    #currentTime {
        font-size: 0.9rem;
    }

    /* Income/Expense buttons - smaller */
    .income-btn,
    .expense-btn {
        width: 100px;
        height: 100px;
    }

    .income-btn img,
    .expense-btn img {
        width: 32px;
        height: 32px;
    }

    .income-btn span,
    .expense-btn span {
        font-size: 0.75rem;
    }

    /* Settings */
    .google-signin-btn {
        width: 160px;
        height: 160px;
    }

    .google-signin-btn img {
        width: 32px;
        height: 32px;
    }

    .google-signin-btn .hint-text {
        font-size: 0.8rem;
    }

    /* Wallets and Categories */
    .add-wallet-btn,
    .add-category-btn {
        width: 120px;
        height: 120px;
    }

    .add-wallet-btn .plus-icon,
    .add-category-btn .plus-icon {
        font-size: 2rem;
    }

    .add-wallet-btn .btn-text,
    .add-category-btn .btn-text {
        font-size: 0.7rem;
    }

    .wallet-item,
    .category-item {
        padding: 12px;
        gap: 12px;
    }

    .wallet-item img,
    .category-item img {
        width: 36px;
        height: 36px;
    }

    .wallet-item-name {
        font-size: 0.95rem;
    }

    .wallet-item-amount {
        font-size: 0.95rem;
    }

    /* Empty state for small screens */
    .transactions-empty-state {
        padding: 30px 15px;
    }

    .transactions-empty-state .empty-state-icon {
        width: 40px;
        height: 40px;
    }

    .transactions-empty-state p {
        font-size: 0.95rem;
    }

    .transactions-empty-state .empty-state-hint {
        font-size: 0.8rem;
        max-width: 200px;
    }

    /* Edit/Delete buttons - make easier to tap */
    .wallet-edit-btn,
    .wallet-delete-btn,
    .category-edit-btn,
    .category-delete-btn {
        width: 28px;
        height: 28px;
    }

    .wallet-edit-btn img,
    .wallet-delete-btn img,
    .category-edit-btn img,
    .category-delete-btn img {
        width: 12px;
        height: 12px;
    }

    /* Modal adjustments */
    .modal-content {
        padding: 15px;
    }

    .modal-content h3 {
        font-size: 1.1rem;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }

    .icon-selection {
        grid-template-columns: repeat(3, 1fr);
    }

    .icon-option {
        width: 40px;
        height: 40px;
    }

    /* Theme toggle */
    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .theme-toggle .light-icon,
    .theme-toggle .dark-icon {
        width: 20px;
        height: 20px;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        height: auto;
        min-height: auto;
        bottom: 0;
    }

    .content {
        margin-bottom: 60px;
    }

    .menu {
        padding: 5px 0;
    }

    .menu-item {
        padding: 6px 10px;
    }
}

/* Touch-friendly improvements for mobile */
@media screen and (max-width: 768px) {
    /* Increase tap targets for touch */
    .menu-item {
        min-height: 44px;
    }

    .btn-cancel,
    .btn-submit,
    .clear-btn,
    .download-btn,
    .income-btn,
    .expense-btn,
    .add-wallet-btn,
    .add-category-btn {
        min-height: 44px;
    }

    /* Prevent text size adjustments on orientation change */
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Smooth scrolling */
    .content,
    .sidebar {
        -webkit-overflow-scrolling: touch;
    }
}
