body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

h1 {
    color: #333;
    text-align: center;
}

.order-details, .actions, .export, .status {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    color: #444444;
}

select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Prevents padding from adding to width */
}

button {
    background-color: #4b60a8;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #977bbb;
    
}

/* Style for potentially destructive buttons */
button.danger-btn {
    background-color: #dc3545; /* Red */
}

button.danger-btn:hover {
    background-color: #c82333; /* Darker Red */
}

.actions button {
    flex-grow: 1; /* Make buttons share space */
}

.actions {
    display: flex;
    justify-content: space-around;
}

.export button {
    width: 100%;
}

.status p {
    color: #333;
    font-style: italic;
}

.log-display {
    background-color: #fff;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#salesLogTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#salesLogTable th, #salesLogTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#salesLogTable th {
    background-color: #f2f2f2;
    color: #333;
}

#salesLogTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#salesLogTable tr:hover {
    background-color: #f1f1f1;
}

#salesLogTable button.delete-btn {
    background-color: #ca8289; /* Red */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

#salesLogTable button.delete-btn:hover {
    background-color: #87000e;
}

#emptyLogMessage {
    color: #777;
    font-style: italic;
}

/* Responsive Table Styles for Mobile */
@media screen and (max-width: 600px) {
    #salesLogTable thead {
        /* Hide table headers on small screens */
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    #salesLogTable tr {
        /* Make rows behave like cards */
        display: block;
        margin-bottom: .625em;
        border: 1px solid #ddd;
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    #salesLogTable td {
        /* Make cells stack vertically */
        display: block;
        text-align: right; /* Align data to the right */
        font-size: .9em;
        border-bottom: 1px dotted #ccc;
        padding-left: 50%; /* Make space for the label */
        position: relative; /* Needed for pseudo-element positioning */
    }

    #salesLogTable td::before {
        /* Add the header label before the cell data */
        content: attr(data-label);
        position: absolute;
        left: 10px; /* Position label on the left */
        width: 45%; /* Control label width */
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #555;
    }

    #salesLogTable td:last-child {
        border-bottom: 0; /* Remove border from last cell in the stack */
    }

    /* Adjust delete button alignment in stacked view */
    #salesLogTable td[data-label="Action"] {
        text-align: center; /* Center the delete button */
        padding-left: 10px; /* Reset padding for action cell */
    }
    #salesLogTable td[data-label="Action"]::before {
         display: none; /* Hide label for action cell if not needed */
    }
    #salesLogTable button.delete-btn {
        width: auto; /* Allow button to size naturally */
        margin: 5px 0; /* Add some margin */
    }

}
