/* Global Styles */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #45a049;
    --background-light: #f8f9fa;
    --text-light: #2c3e50;
    --background-dark: #1e1e1e;
    --text-dark: #f8f9fa;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --gradient: linear-gradient(135deg, #4CAF50, #45a049);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: background 0.3s, box-shadow 0.3s;
}

body.dark-mode .container {
    background: #2c2c2c;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

h1, h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

select, input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus, input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
    outline: none;
}

.button-group {
    display: flex;
    gap: 10px;
}

button {
    background: var(--gradient);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background: var(--background-light);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: background 0.3s, box-shadow 0.3s;
}

body.dark-mode .result-container {
    background: #333;
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.cost-table th, .cost-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.cost-table th {
    background: var(--gradient);
    color: white;
}

.total-row {
    font-weight: bold;
    background-color: rgba(76, 175, 80, 0.1);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient);
    width: 0;
    transition: width 0.5s ease-in-out;
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dark-mode-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.icon {
    margin-right: 10px;
}

.admin-section {
    margin-top: 20px;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.cost-inputs-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    select, input, button {
        font-size: 14px;
    }
}