* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
}

.link {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-header {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.welcome-section h1 {
    color: #333;
    margin-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.stat-card .amount {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stat-card.expense { border-top: 4px solid #dc3545; }
.stat-card.income { border-top: 4px solid #28a745; }
.stat-card.balance { border-top: 4px solid #007bff; }

/* Navigation */
.navbar {
    background: white;
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #667eea;
    color: white;
}

/* Expense Form */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Expenses Table */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

tr:hover {
    background: #f8f9fa;
}

/* Charts */
.chart-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Category colors */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-row {
        grid-template-columns: 1fr;
    }
}


/* Add these styles to your existing style.css */

/* Textarea styling */
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.3s, box-shadow 0.3s;
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea:hover {
    border-color: #b0b7e6;
}

/* Category management styles */
.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.category-box {
    background: white;
    border: 2px solid #e1e5eb;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.category-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.category-box.selected {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

.category-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.category-budget {
    font-size: 14px;
    color: #666;
}

/* Color picker */
.color-picker {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #333;
}

/* Currency symbol styles */
.rupee {
    font-family: 'Arial', sans-serif;
}

/* Admin category management */
.category-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.category-actions button {
    padding: 5px 15px;
    font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .color-picker {
        justify-content: center;
    }
}

/* Custom category form */
.custom-category-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

/* Edit/Delete buttons in tables */
.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons a {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.action-buttons .edit-btn {
    background: #007bff;
    color: white;
}

.action-buttons .edit-btn:hover {
    background: #0056b3;
}

.action-buttons .delete-btn {
    background: #dc3545;
    color: white;
}

.action-buttons .delete-btn:hover {
    background: #c82333;
}

/* User management section */
.user-role-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.user-role-badge.admin {
    background: #dc3545;
    color: white;
}

.user-role-badge.user {
    background: #6c757d;
    color: white;
}

/* Currency switcher */
.currency-switcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 15px;
    background: white;
    border: 2px solid #e1e5eb;
    border-radius: 20px;
}

.currency-flag {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
}

.currency-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Add these to existing styles */
.form-group textarea {
    margin-top: 5px;
}

.stat-card .amount.rupee::before {
    content: "₹";
    margin-right: 2px;
}

.table-container td .rupee::before {
    content: "₹";
    margin-right: 2px;
}