.page {
    max-width: 1000px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.add-button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: black;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.add-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
}

.search-group {
    flex: 1;
    min-width: 220px;
}

.search-input,
.sort-select,
input,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
}

.sort-select {
    min-width: 180px;
}

.filter-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: black;
    color: white;
    cursor: pointer;
    font-size: 15px;
}

.reset-link {
    color: #555;
    text-decoration: none;
    font-size: 14px;
}

.reset-link:hover {
    text-decoration: underline;
}

.inventory-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eaeaea;
    gap: 16px;
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inventory-name {
    font-size: 18px;
    font-weight: bold;
}

.inventory-quantity {
    color: #666;
    font-size: 14px;
}

.inventory-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.edit-btn {
    background: #eaeaea;
}

.delete-btn {
    background: #ffd9d9;
}

.empty-state {
    color: #777;
    text-align: center;
    padding: 32px 0;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    width: 90%;
    max-width: 420px;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
}

.btn-secondary {
    background: #eaeaea;
}

.btn-primary {
    background: black;
    color: white;
}

.errorlist {
    color: #c00000;
    padding-left: 18px;
    margin-top: 6px;
    margin-bottom: 0;
}

.delete-form {
    display: inline;
}

.inline-helper {
    margin-top: 10px;
}

.inline-helper .btn {
    width: 100%;
}

.category-section {
    margin-bottom: 28px;
}

.category-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
}

.ingredient-search-input {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.action-header-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #eaeaea;
    color: #111;
    cursor: pointer;
    font-size: 15px;
}

.modal-wide {
    max-width: 720px;
}

.consume-preview-container {
    margin-top: 20px;
}

.consume-preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.consume-preview-item {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eaeaea;
}

.consume-preview-item:last-child {
    border-bottom: none;
}

.consume-preview-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.consume-preview-name {
    font-weight: 600;
}

.consume-preview-meta {
    color: #666;
    font-size: 14px;
}

.hidden {
    display: none;
}

.consume-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 999px;
    width: fit-content;
}

.consume-preview-status.ok {
    background: #eaf7ea;
    color: #216e39;
}

.consume-preview-status.muted {
    background: #f1f1f1;
    color: #666;
}

.consume-preview-status.warn {
    background: #fff3cd;
    color: #8a6d1f;
}

.consume-preview-item.disabled-row {
    opacity: 0.7;
}

.consume-preview-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.consume-preview-heading {
    margin: 0 0 14px 0;
    font-size: 18px;
    font-weight: 700;
}

.consume-preview-subtext {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 14px;
}

.form-group {
    position: relative;
}

.custom-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
    z-index: 30;
}

.custom-search-option {
    width: 100%;
    border: none;
    background: white;
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 15px;
}

.custom-search-option:hover {
    background: #f5f5f5;
}

.hidden {
    display: none;
}