:root {
    --accent: #C87740;
    --bg-dark: #2E1F26;
    --card-bg: #3b2831;
    --text-light: #f5f5f5;
    --power-lime: #C3D809; /* Your Brand Color */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.engine-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 900px;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    border: 1px solid rgba(200, 119, 64, 0.15);
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    color: var(--accent);
    font-size: 2.2rem;
    letter-spacing: 1px;
}

header p { opacity: 0.6; margin-top: 5px; }

main {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

/* --- INPUT SECTION --- */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.input-group {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--accent);
    font-size: 1.1rem;
}

input {
    width: 100%;
    background: #25181f;
    border: 1px solid #4d3a42;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 10px;
    color: white;
    outline: none;
    transition: 0.3s;
}

input:focus { border-color: var(--accent); background: #2e1e26; }

#add-expense-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#add-expense-btn:hover { background: #e08a4f; transform: scale(1.02); }

/* --- EXPENSE LIST SECTION --- */
.expense-list {
    background: rgba(0, 0, 0, 0.15);
    padding: 20px;
    border-radius: 15px;
    border: 1px dashed rgba(200, 119, 64, 0.3);
    max-height: 300px;
    overflow-y: auto;
}

.expense-list h3 {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: var(--accent);
    text-transform: uppercase;
}

#display-list { list-style: none; }

.expense-entry {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    border-left: 3px solid var(--accent);
}

/* --- ACTION SECTION --- */
#calculate-btn {
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.3s;
}

#calculate-btn:hover { background: var(--accent); color: white; }

.results-box {
    background: #25181f;
    padding: 25px;
    border-radius: 15px;
    min-height: 250px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.result-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* --- FOOTER / BACK BUTTON --- */
footer {
    margin-top: 50px;
    text-align: center;
}

.back-link {
    display: inline-block;
    padding: 12px 30px;
    background: var(--power-lime); /* Matches Main Page */
    color: #222022; /* Matches Main Page Background */
    text-decoration: none;
    font-weight: 800;
    border-radius: 30px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(195, 216, 9, 0.3);
}

.back-link:hover {
    box-shadow: 0 8px 20px rgba(195, 216, 9, 0.5);
}

/* Mobile Responsive */
@media (max-width: 800px) {
    main { grid-template-columns: 1fr; gap: 30px; }
    .engine-container { padding: 25px; }
}