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

:root {
    --cyan: #00ffff;
    --cyan-bright: #00ccff;
    --cyan-dark: #0099ff;
    --magenta: #ff0099;
    --bg-dark: #0a0a1a;
    --bg-darker: #050510;
    --bg-card: #1a1a2e;
    --bg-card-hover: #242438;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c8;
    --text-muted: #707088;
    --border: rgba(0, 255, 255, 0.2);
    --border-hover: rgba(0, 255, 255, 0.4);
    --shadow-glow: 0 4px 20px rgba(0, 255, 255, 0.15);
    --shadow-glow-strong: 0 8px 30px rgba(0, 255, 255, 0.3);
}

body {
    font-family: 'Orbitron', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}
@keyframes bg-float {
    0% {
        transform: translate3d(0, 0, 0) scale(1);
        filter: hue-rotate(0deg);
    }
    50% {
        transform: translate3d(-3%, -2%, 0) scale(1.06);
        filter: hue-rotate(15deg);
    }
    100% {
        transform: translate3d(3%, 2%, 0) scale(1.1);
        filter: hue-rotate(-10deg);
    }
}

/* Animated background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 153, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: bg-float 18s ease-in-out infinite alternate;
}

/* ============================================ */
/* SPLASH SCREEN */
/* ============================================ */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.splash-screen.active {
    opacity: 1;
    pointer-events: all;
}

.splash-content {
    text-align: center;
    animation: fadeInUp 0.8s ease;
}

@keyframes logo-breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.06);
    }
}

.splash-logo-img {
    width: 280px;
    height: auto;
    margin: 0 auto 40px;
    display: block;
    filter: drop-shadow(0 0 35px rgba(0, 255, 255, 0.6));
    animation: pulse 2s ease-in-out infinite, logo-breathe 5s ease-in-out infinite;
}



.splash-title {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 50px;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.enter-btn {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.4);
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
}

.enter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 255, 255, 0.6);
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 30px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.4));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 42px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mode Switcher */
.mode-switcher {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.mode-btn {
    padding: 14px 32px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(0, 255, 255, 0.05);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s ease;
    color: var(--text-secondary);
}

.mode-btn:hover {
    background: rgba(0, 255, 255, 0.15);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

.mode-btn.admin-btn {
    background: rgba(255, 0, 153, 0.1);
    border-color: rgba(255, 0, 153, 0.3);
}

.mode-btn.admin-btn:hover {
    background: rgba(255, 0, 153, 0.2);
    border-color: var(--magenta);
}

.mode-btn.admin-btn.active {
    background: linear-gradient(135deg, var(--magenta), #cc0077);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 153, 0.4);
}

/* Mode Content */
.mode-content {
    display: none;
}

.mode-content.active {
    display: block;
}


/* ============================================ */
/* RECIPE VIEWER MODE STYLES - SIDEBAR LAYOUT */
/* ============================================ */

.main-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    min-height: calc(100vh - 250px);
}

@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Left Sidebar - Recipes List */
.sidebar {
    background: rgba(26, 26, 46, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 180px);
    position: sticky;
    top: 20px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-header h2 {
    font-size: 20px;
    color: var(--cyan);
}

.sidebar-header-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-new-recipe-header {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

.btn-new-recipe-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.5);
}

.btn-manage-categories {
    background: linear-gradient(135deg, #ff0099, #cc0077);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(255, 0, 153, 0.3);
}

.btn-manage-categories:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 153, 0.5);
}
}

/* Folder Items in Recipe List */
.folder-item {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.folder-item.drag-over {
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid var(--cyan);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
}

.folder-header:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyan);
}

.folder-icon {
    font-size: 20px;
}

.folder-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.folder-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--cyan);
}

.folder-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.folder-contents {
    padding-left: 20px;
    margin-top: 8px;
}

.folder-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
}

.folder-item.expanded .folder-header {
    background: rgba(0, 255, 255, 0.15);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Uncategorized Section */
.uncategorized-section {
    margin-top: 20px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.uncategorized-section.drag-over {
    background: rgba(255, 0, 153, 0.1);
    border: 2px dashed var(--magenta);
}

.uncategorized-header {
    padding: 12px;
    background: rgba(255, 0, 153, 0.1);
    border: 1px solid rgba(255, 0, 153, 0.3);
    border-radius: 8px;
    color: var(--magenta);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 10px;
    text-align: center;
}

.uncategorized-empty {
    padding: 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.sidebar .search-box {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.recipes-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.recipes-list::-webkit-scrollbar {
    width: 6px;
}

.recipes-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.recipes-list::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

.recipes-list::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-bright);
}

.recipe-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.recipe-card[draggable="true"] {
    cursor: move;
}

.recipe-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

/* Tested Checkbox */
.recipe-tested-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.recipe-tested-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.recipe-tested-checkbox label {
    cursor: pointer;
    user-select: none;
    font-weight: 700;
}

.recipe-tested-checkbox input[type="checkbox"]:checked + label {
    color: #00ff00;
}

.recipe-card-edit-btn {
    display: none; /* Hide by default */
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid var(--cyan);
    color: var(--cyan);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.recipe-card-edit-btn:hover {
    background: var(--cyan);
    color: #000;
}

@media (max-width: 768px) {
    .recipe-card-edit-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.recipe-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateX(5px);
    box-shadow: var(--shadow-glow);
}

.recipe-card.active {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--cyan);
    box-shadow: var(--shadow-glow);
}

.recipe-card-emoji {
    font-size: 32px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 10px;
}

.recipe-card-content {
    flex: 1;
    min-width: 0;
}

.recipe-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recipe-card-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.recipe-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Right Panel - Recipe Detail */
.detail-panel {
    background: rgba(26, 26, 46, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
    min-height: 500px;
    position: relative;
}

.detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    flex-direction: column;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 255, 255, 0.1);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.detail-loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Detail Header */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 20px;
}

.detail-title-section {
    flex: 1;
}

.detail-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 10px;
}

.detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Recipe Section */
.recipe-section {
    margin-bottom: 30px;
}

.recipe-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--cyan);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recipe-section ul {
    list-style: none;
    padding: 0;
}

.recipe-section li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.6;
}

.recipe-section li .emoji {
    font-size: 18px;
    margin-right: 8px;
}

.recipe-section li:last-child {
    border-bottom: none;
}

/* Step Numbers */
.step-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number-badge {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    padding-top: 4px;
}

/* Floating Action Button */
.new-recipe-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    font-size: 32px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.5);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide floating button on mobile */
@media (max-width: 768px) {
    .new-recipe-btn {
        display: none !important;
    }
}

.new-recipe-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 8px 35px rgba(0, 255, 255, 0.7);
}

/* States */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    flex-direction: column;
    gap: 20px;
}

.error-message {
    padding: 20px;
    background: rgba(255, 0, 100, 0.1);
    border: 1px solid rgba(255, 0, 100, 0.3);
    border-radius: 12px;
    color: var(--magenta);
    text-align: center;
    margin-bottom: 30px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.empty-search {
    text-align: center;
    padding: 40px 20px;
}

.empty-search .empty-icon {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-search p {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
    font-style: italic;
}

/* Edit Mode Styles */
.edit-mode-active .detail-panel {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}

.section-edit {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    cursor: move;
}

.section-edit.dragging {
    opacity: 0.5;
    border-color: var(--cyan);
}

.section-edit.drag-over {
    border-color: var(--cyan);
    background: rgba(0, 255, 255, 0.1);
}

.section-header-edit {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    align-items: center;
}

.drag-handle {
    cursor: move;
    color: var(--cyan);
    font-size: 20px;
    padding: 5px;
}

.section-title-input {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 600;
}

.section-title-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.items-editor {
    margin-bottom: 15px;
}

.item-edit-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.item-input,
.item-textarea {
    flex: 1;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    resize: vertical;
}

.item-textarea {
    min-height: 60px;
    line-height: 1.6;
}

.item-input:focus,
.item-textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--cyan);
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-icon-small:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyan);
}

.btn-icon-small.btn-danger {
    color: var(--magenta);
    background: rgba(255, 0, 153, 0.1);
    border-color: rgba(255, 0, 153, 0.3);
}

.btn-icon-small.btn-danger:hover {
    background: rgba(255, 0, 153, 0.2);
    border-color: var(--magenta);
}

.btn-add-item {
    padding: 8px 16px;
    background: rgba(0, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px dashed var(--border);
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-add-item:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--cyan);
    border-style: solid;
}

.metadata-edit {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.metadata-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metadata-field label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.metadata-field input {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
}

.metadata-field input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.edit-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn-add-section {
    padding: 12px 24px;
    background: rgba(0, 255, 255, 0.1);
    color: var(--cyan);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-section:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyan);
}


/* ============================================ */
/* ORDERING SYSTEM MODE STYLES */
/* ============================================ */

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* Panel Styles */
.menu-panel,
.order-panel {
    background: rgba(26, 26, 46, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glow);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 300px);
}

.panel-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.panel-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    color: var(--cyan);
    font-size: 22px;
    font-weight: 700;
}

.btn-custom-small {
    background: linear-gradient(135deg, #ff0099, #cc0077);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(255, 0, 153, 0.3);
}

.btn-custom-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 153, 0.5);
}

.panel-header .search-box {
    width: 100%;
}

.panel-header .search-box input {
    padding: 10px 14px;
    font-size: 14px;
}


/* Menu List */
.menu-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

.menu-list::-webkit-scrollbar {
    width: 6px;
}

.menu-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.menu-list::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

.menu-list::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-bright);
}

.menu-item {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.menu-item.custom-menu-item {
    border-left: 3px solid #ff0099;
    background: linear-gradient(90deg, rgba(255, 0, 153, 0.1), rgba(26, 26, 46, 0.6));
}

.menu-item:hover {
    border-color: var(--border-hover);
    transform: translateX(5px);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.menu-item.custom-menu-item:hover {
    border-left-color: #ff0099;
    box-shadow: 0 4px 15px rgba(255, 0, 153, 0.3);
}

.custom-badge {
    display: inline-block;
    background: #ff0099;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 8px;
}

.btn-delete-custom {
    background: rgba(255, 0, 153, 0.2);
    color: #ff0099;
    border: 1px solid #ff0099;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.3s;
}

.btn-delete-custom:hover {
    background: #ff0099;
    color: white;
    transform: rotate(90deg);
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.menu-item-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.menu-item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.menu-item-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.menu-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-add {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.2);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.4);
}

.btn-view {
    background: rgba(0, 255, 255, 0.1);
    color: var(--cyan);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
}

.btn-view:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyan);
}


/* Order Info */
.order-info {
    margin-bottom: 20px;
}

.order-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.order-meta input {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
}

.order-meta input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.order-meta input::placeholder {
    color: var(--text-muted);
}

/* Order Items */
.order-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.order-items::-webkit-scrollbar {
    width: 6px;
}

.order-items::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

.order-items::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-bright);
}

.order-item {
    background: rgba(26, 26, 46, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.btn-remove {
    background: rgba(255, 0, 153, 0.1);
    color: var(--magenta);
    border: 1px solid rgba(255, 0, 153, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
}

.btn-remove:hover {
    background: rgba(255, 0, 153, 0.2);
    border-color: var(--magenta);
}

.order-item-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.2);
}

.qty-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 255, 255, 0.4);
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--cyan);
}

.order-item-notes {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    font-family: 'Orbitron', sans-serif;
    resize: vertical;
    min-height: 45px;
}

.order-item-notes:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

.order-item-notes::placeholder {
    color: var(--text-muted);
}


/* Order Summary */
.order-summary {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.summary-row span:last-child {
    font-weight: 700;
    color: var(--cyan);
    font-size: 18px;
}

/* Order Actions */
.order-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.5);
}

.btn-secondary {
    background: rgba(0, 255, 255, 0.1);
    color: var(--cyan);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--cyan);
    transform: translateY(-2px);
}

.btn-danger {
    background: rgba(255, 0, 153, 0.1);
    color: var(--magenta);
    border: 1px solid rgba(255, 0, 153, 0.3);
    padding: 10px 18px;
    font-size: 14px;
}

.btn-danger:hover {
    background: rgba(255, 0, 153, 0.2);
    border-color: var(--magenta);
}


/* ============================================ */
/* SHARED MODAL STYLES */
/* ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid var(--border);
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-glow-strong);
    backdrop-filter: blur(10px);
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: var(--cyan);
}

/* Success Modal */
.success-modal {
    text-align: center;
    max-width: 450px;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
    color: #000;
    font-size: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.success-modal h2 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 28px;
}

.success-modal p {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 15px;
}

/* Recipe Detail in Modal */
.recipe-detail {
    padding: 20px;
}

.recipe-detail h2 {
    color: var(--cyan);
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
}

.recipe-section {
    margin-bottom: 25px;
}

.recipe-section h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.recipe-section ul {
    list-style: none;
    padding-left: 0;
}

.recipe-section li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.6;
}

.recipe-section li:last-child {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 22px;
}

.empty-state p {
    color: var(--text-muted);
}


/* ============================================ */
/* ANIMATIONS */
/* ============================================ */

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================ */
/* RESPONSIVE DESIGN */
/* ============================================ */

/* Recipe multiplier controls */
.recipe-multiplier {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
}

.recipe-multiplier span {
    color: var(--text-secondary);
    font-weight: 600;
}

.multiplier-display {
    min-width: 50px;
    text-align: center;
    color: var(--cyan) !important;
    font-size: 18px;
    font-weight: bold;
}

.multiplier-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--cyan);
    background: transparent;
    color: var(--cyan);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.multiplier-btn:hover {
    background: var(--cyan);
    color: var(--bg-dark);
    box-shadow: var(--shadow-glow);
}

.multiplier-reset {
    padding: 8px 16px;
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.multiplier-reset:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

/* Custom item styles */
.order-item.custom-item {
    border-left: 3px solid var(--magenta);
    background: linear-gradient(135deg, rgba(255, 0, 153, 0.05) 0%, var(--bg-card) 100%);
}

.custom-badge {
    display: inline-block;
    background: var(--magenta);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 8px;
    text-transform: uppercase;
}

/* Header buttons container */
.header-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-custom {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--magenta) 0%, #cc0077 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 153, 0.4);
}

/* Custom item modal form */
.custom-item-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Categories Manager Modal */
.modal-large {
    max-width: 600px;
    width: 90%;
}

.categories-manager {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.categories-list::-webkit-scrollbar {
    width: 6px;
}

.categories-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb {
    background: var(--cyan);
    border-radius: 3px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.3s;
    cursor: grab;
}

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

.category-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.category-item.drag-over {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    transform: scale(1.02);
}

.category-item:hover {
    border-color: var(--cyan);
}

.category-item input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.category-name-input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
}

.category-name-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.btn-danger-small {
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff0066, #cc0044);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-danger-small:hover {
    background: linear-gradient(135deg, #ff0044, #990033);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 102, 0.4);
}

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

.add-category-form .custom-input {
    flex: 1;
}

.admin-error {
    color: var(--magenta);
    font-size: 14px;
    text-align: center;
    padding: 10px;
    background: rgba(255, 0, 153, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

.custom-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.custom-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.custom-textarea {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.custom-textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.modal-actions button {
    flex: 1;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .menu-panel,
    .order-panel {
        max-height: 600px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        margin-bottom: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-section {
        justify-content: center;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .logo {
        width: 40px;
        height: 40px;
    }
    
    .mode-switcher {
        flex-direction: row;
        width: 100%;
        gap: 8px;
    }
    
    .mode-btn {
        flex: 1;
        font-size: 12px;
        padding: 10px 12px;
    }
    
    /* Mobile: Single-view navigation for recipe viewer */
    .main-layout {
        display: flex;
        flex-direction: column;
        height: auto;
        position: relative;
    }
    
    .sidebar,
    .detail-panel {
        width: 100%;
        height: auto;
        border: none;
        padding: 0;
    }
    
    /* Hide detail panel by default on mobile */
    .detail-panel {
        display: none;
    }
    
    /* Show only detail panel when recipe is selected */
    .main-layout.show-detail .sidebar {
        display: none;
    }
    
    .main-layout.show-detail .detail-panel {
        display: block;
        padding: 15px;
    }
    
    /* Add back button for mobile recipe detail */
    .detail-panel::before {
        content: '← Back to Recipes';
        display: block;
        padding: 12px 15px;
        margin: -15px -15px 15px -15px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        cursor: pointer;
        font-weight: 600;
        color: var(--cyan);
    }
    
    /* Mobile: Single-view navigation for ordering mode */
    .main-content {
        display: flex;
        flex-direction: column;
        position: relative;
        min-height: calc(100vh - 200px);
    }
    
    .menu-panel,
    .order-panel {
        width: 100%;
    }
    
    /* Add padding to menu panel for fixed button */
    .menu-panel {
        padding-bottom: 80px;
    }
    
    /* Hide order panel by default on mobile */
    .order-panel {
        display: none;
    }
    
    /* Show only order panel when viewing order */
    .main-content.show-order .menu-panel {
        display: none;
    }
    
    .main-content.show-order .order-panel {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 200px);
    }
    
    /* Make order items scrollable and fill space on mobile */
    .main-content.show-order .order-items {
        flex: 1;
        overflow-y: auto;
        min-height: 300px;
    }
    
    /* Mobile spacing for custom button */
    .panel-header-top {
        gap: 8px;
    }
    
    .btn-custom-small {
        padding: 6px 12px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .panel-header h2 {
        font-size: 18px;
    }
    
    /* Mobile View Order button - Real DOM element for better click handling */
    .mobile-view-order-btn {
        display: none; /* Hidden by default */
    }
    
    @media (max-width: 768px) {
        .mobile-view-order-btn {
            display: block;
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: auto;
            max-width: 300px;
            margin-bottom: max(20px, env(safe-area-inset-bottom, 20px));
            padding: 15px 30px;
            background: var(--cyan);
            color: var(--bg-dark);
            border: none;
            border-radius: 25px;
            font-weight: 600;
            font-size: 16px;
            cursor: pointer;
            z-index: 1000;
            box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
            text-align: center;
            pointer-events: auto;
            transition: all 0.3s ease;
        }
        
        .mobile-view-order-btn:active {
            transform: translateX(-50%) scale(0.95);
            box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
        }
        
        /* Hide the button when viewing order */
        .main-content.show-order ~ .mobile-view-order-btn {
            display: none;
        }
    }
    
    /* Add back button for mobile order view */
    .order-panel::before {
        content: '← Back to Menu';
        display: block;
        padding: 12px 15px;
        margin-bottom: 15px;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        cursor: pointer;
        font-weight: 600;
        color: var(--cyan);
    }
    
    .sidebar {
        max-height: none;
    }
    
    .recipe-card {
        padding: 12px;
    }
    
    .recipe-card-title {
        font-size: 14px;
    }
    
    .recipe-card-meta {
        font-size: 11px;
        gap: 8px;
    }
    
    .detail-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .detail-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .detail-actions button {
        flex: 1;
    }
    
    .detail-title {
        font-size: 24px;
    }
    
    .recipe-section h3 {
        font-size: 16px;
    }
    
    .recipe-section ul {
        font-size: 14px;
    }
    
    /* Recipe multiplier mobile */
    .recipe-multiplier {
        flex-wrap: wrap;
        padding: 12px;
    }
    
    .multiplier-reset {
        width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
    
    /* Ordering mode mobile improvements */
    .main-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .menu-panel,
    .order-panel {
        max-height: none;
        min-height: calc(100vh - 200px); /* same as .main-content */
    }

    
    .order-meta {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        grid-template-columns: 1fr;
    }
    
    .menu-item-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .menu-item-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .menu-item-actions button {
        width: 100%;
    }
    
    .panel-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .panel-header h2 {
        font-size: 20px;
    }
    
    .panel-header .search-box {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .header-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .header-buttons button {
        width: 100%;
    }
    
    .order-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-item-title {
        font-size: 14px;
    }
    
    .btn-remove {
        width: 100%;
    }
    
    /* Modal improvements for mobile */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content h2 {
        font-size: 20px;
    }
}

/* ============================================ */
/* PRINT STYLES */
/* ============================================ */

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    body::before {
        display: none;
    }
    
    header,
    .menu-panel,
    .panel-header button,
    .order-actions,
    .search-box,
    .mode-switcher {
        display: none !important;
    }
    
    .main-content {
        display: block;
    }
    
    .order-panel {
        box-shadow: none;
        max-height: none;
        background: white;
        border: 1px solid #000;
    }
    
    .order-item,
    .order-summary {
        background: white;
        border: 1px solid #000;
        color: #000;
    }
    
    .order-item-title {
        color: #000;
    }
    
    .quantity-display {
        color: #000;
    }
}
