@font-face {
    font-family: 'SimpleLetter';
    src: url('../fonts/simple_letter.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

:root {
    /* Primary Colors */
    --color-primary: #667eea;
    --color-primary-dark: #764ba2;
    --color-primary-light: rgba(102, 126, 234, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-primary-hover: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);

    /* Semantic Colors */
    --color-success: #4caf50;
    --color-success-hover: #43a047;
    --color-danger: #f44336;
    --color-danger-hover: #d32f2f;

    /* Text Colors */
    --color-text-primary: #424242;
    --color-text-secondary: #616161;
    --color-text-muted: #757575;
    --color-text-disabled: #9e9e9e;

    /* Background Colors */
    --color-bg-primary: white;
    --color-bg-secondary: #f5f5f5;
    --color-bg-tertiary: #f8f9fa;
    --color-bg-hover: #e0e0e0;

    /* Border Colors */
    --color-border: #e0e0e0;
    --color-border-light: #f0f0f0;
}

body {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: white;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Header Styles */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    background: var(--gradient-primary);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    z-index: 1000;
}

.header h1 {
    color: white;
}

.burger-menu {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease;
    position: absolute;
    right: 1.5rem;
}

.burger-menu:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.burger-menu .material-icons {
    font-size: 1.5rem;
}

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 16px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.side-nav.open {
    right: 0;
}

.side-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: var(--gradient-primary);
}

.side-nav-header h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.close-nav {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: background-color 0.2s ease;
}

.close-nav:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.close-nav .material-icons {
    font-size: 1.5rem;
}

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

.nav-menu li.nav-divider {
    height: 0;
    border-bottom: 2px solid #e0e0e0;
    margin: 0.5rem 1.5rem;
}

.nav-menu li.nav-divider + li {
    border-top: 1px solid #f0f0f0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.nav-item .material-icons {
    font-size: 1.375rem;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.nav-item:hover {
    background-color: #f8f9fa;
    color: var(--color-text-primary);
}

.nav-item:hover .material-icons {
    color: var(--color-text-primary);
}

.nav-item.active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.nav-item.active .material-icons {
    color: var(--color-primary);
}

/* Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    padding: 0.625rem;
    min-height: calc(100vh - 5rem);
}

/* Page System */
.page {
    display: none;
}

.page.active {
    display: block;
}

.empty-page {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--color-text-disabled);
    font-size: 1rem;
}

.food-list, .shopping-list, .place-list, .places-accordion, .virtual-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.place-list__title {
    margin-bottom: 1.25rem;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: normal;
    font-family: 'SimpleLetter', Arial, sans-serif;
}

.virtual-list {
    margin-top: 2rem;
}

#virtualItemsList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.virtual-list__empty {
    padding: 1rem;
    color: var(--color-text-disabled);
    font-size: 0.875rem;
    text-align: center;
}

/* Ensure elements on shopping page also respect max-width */
#page-einkaufen > .food-item,
#page-einkaufen > .shopping-divider,
#page-einkaufen > .shopping-list-empty {
    max-width: 2400px;
    margin-left: auto;
    margin-right: auto;
}

.food-item {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    overflow: hidden;
    cursor: grab;
    transition: all 0.3s ease;
}

.food-item:active {
    cursor: grabbing;
}

.food-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 20px 64px rgba(0,0,0,0.3);
    z-index: 1000;
}

.food-item.drag-over {
    transform: translateY(-8px);
    box-shadow: 0 16px 56px rgba(0,0,0,0.25);
}

.add-item {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    cursor: default;
    overflow: visible;
}

.add-item .seesaw-center input {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 0.00625rem;
    width: 100%;
    outline: none;
    font-family: inherit;
}

.add-item .seesaw-center input::placeholder {
    color: var(--color-text-disabled);
}

.add-item .seesaw-center {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 0.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-primary);
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

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

.autocomplete-item:hover {
    background-color: #f8f9fa;
}

.autocomplete-item.active {
    background-color: #e3f2fd;
}

.add-item .seesaw-left {
    color: var(--color-text-disabled);
}

.add-item .seesaw-right {
    color: var(--color-success);
}

.delete-mode {
    color: var(--color-danger) !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    max-width: 95vw;
    width: calc(100vw - 40px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    text-align: center;
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-sizing: border-box;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal h2 {
    margin: 0 0 0.625rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.modal p {
    margin: 0 0 0.75rem 0;
    color: var(--color-text-secondary);
    line-height: 1.3;
    font-size: 0.8125rem;
}

.food-name-highlight {
    font-weight: 600;
    color: var(--color-danger);
}

.modal-buttons {
    display: flex;
    gap: 0.625rem;
    justify-content: center;
    margin-top: 1rem;
}

.modal-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    flex: 1;
}

.modal-button.cancel {
    background: #f5f5f5;
    color: var(--color-text-primary);
}

.modal-button.cancel:hover {
    background: #e0e0e0;
}

.modal-button.delete {
    background: var(--color-danger);
    color: white;
}

.modal-button.delete:hover {
    background: var(--color-danger-hover);
}

.modal-error {
    background: #ffebee;
    border: 1px solid var(--color-danger);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.75rem 0;
    color: #c62828;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Modal Form Elements */
.modal-hint {
    font-size: 0.75rem;
    color: var(--color-text-disabled);
    margin: 0.375rem 0;
}

.modal-label {
    text-align: left;
}

.modal-label--spaced {
    text-align: left;
    margin-top: 1.25rem;
}

.modal-input-wrapper {
    margin: 0.75rem 0;
    display: flex;
    justify-content: center;
}

.modal-input {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.modal-input--centered {
    width: 50%;
    text-align: center;
}

.modal-textarea {
    width: 100%;
    box-sizing: border-box;
}

.modal-section {
    margin: 1rem 0;
}

.modal-scroll-container {
    margin: 0.75rem 0;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.625rem;
}

.modal-scroll-container--large {
    max-height: 300px;
}

.modal-scroll-container--borderless {
    border: none;
    padding: 0;
}

/* Modal Button Variants */
.modal-button--success {
    background: var(--gradient-primary);
    color: white;
}

.modal-button--success:hover {
    background: var(--gradient-primary-hover);
}

.modal-button--full {
    width: 100%;
}

.modal-action-section {
    margin-top: 0.75rem;
}

.modal-button__icon {
    font-size: 1.125rem;
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* Checkbox Item (for dynamic lists) */
.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    cursor: pointer;
}

.checkbox-item__box {
    margin-right: 0.5rem;
}

.checkbox-item__label {
    cursor: pointer;
    font-size: 0.875rem;
}

/* Error text */
.error-text {
    color: var(--color-danger);
}

/* Toggle Switch */
.modal-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-toggle-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--gradient-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.seesaw {
    display: flex;
    height: 44px;
    position: relative;
    background: white;
}

.seesaw-left {
    width: 40px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-danger);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,0,0,0.1);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

.seesaw-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.5rem;
    background: white;
}

.food-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 0.00625rem;
    cursor: pointer;
    user-select: none;
}

.food-name.shopping-name {
    cursor: default;
}

.food-name.editing {
    display: none;
}

.food-name-edit {
    display: none;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: 0.00625rem;
    outline: none;
    font-family: inherit;
    width: 100%;
    border-bottom: 2px solid #2196f3;
    padding-bottom: 0.125rem;
}

.food-name-edit.active {
    display: block;
}

.food-quantity {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 28px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.food-cart {
    font-size: 0.875rem;
    color: var(--color-success);
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 28px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.food-cart.in-shopping-list {
    color: var(--color-danger);
}

.food-discount-btn {
    font-size: 0.875rem;
    color: var(--color-text-disabled);
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 28px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.food-discount-btn:hover {
    background: #e0e0e0;
}

.food-discount-btn.discount-active {
    color: var(--color-danger);
}

.food-checkbox {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 28px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
}

.seesaw-left.food-checkbox {
    background: #f5f5f5;
    padding: 0;
    border-radius: 0;
    min-width: 52px;
    height: 44px;
    margin-left: 0;
    width: 52px;
}

.seesaw-right.food-checkbox {
    background: #f5f5f5;
    padding: 0;
    border-radius: 0;
    min-width: 52px;
    height: 44px;
    margin-left: 0;
    width: 52px;
}

/* Keep shopping list check icon green when on the left side */
.shopping-list .seesaw-left .material-icons {
    color: var(--color-success);
}

.custom-checkbox {
    position: relative;
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-text-disabled);
    border-radius: 3px;
    background: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.custom-checkbox.checked {
    background: var(--color-text-disabled);
    border-color: var(--color-text-disabled);
}

.custom-checkbox::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 2px;
    background: white;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.custom-checkbox.checked::after {
    transform: translate(-50%, -50%) scale(1);
}


.food-name.checked {
    text-decoration: line-through;
    color: var(--color-text-disabled);
}

.food-item.checked {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.shopping-divider {
    margin: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.shopping-list-no-matches {
    font-style: italic;
    color: var(--color-text-muted);
    text-align: center;
    padding: 1rem;
}

.shopping-list-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    max-width: 2400px;
    margin-left: auto;
    margin-right: auto;
}

.clear-shopping-list-btn {
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(244, 67, 54, 0.3);
}

.clear-shopping-list-btn:hover {
    background: var(--color-danger-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

.clear-shopping-list-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.clear-shopping-list-btn .material-icons {
    font-size: 1.125rem;
}

/* Search Results Container */
.search-results-container {
    margin-top: 1rem;
    max-width: 2400px;
    margin-left: auto;
    margin-right: auto;
}

.search-results-title {
    margin-bottom: 1.25rem;
    color: var(--color-text-primary);
    font-size: 1.5rem;
    font-weight: normal;
    font-family: 'SimpleLetter', Arial, sans-serif;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-result-item {
    cursor: default;
}

.search-result-item .seesaw-left--empty {
    visibility: hidden;
}

.search-result-add-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-success);
    transition: all 0.2s ease;
}

.search-result-add-btn:hover {
    transform: scale(1.1);
}

.search-result-add-btn:active {
    transform: scale(0.95);
}

.search-result-add-btn .material-icons {
    font-size: 1.25rem;
}

.food-name--virtual {
    color: var(--color-text-muted);
}

/* Quantity Management Modal */
.quantity-place-item {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.quantity-place-item .food-name {
    cursor: default;
}

.quantity-place-item .food-quantity {
    margin-right: 0;
}


.seesaw-right {
    width: 40px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-success);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Accordion Styles */
.place-accordion {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.place-accordion.active {
    overflow: visible;
}

.place-accordion-header {
    padding: 1rem 1.25rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 16px 16px 0 0;
}

.place-accordion-header:hover {
    background: #f0f1f2;
}

.place-accordion-header.active {
    background: var(--gradient-primary);
}

.place-accordion-header.active .place-accordion-title {
    color: white;
}

.place-accordion-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.place-accordion-icon {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease;
}

.place-accordion-header.active .place-accordion-icon {
    transform: rotate(180deg);
    color: white;
}

.place-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    border-radius: 0 0 16px 16px;
}

.place-accordion-content.active {
    max-height: 10000px;
    overflow: visible;
}

.place-accordion-foods {
    padding: 0.5rem 0.75rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    perspective: 1000px;
}

/* Ensure rotation animations work in place accordions */
.place-accordion-foods .food-item {
    transform-style: preserve-3d;
}

h1 {
    color: var(--color-text-primary);
    margin: 0;
    font-family: 'SimpleLetter', Arial, sans-serif;
    font-weight: normal;
    font-size: 1.75rem;
    letter-spacing: 0.0625rem;
    text-align: center;
}

/* Recipe Styles */
.recipe-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    max-width: 2400px;
    margin: 0 auto;
}

/* Responsive grid for recipes */
@media (min-width: 600px) {
    .recipe-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .recipe-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .recipe-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1500px) {
    .recipe-list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1800px) {
    .recipe-list {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Keep add-item and divider full width */
.recipe-list > .add-item,
.recipe-list > .shopping-divider {
    grid-column: 1 / -1;
}

.recipe-list-empty {
    max-width: 2400px;
    margin: 0 auto;
}

.recipe-modal-content {
    max-width: 600px;
    text-align: left;
}

.recipe-form {
    margin: 1rem 0;
}

.recipe-form-group {
    margin-bottom: 1.25rem;
}

.recipe-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.recipe-input,
.recipe-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text-primary);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.recipe-input:focus,
.recipe-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.recipe-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Recipe Image Upload */
.recipe-image-upload {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recipe-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: #f5f5f5;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.recipe-upload-btn:hover {
    background: #eeeeee;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.recipe-upload-btn .material-icons {
    font-size: 1.25rem;
}

.recipe-image-preview {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.recipe-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-image-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(244, 67, 54, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-image-remove:hover {
    background: var(--color-danger);
    transform: scale(1.1);
}

.recipe-image-remove .material-icons {
    font-size: 1.25rem;
    color: white;
}

/* Tag Styles */
.recipe-tags-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: #bdbdbd;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1;
    height: 24px;
}

.tag-chip:hover {
    background: var(--color-text-disabled);
}

.tag-chip.active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tag-chip.active:hover {
    filter: brightness(0.95);
}

.tag-chip .material-icons {
    font-size: 1rem;
    cursor: pointer;
}

.tag-chip .material-icons:hover {
    opacity: 0.8;
}

.add-tag-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.add-tag-input-container .recipe-input {
    flex: 1;
    margin: 0;
}

.add-tag-btn {
    width: 40px;
    height: 40px;
    background: var(--color-success);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.add-tag-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.add-tag-btn .material-icons {
    font-size: 1.25rem;
    color: white;
}

.all-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
    max-height: 150px;
    overflow-y: auto;
    min-height: 40px;
}

.all-tags:empty::before {
    content: 'Noch keine Tags vorhanden';
    color: var(--color-text-disabled);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    height: 32px;
}

/* Recipe Item Card */
.recipe-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 56px rgba(0,0,0,0.22);
}

.recipe-card-image {
    width: 100%;
    height: 200px;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card-image.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
}

.recipe-card-image.no-image .material-icons {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
}

.recipe-card-content {
    padding: 1rem;
}

.recipe-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 0.5rem 0;
}

.recipe-card-description {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.recipe-card-tags .tag-chip {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
    cursor: default;
    height: 20px;
    opacity: 1;
}

/* Recipe Steps Accordion */
.recipe-steps-accordion {
    margin-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.recipe-steps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-steps-header:hover {
    color: var(--color-primary);
}

.recipe-steps-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    font-variant: small-caps;
}

.recipe-steps-header:hover .recipe-steps-title {
    color: var(--color-primary);
}

.recipe-steps-icon {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease;
}

.recipe-steps-header.active .recipe-steps-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.recipe-steps-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.recipe-steps-content.active {
    max-height: 2000px;
}

.recipe-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.recipe-step-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: grab;
}

.recipe-step-item:hover {
    background: #f0f1f2;
}

.recipe-step-item:active {
    cursor: grabbing;
}

.recipe-step-item.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    cursor: grabbing;
}

.recipe-step-header {
    display: flex;
    align-items: center;
}

.recipe-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.8125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.recipe-step-instruction {
    font-size: 0.875rem;
    color: var(--color-text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.add-step-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.625rem;
    background: #f5f5f5;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.add-step-btn:hover {
    background: #eeeeee;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.add-step-btn .material-icons {
    font-size: 1.125rem;
}

.recipe-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f0f0f0;
}

.recipe-action-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.recipe-action-btn.delete {
    background: #ffebee;
    color: var(--color-danger);
}

.recipe-action-btn.delete:hover {
    background: var(--color-danger);
    color: white;
}

.recipe-action-btn .material-icons {
    font-size: 1.125rem;
}

/* Recipe Ingredients Styles */
.recipe-ingredients-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.add-ingredient-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ingredient-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    position: relative;
    justify-content: flex-end;
}

.ingredient-input-row .recipe-input {
    flex: 1;
    margin: 0;
}

.ingredient-input-row .recipe-input[type="number"] {
    flex: 0 0 120px;
}

.ingredient-input-row .recipe-input[placeholder="Einheit"] {
    flex: 0 0 120px;
}

.add-ingredient-btn {
    width: 40px;
    height: 40px;
    background: var(--color-success);
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.add-ingredient-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.add-ingredient-btn .material-icons {
    font-size: 1.25rem;
    color: white;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
    max-height: 300px;
    overflow-y: auto;
    min-height: 40px;
}

.ingredients-list:empty::before {
    content: 'Noch keine Zutaten hinzugefügt';
    color: var(--color-text-disabled);
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    height: 32px;
}

.ingredient-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ingredient-item:hover {
    background: #f0f1f2;
}

.ingredient-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.ingredient-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.ingredient-item-amount {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.ingredient-item-remove {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-danger);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ingredient-item-remove:hover {
    background: #ffebee;
}

.ingredient-item-remove .material-icons {
    font-size: 1.125rem;
}

/* Recipe Ingredients Accordion on Card */
.recipe-ingredients-accordion {
    margin-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.recipe-ingredients-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-ingredients-header:hover {
    color: var(--color-primary);
}

.recipe-ingredients-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
    font-variant: small-caps;
}

.recipe-ingredients-header:hover .recipe-ingredients-title {
    color: var(--color-primary);
}

.recipe-ingredients-icon {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    transition: transform 0.3s ease;
}

.recipe-ingredients-header.active .recipe-ingredients-icon {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.recipe-ingredients-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.recipe-ingredients-content.active {
    max-height: 2000px;
}

.recipe-ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 0.75rem;
}

.recipe-ingredient-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.recipe-ingredient-name {
    font-size: 0.8125rem;
    color: var(--color-text-primary);
    font-weight: 500;
    flex: 1;
}

.recipe-ingredient-amount {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* ===== Authentication PIN Pad ===== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-overlay.animate {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-container {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 320px;
    width: calc(100% - 3rem);
    margin: 0 1.5rem;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.auth-logo .material-icons {
    font-size: 32px;
    color: white;
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin: 0 0 1.5rem;
    font-family: 'SimpleLetter', Arial, sans-serif;
}

.pin-display {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    background: transparent;
    transition: all 0.2s ease;
}

.pin-dot.filled {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.1);
}

.pin-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    height: 1.25rem;
}

.pin-error.hidden {
    visibility: hidden;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    max-width: 240px;
    margin: 0 auto;
}

.pin-key {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pin-key:hover {
    background: #e0e0e0;
}

.pin-key:active {
    background: #d0d0d0;
    transform: scale(0.95);
}

.pin-key--empty {
    background: transparent;
    cursor: default;
}

.pin-key--empty:hover,
.pin-key--empty:active {
    background: transparent;
    transform: none;
}

.pin-key--backspace {
    background: transparent;
}

.pin-key--backspace:hover {
    background: #f5f5f5;
}

.pin-key--backspace .material-icons {
    font-size: 1.5rem;
    color: var(--color-text-muted);
}

@keyframes pin-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.pin-display.shake {
    animation: pin-shake 0.4s ease;
}

.pin-dot.error {
    border-color: var(--color-danger);
    background: var(--color-danger);
}