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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Auth Container */
#authContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1000;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    font-size: 1.8rem;
}

.auth-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.auth-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.auth-box button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    transition: opacity 0.3s;
}

.auth-box button:hover {
    opacity: 0.9;
}

.auth-box .toggle-auth {
    background: transparent;
    color: #667eea;
    text-decoration: underline;
    padding: 0;
    margin: 0;
    width: auto;
    font-weight: normal;
    font-size: 0.9rem;
}

.auth-box .toggle-auth:hover {
    opacity: 1;
    color: #764ba2;
}

.auth-error {
    color: #d9534f;
    font-size: 0.9rem;
    margin-top: 10px;
    text-align: center;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #666;
}

.logout-btn {
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    width: auto !important;
    background: #dc3545 !important;
    margin: 0 !important;
}

.logout-btn:hover {
    opacity: 0.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
}

main {
    padding: 30px;
}

/* Summary Section */
.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
    color: #666;
    margin-bottom: 10px;
    font-size: 1rem;
}

.amount {
    font-size: 2rem;
    font-weight: bold;
}

.amount.income {
    color: #28a745;
}

.amount.expense {
    color: #dc3545;
}

.amount.balance {
    color: #667eea;
}

/* Import Section */
.import-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.import-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.import-section h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1rem;
}

.import-section label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

.import-section input[type="text"],
.import-section select,
.import-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    margin-bottom: 10px;
}

.import-section textarea {
    font-family: monospace;
    resize: vertical;
}

.import-section button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    margin-right: 10px;
    transition: transform 0.2s;
}

.import-section button:hover {
    transform: translateY(-2px);
}

#createAccountBtn,
#saveAccountBtn,
#parseBtn,
#importBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

#cancelAccountBtn {
    background: #6c757d;
    color: white;
}

#importStatus {
    padding: 10px;
    border-radius: 5px;
    font-weight: 500;
}

#csvMappingSection > div {
    margin-bottom: 15px;
}

/* Transaction Form */
.transaction-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.transaction-form h2 {
    margin-bottom: 20px;
    color: #333;
}

#transactionForm {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 15px;
}

#transactionForm input,
#transactionForm select,
#transactionForm button {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

#transactionForm input:focus,
#transactionForm select:focus {
    outline: none;
    border-color: #667eea;
}

#transactionForm button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s;
}

#transactionForm button:hover {
    transform: translateY(-2px);
}

/* Transaction List */
.transaction-list {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.transaction-list h2 {
    margin-bottom: 20px;
    color: #333;
}

#transactionList {
    list-style: none;
}

.transaction-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.transaction-item.income {
    border-left: 4px solid #28a745;
}

.transaction-item.expense {
    border-left: 4px solid #dc3545;
}

.transaction-details {
    flex: 1;
}

.transaction-description {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.transaction-type {
    font-size: 0.9rem;
    color: #666;
    text-transform: capitalize;
}

.transaction-amount {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 15px;
}

.transaction-amount.income {
    color: #28a745;
}

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

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #c82333;
}

/* Responsive Design */
@media (max-width: 768px) {
    #transactionForm {
        grid-template-columns: 1fr;
    }

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

    header h1 {
        font-size: 2rem;
    }
}
