@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #183b29;
    --primary-color-light: #2a5c42;
    --primary-color-dark: #102718;
    --secondary-color: #f5f3ed;
    --accent-color: #e8f0eb;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

.main-container {
    background-color: var(--secondary-color);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.brand-color {
    color: var(--primary-color);
}

.brand-bg {
    background-color: var(--primary-color);
}

.section-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.section-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.tab-button {
    border-radius: 24px;
    border: 2px solid var(--primary-color);
    transition: all 0.2s ease;
    font-weight: 500;
}

.tab-button:hover {
    background-color: rgba(24, 59, 41, 0.08);
}

.active-tab {
    border-color: #183b29;
    box-shadow: 0 0 0 2px rgba(24, 59, 41, 0.2);
}

.active-tab {
    background-color: rgba(24, 59, 41, 0.12);
    box-shadow: 0 4px 8px rgba(24, 59, 41, 0.15);
    font-weight: 600;
}

.table-header {
    background-color: var(--accent-color);
    font-weight: 600;
}

.meal-row {
    border-bottom: 1px solid rgba(24, 59, 41, 0.1);
    transition: background-color 0.2s ease;
}

.meal-row:hover {
    background-color: rgba(24, 59, 41, 0.02);
}

.dietary-row {
    background-color: rgba(24, 59, 41, 0.04);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    margin: 4px 0;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.quantity-input {
    border-radius: 6px;
    background-color: white;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.quantity-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 59, 41, 0.1);
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.form-input {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 59, 41, 0.1);
}

.submit-btn {
    background: linear-gradient(to bottom, var(--primary-color-light), var(--primary-color));
    border-radius: 12px;
    padding: 14px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(24, 59, 41, 0.2);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(24, 59, 41, 0.25);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(24, 59, 41, 0.2);
}

.submit-btn:disabled {
    background: linear-gradient(to bottom, #6b7280, #4b5563);
    cursor: not-allowed;
}

.summary-box {
    background-color: var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
}

.notes-box {
    background-color: #f8f8f5;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    min-height: 80px;
}

input, select, .quantity-input {
    min-height: 40px;
}

.submit-btn:hover:not(:disabled) {
    transform: scale(1.02);
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-color-dark));
}

.error-field {
    border-color: #dc2626 !important;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.loading-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid white;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-message {
    animation: fadeInUp 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 768px) {
    .tab-button {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    table th, table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.9rem;
    }

    input, select, .quantity-input {
        min-height: 40px;
    }

    textarea.notes-box {
        min-height: 80px;
    }
}