:root {
    /* Olive Green Light Theme Colors */
    --primary-color: #556B2F; /* Dark Olive Green */
    --primary-light: #6B8E23; /* Olive Drab */
    --primary-hover: #84A936;
    --bg-color: #F6F8F3; /* Light beige/greenish background */
    --card-bg: #FFFFFF;
    --text-primary: #2D3A1B; /* Darkest Olive */
    --text-secondary: #5C6B45;
    --border-color: #E2E8D5;
    --input-bg: #FAFCF7;
    --focus-ring: rgba(107, 142, 35, 0.3);
    
    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(85, 107, 47, 0.05), 0 2px 4px -1px rgba(85, 107, 47, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(85, 107, 47, 0.08), 0 4px 6px -2px rgba(85, 107, 47, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(85, 107, 47, 0.1), 0 10px 10px -5px rgba(85, 107, 47, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    background-image: radial-gradient(circle at top right, rgba(107, 142, 35, 0.05), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(107, 142, 35, 0.05), transparent 40%);
}

.app-container {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header Styles */
.app-header {
    text-align: center;
    margin-bottom: 1rem;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Card Styles */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.custom-select-wrapper {
    position: relative;
    max-width: 300px;
}

select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
}

select:hover {
    border-color: var(--primary-light);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.custom-select-wrapper::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--primary-color);
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    margin-bottom: 2.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

tbody tr {
    transition: var(--transition);
}

tbody tr:hover {
    background-color: rgba(107, 142, 35, 0.02);
}

tbody tr:last-child td {
    border-bottom: none;
}

.row-label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Inputs within table */
input[type="number"] {
    width: 100%;
    min-width: 120px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    text-align: right;
}

input[type="number"]::placeholder {
    color: #A0B28C;
}

input[type="number"]:hover {
    border-color: var(--primary-light);
    background-color: #fff;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
    background-color: #fff;
}

/* Hide number arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}
input[type=number] {
    -moz-appearance: textfield;
}

/* Total Columns */
.row-total {
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
    background-color: rgba(107, 142, 35, 0.03);
}

.badge {
    background-color: var(--primary-light);
    color: white;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Footer / Grand Total */
tfoot {
    background-color: rgba(85, 107, 47, 0.05);
    border-top: 2px solid var(--primary-light);
}

.grand-total-row td {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

.grand-total-row td:first-child {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Action Button */
.form-actions {
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(85, 107, 47, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(85, 107, 47, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    th, td {
        padding: 0.75rem 1rem;
    }
}
