/* --- General Body & Layout --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-image: url('img/base.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-size: 16px;
}

/* --- Main Content Card --- */
.container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1200px;
    width: 100%;
    margin: 2rem;
    box-sizing: border-box;
}

/* --- Typography --- */
h1, h2 {
    color: #1a202c;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

a {
    color: #4299e1;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #2b6cb0;
    text-decoration: underline;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    text-align: left;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #4a5568;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s ease-in-out;
}

.btn:hover {
    background-color: #2d3748;
    text-decoration: none;
    color: #fff;
}

.btn-success {
    background-color: #48bb78;
}
.btn-success:hover {
    background-color: #38a169;
}

/* --- Alerts & Messages --- */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.alert-danger {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #fbb6b6;
}

.alert-success {
    background-color: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

/* --- Dashboard Specific --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-header h1 {
    margin: 0;
    text-align: left;
}

.logout-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: #e2e8f0;
    color: #4a5568;
    border-radius: 6px;
    font-weight: 600;
}
.logout-btn:hover {
    background-color: #cbd5e0;
    color: #2d3748;
    text-decoration: none;
}

/* --- Purchases Table --- */
.purchases-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.purchases-table th,
.purchases-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.purchases-table th {
    background-color: #f7fafc;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.purchases-table tbody tr:hover {
    background-color: #f7fafc;
}

/* --- Login/Register Specific --- */
.auth-container {
    max-width: 450px;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}