* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #f2f2f2;
    color: #222;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h1 {
    margin-top: 0;
}

h2 {
    margin-top: 25px;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

button,
.buttonlink {
    display: inline-block;
    padding: 11px 16px;
    margin-top: 12px;
    border: 0;
    border-radius: 6px;
    background: #333;
    color: white;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
}

button.success {
    background: #198754;
}

button.big {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
}

.navigation {
    margin-bottom: 15px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
}

.search-form button {
    margin-top: 0;
}

.sort-buttons {
    margin: 15px 0;
}

.sort-buttons .buttonlink {
    margin-left: 5px;
}

.message {
    padding: 12px;
    margin: 15px 0;
    border-radius: 6px;
    background: #fff3cd;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    font-weight: bold;
}

.expiry {
    font-weight: bold;
}

.expired {
    color: #b00020;
}

.danger {
    color: #d35400;
}

.warning {
    color: #a67c00;
}

.ok {
    color: #198754;
}

@media (max-width: 600px) {

    body {
        padding: 10px;
    }

    .card {
        padding: 15px;
    }

    .search-form {
        display: block;
    }

    .search-form button {
        width: 100%;
    }

    .sort-buttons .buttonlink {
        margin: 4px 2px;
    }

    th,
    td {
        padding: 8px;
        font-size: 14px;
    }
}
.crate-button {
    margin: 0;
    padding: 6px 10px;
    background: none;
    color: inherit;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: bold;
}

.crate-button:hover {
    text-decoration: underline;
}
.crate-button {
    margin: 0;
    padding: 6px 10px;
    background: none;
    color: inherit;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: bold;
}

.crate-button:hover {
    text-decoration: underline;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.remove-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    background: #f5f5f5;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.modal-buttons form {
    margin: 0;
}

.modal-buttons button {
    min-height: 44px;
}

.crate-button {
    margin: 0;
    padding: 6px 10px;
    background: none;
    color: inherit;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: bold;
}

.crate-button:hover {
    text-decoration: underline;
}
.stock-in {
    font-weight: bold;
}

.stock-out {
    font-weight: bold;
    opacity: 0.6;
}
