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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

/* Header styling */
header {
    background-color: #e30613;
    padding: 10px;
    text-align: center;
}

header img {
    height: 50px;
}

/* Main content */
.container {
    max-width: 800px;
    margin: auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: #e30613;
    margin-bottom: 20px;
}

/* Form styling */
.form-group {
    margin-bottom: 20px;
}

input[type="text"],
input[type="search"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: #e30613;
}

button,
.btn {
    background-color: #e30613;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover {
    background-color: #c00511;
}

/* Search box */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
}

/* Receipt list */
.receipt-list {
    list-style: none;
}

.receipt-list li {
    border-bottom: 1px solid #eee;
}

.receipt-list li:last-child {
    border-bottom: none;
}

.receipt-list a {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.receipt-list a:hover {
    background-color: #ffeef0;
}

.receipt-info {
    flex: 1;
}

.receipt-amount {
    text-align: right;
    font-weight: bold;
    color: #e30613;
}

/* Receipt items table */
table {
    width: 100%;
    border-collapse: collapse;
}

tbody tr {
    border-bottom: 1px solid #eee;
}

tbody tr:hover {
    background-color: #ffeef0;
}

tbody a {
    color: #333;
    text-decoration: none;
}

tbody a:hover {
    color: #e30613;
}

@media only screen and (max-width: 600px) {
    .orderlines-container {
        max-height: 19vh;
        overflow-y: scroll;
    }
}

.orderlines-header-table {
    background-color: #e30613;
    color: white;
    margin-top: 15px;
}

.orderlines-header-table th {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.orderlines-table td {
    padding: 10px;
    vertical-align: top;
}

.orderlines-header-table th:nth-child(1) {
    text-align: left;
}

.orderlines-header-table th:nth-child(2),
.orderlines-table td:nth-child(2),
.orderlines-header-table th:nth-child(2),
.orderlines-table td:nth-child(2) {
    width: 50px;
    text-align: right;
}

.orderlines-header-table th:nth-child(3),
.orderlines-table td:nth-child(3),
.orderlines-header-table th:nth-child(3),
.orderlines-table th:nth-child(3) {
    width: 110px;
    text-align: right;
}

.total-row {
    font-weight: bold;
    background-color: #f9f9f9;
    color: #e30613;
    font-size: 18px;
}

/* Info box */
.info-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff5f5;
    border: 2px solid #e30613;
    border-radius: 4px;
}

/* QR code */
.qr-code {
    margin-top: 50px;
    text-align: center;
}

.qr-code img {
    max-width: 200px;
}

/* Message box */
.message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message.debug {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    white-space: pre-wrap;
}

/* Config pages - green theme */
.config-page {
    background-color: #e8f5e9;
}

.config-page header {
    background-color: #4caf50;
}

.config-page h1,
.config-page h2,
.config-page h3 {
    color: #2e7d32;
}

.config-page button,
.config-page .btn {
    background-color: #4caf50;
}

.config-page button:hover,
.config-page .btn:hover {
    background-color: #45a049;
}

.config-page table thead {
    background-color: #4caf50;
    color: white;
    text-align: left;
}

.config-page table th, td {
    padding: 8px;
}

.config-page .total-row td {
    color: #2e7d32;
}

.config-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.config-menu-item {
    background-color: #4caf50;
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    transition: background-color 0.2s;
}

.config-menu-item:hover {
    background-color: #45a049;
}

/* Form tables for updatedb */
.form-table {
    margin-bottom: 40px;
}

.form-table input[type="text"],
.form-table input[type="number"] {
    width: 100%;
    padding: 5px;
}

.delete-btn {
    background-color: #f44336;
    padding: 5px 10px;
    font-size: 14px;
}

.delete-btn:hover {
    background-color: #da190b;
}

.add-btn {
    margin-top: 10px;
}
