* {
    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 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.form-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.form-box h2 {
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.form-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-box button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.form-box button:hover {
    background: #5568d3;
}

.form-box p {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.form-box a {
    color: #667eea;
    text-decoration: none;
}

.error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.success {
    background: #efe;
    color: #3c3;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

.navbar {
    background: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.navbar h1 {
    color: #667eea;
    font-size: 24px;
}

.navbar span {
    margin-right: 20px;
    color: #666;
}

.btn-logout, .btn-back {
    padding: 8px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-logout:hover, .btn-back:hover {
    background: #5568d3;
}

.dashboard-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #666;
    margin-bottom: 15px;
    font-size: 18px;
}

.stat-card .amount {
    color: #667eea;
    font-size: 32px;
    font-weight: bold;
}

.add-expense-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.add-expense-form h2 {
    margin-bottom: 20px;
    color: #333;
}

.add-expense-form form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.add-expense-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.add-expense-form button {
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.add-expense-form button:hover {
    background: #5568d3;
}

.recent-expenses {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.recent-expenses h2 {
    margin-bottom: 20px;
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    color: #666;
    font-weight: 600;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.btn-delete {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

.btn-delete:hover {
    color: #c0392b;
}

.view-stats {
    text-align: center;
}

.btn-stats {
    display: inline-block;
    padding: 15px 40px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.btn-stats:hover {
    transform: translateY(-2px);
}

.stats-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.stats-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.stats-section table a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.stats-section table a:hover {
    text-decoration: underline;
}
