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

body {
    font-family: 'Sora', sans-serif;
    background-color: #fafafa;
    color: #1A1A1A;
    padding-bottom: 80px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 20px;
}

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

.header > div h1,
.header > div p {
    margin: 0;
}

.btn-reset {
    padding: 8px 16px;
    background: white;
    border: 1.5px solid #ef4444;
    border-radius: 6px;
    color: #ef4444;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset:hover {
    background: #ef4444;
    color: white;}

.header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1A1A1A;
}

.header p {
    font-size: 14px;
    color: #737373;
    font-weight: 400;
}

/* Toggle Switch */
.toggle-container {
    margin-bottom: 28px;
}

.toggle-switch {
    display: flex;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.toggle-option {
    flex: 1;
    padding: 13px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 14px;
    border: none;
    background: transparent;
    color: #737373;
}

.toggle-option:hover {
    background-color: #f5f5f5;
    color: #1A1A1A;
}

.toggle-option.active {
    background-color: #1A1A1A;
    color: #ffffff;
}

.toggle-option.active:hover {
    background-color: #262626;
}

/* Form Fields */
.form-group {
    margin-bottom: 24px;
}

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

.form-control {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    color: #1A1A1A;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.form-control:hover {
    border-color: #d4d4d4;
}

.form-control:focus {
    outline: none;
    border-color: #1A1A1A;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.06);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%231A1A1A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.add-category-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    font-weight: 400;
}

.add-category-link:hover {
    color: #1A1A1A;
}

.hidden {
    display: none;
}

/* Category Management */
.category-type-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.category-tab {
    flex: 1;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: transparent;
    color: #666;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-tab.active {
    background-color: #1A1A1A;
    color: #ffffff;
    border-color: #1A1A1A;
}

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

.category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #ffffff;
}

.category-name {
    flex: 1;
    font-size: 14px;
    color: #1A1A1A;
}

.category-name.editing {
    display: none;
}

.category-edit-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    display: none;
}

.category-item.editing .category-edit-input {
    display: block;
}

.category-item.editing .category-name {
    display: none;
}

.category-actions {
    display: flex;
    gap: 4px;
}

.category-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #666;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Sora', sans-serif;
}

.category-btn:hover {
    color: #1A1A1A;
    background-color: #f5f5f5;
}

.category-btn.delete:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

.category-btn.save {
    display: none;
}

.category-btn.cancel {
    display: none;
}

.category-item.editing .category-btn.edit {
    display: none;
}

.category-item.editing .category-btn.delete {
    display: none;
}

.category-item.editing .category-btn.save {
    display: inline-block;
    color: #10b981;
}

.category-item.editing .category-btn.cancel {
    display: inline-block;
}

.currency-input-wrapper {
    position: relative;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

.currency-input {
    padding-left: 32px;
}

/* Button */
.btn-primary {
    width: 100%;
    padding: 15px;
    background-color: #1A1A1A;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: #262626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1.5px solid #e5e5e5;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 24px;
    text-decoration: none;
    color: #666;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: #1A1A1A;
}

.nav-item:hover {
    color: #1A1A1A;
}

.nav-icon {
    width: 24px;
    height: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Auth Styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f0f0f0 100%);
}

.auth-card {
    background: #ffffff;
    padding: 48px 40px;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 10px 20px rgba(0, 0, 0, 0.08);
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.auth-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1A1A1A;
}

.auth-subtitle {
    font-size: 15px;
    color: #737373;
    margin-bottom: 40px;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Sora', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1A1A1A;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-google:hover {
    background: #fafafa;
    border-color: #d4d4d4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.btn-google:active {
    transform: translateY(0);
}

.google-icon {
    width: 20px;
    height: 20px;
}

.auth-error {
    margin-top: 16px;
    padding: 12px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #dc2626;
    font-size: 13px;
}

.auth-error.hidden {
    display: none;
}

/* User Profile in Nav */
.user-profile {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1.5px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    z-index: 999;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
}

.btn-signout {
    padding: 6px 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    font-family: 'Sora', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #1A1A1A;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-signout:hover {
    background: #e5e5e5;
}

@media (max-width: 600px) {
    .user-profile {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
    }
    
    .user-name {
        display: none;
    }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1A1A1A;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.success-message.show {
    opacity: 1;
}

/* Ledger Styles */
.transaction-list {
    margin-top: 24px;
}

.transaction-item {
    padding: 18px;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.transaction-item:hover {
    border-color: #d4d4d4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.transaction-info {
    flex: 1;
}

.transaction-category {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.transaction-date {
    font-size: 12px;
    color: #666;
}

.transaction-amount {
    font-size: 16px;
    font-weight: 600;
}

.transaction-amount.income {
    color: #10b981;
}

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

.delete-transaction-btn {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
}

.transaction-item:hover .delete-transaction-btn {
    opacity: 1;
}

.delete-transaction-btn:hover {
    background: #fee;
    color: #ef4444;
}

.delete-transaction-btn:active {
    transform: scale(0.95);
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #666;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Dashboard Styles */
.summary-card {
    padding: 24px;
    border: 1.5px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 16px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.summary-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 28px;
    font-weight: 600;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.summary-grid .summary-card {
    margin-bottom: 0;
}

.summary-grid .summary-value {
    font-size: 20px;
}

/* Chart Styles */
.chart-section {
    margin-top: 32px;
}

.month-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.month-nav-btn {
    background: transparent;
    border: none;
    color: #1A1A1A;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.month-nav-btn:hover {
    opacity: 0.6;
}

.month-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.month-display {
    font-size: 15px;
    font-weight: 500;
    color: #1A1A1A;
    min-width: 140px;
    text-align: center;
}

.chart-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.chart-toggle-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: transparent;
    color: #666;
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-toggle-btn.active {
    background-color: #1A1A1A;
    color: #ffffff;
    border-color: #1A1A1A;
}

.chart-container {
    padding: 24px;
    border: 1.5px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.chart-title {
    font-size: 15px;
    font-weight: 500;
    color: #1A1A1A;
    margin-bottom: 16px;
}

canvas {
    max-width: 100%;
    height: auto !important;
}
