/* ============================================================
   BASE STYLES
   ============================================================ */


:root {
    /* Colors - Brand & Semantic */
    --primary: #c30000;
    --primary-dim: #c30000b6;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --tag-good: var(--success);
    --tag-bad: var(--danger);
    --white: #ffffff;

    /* Colors - Theme Dependent (Default Dark) */
    --bg-dark: #09090b;
    --bg-sidebar: #2a0f0ff2;
    --bg-card: #18181b;
    --bg-card2: #272727;
    --bg-card-hover: rgba(255, 255, 255, 0.05);
    --bg-input: #ffffff1a;
    --bg-meta: rgba(255, 255, 255, 0.03);
    --text-main: #fafafa;
    --text-muted: #696969;
    --border-subtle: #272727;
    --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.2);

    /*Fonts*/
    --font-main: 'Outfit', sans-serif;

    /*Borders and Spacing*/
    --radius-xxl: 1rem;
    --radius-xl: 0.5rem;
    --radius-l: 0.25rem;
    --radius-m: 0.125rem;
    --radius-s: 0.0625rem;
}

/* Global Custom Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Custom Scrollbar Utility Class for smaller elements */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Firefox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--bg-input) transparent;
}

body.light-mode {
    --bg-dark: #f8f9fa;
    --bg-sidebar: #f1f3f5;
    --bg-card: #e0e0e0;
    --bg-card2: #f1f3f5;
    --bg-card-hover: #e9ecef;
    --bg-input: #ffffffce;
    --bg-meta: rgba(0, 0, 0, 0.03);
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-subtle: #dee2e6;
    --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body {
    transition: background-color 0.3s, color 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo {
    font-family: 'Outfit', sans-serif;
}

/* ============================================================
   LAYOUT
   ============================================================ */


.app-container {
    display: flex;
    height: 100vh;
}

.app-container.login-mode .sidebar {
    display: none;
}

.app-container.login-mode .main-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: radial-gradient(circle at center, #2a0f0f 0%, #09090b 100%);
}

.app-container.login-mode .top-bar {
    display: none;
}

.app-container.suspended-mode .sidebar,
.app-container.suspended-mode .top-bar,
.app-container.suspended-mode .breadcrumbs-nav {
    display: none;
}

.app-container.suspended-mode .main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    width: 100%;
}

/* Sidebar */

.sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-radius: 0 24px 24px 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    margin: 1rem 0rem 1rem 0rem;
    overflow: visible;
}

.app-container.collapsed .sidebar {
    width: 0;
    padding: 1.5rem 0;
    overflow: hidden;
    opacity: 0;
}

.sidebar,
.main-content {
    transition: all 0.3s ease-in-out;
}

.sidebar {
    transition: width 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 124px 2rem 2rem 2rem;
    transition: margin-left 0.3s ease;
}

.top-bar {
    background-color: color-mix(in srgb, var(--bg-dark), transparent 15%);
    display: flex;
    height: 84px;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    padding: 0 2rem;
    z-index: 1000;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.app-container.collapsed .top-bar {
    left: 0;
}

/* Breadcrumbs */
.breadcrumbs-nav {
    display: flex;
    align-items: center;
    margin-left: 2rem;
    /* More space from the title */
    margin-right: auto;
    /* Pushes breadcrumbs to the left, next to the title */
    height: 40px;
}

.breadcrumbs-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--primary);
    font-weight: 600;
}

.breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    padding: 0 1.5rem;
    /* This creates the "    |    " effect */
    color: var(--text-muted);
    opacity: 0.5;
    font-weight: 300;
}

.top-bar .actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.skeleton-button {
    width: 120px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(220, 220, 220, 0.4), rgba(240, 240, 240, 0.6), rgba(220, 220, 220, 0.4));
    animation: pulse 1.2s ease-in-out infinite;
}

.skeleton-card {
    height: 125px;
    padding: 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skeleton-line {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(220, 220, 220, 0.4), rgba(240, 240, 240, 0.6), rgba(220, 220, 220, 0.4));
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.top-bar .client-logo-box {
    min-width: 48px;
    min-height: 36px;
    border-radius: 6px;
    background: transparent;
}

#client-logo-container {
    display: none;
}

#client-logo-img {
    max-height: 36px;
    width: auto;
    border-radius: 6px;
}

.glass-panel {
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: 36px;
    padding: 1.75rem;
}

.suspended-account-screen {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.suspended-account-screen .suspended-panel {
    max-width: 560px;
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
}

.suspended-account-screen h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.suspended-account-screen .subtitle {
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.suspended-actions {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Editor Layout */

.sidebar-panels {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Layouts */

/* Main Editor Layout Grid */

/* restrict the header to the centre column of the layout grid */

.economic-sidebar {
    grid-column: 2;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 0;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.economic-sidebar.hidden {
    display: none;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1rem;
    margin: 0;
}

.btn-toggle-sidebar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.btn-toggle-sidebar:hover {
    color: var(--text-main);
}

.sidebar-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Main Layout */

.me-top-bar {
    background: rgba(10, 10, 10, 0.8);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    position: sticky;
    z-index: 50;
    overflow: visible;
    min-height: 64px;
    max-width: 900px;
    margin: 1.5rem;
    border-radius: 36px;
}

.me-right-sidebars {
    width: 320px;
    border-left: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.me-right-sidebars.collapsed {
    width: 0;
    border-left: none;
}

.me-sidebar-tabs {
    display: flex;
    border-radius: 24px;
}

.me-sidebar-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin: 0.5rem;
    border: 2px solid var(--border-subtle);
    border-radius: 24px;
}

.me-sidebar-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    border: var(--primary) solid 2px;
}

.me-sidebar-panel {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: none;
}

.me-sidebar-panel.active {
    display: block;
}

/* Sidebar Toggle Button */

.me-toggle-sidebar-btn {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 101;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.me-toggle-sidebar-btn:hover {
    transform: scale(1.1);
}

/* List/Gallery View */

.me-sidebar-search {
    margin-bottom: 1rem;
}




/* ============================================================
   COMPONENTS
   ============================================================ */


#image-change-input {
    display: none;
}

/* App Loading Overlay */

.nav-item {
    display: flex;
    align-items: center;
    height: 48px;
    gap: 1.25rem;
    /* Slightly tighter gap */
    padding: 0 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 24px;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-icon i,
.nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.nav-label {
    font-weight: 500;
    line-height: normal;
    display: flex;
    align-items: center;
}

.nav-item:hover {
    transform: translateY(-2px);
    background: var(--primary-dim);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-dim);
    color: var(--text-main);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--bg-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Components */

.btn {
    margin: 0 1rem 0 1rem;
    height: 30px;
    border-radius: 36px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: var(--font-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    line-height: 1;
}

.btn i,
.btn svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary);
    padding: 1rem;
    margin: 0.5rem;
    border-radius: 36px;
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-dim);
    /* Darker blue */
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline-success {
    border-color: var(--success);
    color: var(--success);
}

.btn-outline-success:hover {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.btn-outline-danger {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-outline-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.btn-outline-warning {
    border-color: #fbbf24;
    color: #fbbf24;
}

.btn-outline-warning:hover {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.8);
}

.btn-warning {
    background: #fbbf24;
    color: var(--bg-dark);
}

.btn-warning:hover {
    background: rgba(251, 191, 36, 0.8);
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    height: 24px;
    margin: 0 0.125rem;
}

.btn-secondary {
    background: var(--bg-input);
    padding: 1rem;
    color: var(--text-main);
    border-radius: 36px;
    border: 2px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon-sm {
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-sm:hover {
    background: var(--bg-input);
    border-color: var(--border-subtle);
}

.btn-icon-text.active {
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

/* Dropdown */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-l);
    min-width: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    padding: 0.5rem;
    z-index: 1000;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.dropdown.active .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--bg-input);
}

.dropdown-menu i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 36px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon-only i,
.btn-icon-only svg {
    width: 20px;
    height: 20px;
}

.btn-danger {
    background: var(--danger);
    color: white !important;
    padding: 1rem;
    margin: 0.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: #dc2626;
    /* Darker red */
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 0 1rem 0 1rem;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
}

/* Recipe editor header tweaks */

.btn-sm {
    gap: 0.3rem;
    line-height: 1;
}

.btn-sm i,
.btn-sm svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sm i {
    width: 12px !important;
    height: 12px !important;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.3rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.btn-icon i,
.btn-icon svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: scale(1.1);
}

/* Standardized Delete Icon Hover */
.btn-icon:hover i[data-lucide="trash-2"],
.btn-icon:hover svg[data-lucide="trash-2"],
.btn-icon:hover .lucide-trash-2 {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger) !important;
    transform: scale(1.15);
}

.btn-remove-ingredient:hover i,
.btn-remove-method:hover i {
    color: var(--danger) !important;
    transform: scale(1.1);
}

.table-search {
    background: var(--bg-input);
    color: white;
    border: 2px solid var(--border-subtle);
    height: 32px;
    border-radius: 24px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.table-search::placeholder {
    color: var(--text-muted);
}

.table-search:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th.sortable {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.data-table th.sortable:hover {
    color: var(--text-main);
}

.data-table tr {
    transition: background 0.2s;
}

.data-table tr:hover {
    background: var(--bg-meta);
}

.data-table td {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.table-input,
input,
select,
textarea {
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 6px;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    /* Match UI font */
    line-height: 1.5;
    /* Resizing */
    resize: none;
    overflow: hidden;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge.red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}


/* Dark theme select dropdown styling */

select.ing-input {
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    border: 2px solid var(--border-subtle) !important;
}

/* Style the dropdown options in dark mode */

select.ing-input option {
    background-color: var(--bg-card);
    color: var(--text-main);
    padding: 0.5rem;
    margin: 0.5rem;
    border: none;
}

/* Hover state for select options */

select.ing-input option:hover {
    background-color: var(--bg-card-hover);
    margin: 0.25rem;
    padding: 0.25rem;
    color: var(--text-main);
}

/* Selected option styling */

select.ing-input option:checked {
    background: linear-gradient(var(--primary), var(--primary));
    background-color: var(--primary);
    color: var(--bg-dark);
}

/* Custom Dropdown Styles */

.custom-dropdown {
    position: relative;
    border-radius: 24px;
}

.dropdown-trigger {
    width: 100%;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 24px;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.dropdown-trigger:hover {
    background: #f63b3b;
    border-color: var(--primary-dim);
}

.dropdown-trigger:focus {
    outline: 2px solid #3b82f6;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 24px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dropdown-option {
    padding: 0rem;
    width: auto;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s;
    margin: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 1rem;
}

.dropdown-option:hover {
    background: var(--bg-card-hover);
    color: #ffffff;
    padding-left: 1.25rem;
    border-radius: 1rem;
}

.dropdown-option[data-value=""] {
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 0.25rem;
}

.dropdown-option[data-value=""]:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

/* Scrollbar styling for dropdown menu */

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}

.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.ing-input:focus,
.method-input:focus {
    border-color: var(--primary);
    background: var(--bg-input);
}

.title-input {
    font-size: 2rem;
    font-weight: 700;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0;
    width: auto;
    font-family: 'Outfit', sans-serif;
}

.title-input:focus {
    border-bottom-color: var(--primary);
    outline: none;
}

.method-input {
    min-height: 25px;
    font-size: 1rem;
    resize: vertical;
}

.queue-badge {
    background: var(--primary-dim);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Menu Engineer Branding Tabs */

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    height: 36px;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border-subtle);
    border-radius: 2px;
}

input[type=range]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 8px rgba(195, 0, 0, 0.4);
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: #333;
}

/* ============================================================================
   RECIPE EDITOR STYLES
   ============================================================================ */

.btn-change-image {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
}

/* Custom Dropdown Additional Styles */

.dropdown-option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    -webkit-user-select: none;
    user-select: none;
    margin: 0.25rem 0.5rem;
    border-radius: 6px;
}

.dropdown-option-checkbox:hover {
    background: var(--bg-card-hover);
    padding-left: 1.25rem;
}

.dropdown-option-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

.recipe-title-input {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    background: transparent;
    border-bottom: 2px solid var(--primary);
    color: var(--text-main);
    padding: 0.5rem 0;

    /* Add these for expansion + wrapping */
    flex: 1;
    /* fills remaining space */
    resize: none;
    min-width: 0;
    /* allows flex shrink/wrap */
    white-space: normal;
    /* allows wrapping */
    word-break: break-word;
    /* breaks long words */
    line-height: 1.3;
    /* nicer readability */
}

.recipe-title-input:focus {
    border-color: var(--primary);
    outline: none;
}

.description-input {
    min-height: 60px;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 24px;
    padding: 0.75rem;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    resize: vertical;
}

.description-input:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    outline: none;
}

.header-meta label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.header-meta select,
.header-meta input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.header-meta select:focus,
.header-meta input:focus {
    border-color: var(--primary);
    background: grey;
    outline: none;
}

.header-bottom label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

.header-bottom input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
}

.header-bottom input:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    outline: none;
}

/* Main Content Area */

.qty-input,
.unit-select,
.ingredient-name-input,
.brand-input,
.cost-input,
.notes-input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: 'Outfit', sans-serif;
}

.qty-input {
    width: 80px;
}

.unit-select {
    width: 70px;
}

.ingredient-name-input {
    flex: 1;
    min-width: 150px;
}

.brand-input {
    width: 120px;
}

.cost-input {
    width: 90px;
}

.allergen-badge {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
}

.notes-input {
    width: 100%;
}

.portion-margin {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Method Row */

.btn-remove-method {
    padding: 0.5rem 0.8rem;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger);
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-method:hover {
    background: var(--danger);
    color: white;
}

/* Plating Section */

.btn-change-plating-image {
    align-self: flex-start;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.plating-description-input {
    min-height: 100px;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    resize: vertical;
}

.plating-description-input:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    outline: none;
}

/* Action Buttons */

.btn-add-ingredient,
.btn-add-method {
    width: 100%;
    margin-top: 0.5rem;
}

/* Economic Engine Sidebar */

.metric-label {
    color: var(--text-muted);
}

#sales-price-input {
    flex: 1;
    min-width: 0;
    padding: 0.3rem 0.5rem;
    background: var(--bg-card-hover);
    border: 2px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-main);
    text-align: left;
}

#sales-price-input:focus {
    border-color: var(--primary);
    outline: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 1rem;
}

select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Input focus states */

input:focus,
textarea:focus,
select:focus {
    transition: all 0.2s;
}

/* ============================================================================
 * Pantry Add Modal
 * ============================================================================ */

.allergen-checkbox {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.allergen-checkbox:hover {
    border-color: var(--primary);
    color: white;
}

.allergen-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

.allergen-checkbox:has(input:checked) {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}


.checkbox-label:hover {
    color: var(--primary);
}

.data-table.compact td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
}

.me-eco-label {
    color: var(--text-muted);
}

.me-title-input {
    background: transparent !important;
    border-bottom: 2px solid var(--primary) !important;
    font-size: 2.25rem !important;
    font-weight: 900 !important;
    font-family: 'Outfit', sans-serif !important;
    color: white !important;
    padding: 0 !important;
    outline: none;
    padding-inline-start: 0.5rem !important;
}

.me-card-badge {
    font-size: 0.7rem;
}

.me-section-margin-badge {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}


.me-color-input {
    width: 40px;
    height: 30px;
    padding: 2px;
    border: none;
    cursor: pointer;
}

.me-rep-filter-group select,
.me-rep-filter-group input {
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
    width: 100%;
}

.me-rep-filter-group button#me-rep-clear-filters {
    background: var(--bg-card);
    color: var(--text-main);
    border: 2px solid var(--border-subtle);
    transition: background 0.2s, border-color 0.2s;
}

.me-rep-filter-group button#me-rep-clear-filters:hover {
    background: var(--bg-input);
    border-color: var(--border-main);
}

.nutrition-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nutrition-field .input-group {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
}

.nutrition-field input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    padding: 0.5rem !important;
    font-size: 0.9rem !important;
    color: var(--text-main) !important;
    width: 60px;
}

/* Components */

/* Review Component Specific */

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

.badge.red {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.badge.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Dashboard Specific */




/* ============================================================
   VIEW SPECIFICS
   ============================================================ */


.editor-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

.recipe-card {
    background: var(--bg-card2);
    border-radius: 24px;
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recipe-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 4px 12px rgba(195, 0, 0, 0.1);
}

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}


.main-editor {
    min-height: 80vh;
}

.editor-table th {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.editor-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.recipe-card {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-editor-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    padding: 1.5rem;
    width: 100%;
    height: calc(100vh - 130px);
    overflow: hidden;
}

.main-editor-column,
.editor-sidebar {
    overflow-y: auto;
    height: 100%;
    padding-right: 0.5rem;
}

.main-editor-column::-webkit-scrollbar,
.editor-sidebar::-webkit-scrollbar {
    width: 6px;
}

.main-editor-column::-webkit-scrollbar-track,
.editor-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.main-editor-column::-webkit-scrollbar-thumb,
.editor-sidebar::-webkit-scrollbar-thumb {
    background: var(--bg-input);
    border-radius: 10px;
}

.main-editor-column::-webkit-scrollbar-thumb:hover,
.editor-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.recipe-editor-layout.pantry-visible {
    grid-template-columns: 250px 1fr 320px;
}

/* Editor Header - Recipe Title, Image, Basic Info */

.editor-header {
    grid-column: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 36px;
}

.editor-header.compact-header .header-top.new-header-layout {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1.5rem;
    width: 100%;
}

.editor-header.compact-header .header-left-pane {
    display: flex;
    align-items: flex-start;
}

.editor-header.compact-header .header-right-pane {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.editor-header.compact-header .header-right-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    flex-wrap: nowrap;
}

.editor-header.compact-header .recipe-title-input,
.recipe-title-input {
    flex: 1 !important;
    min-width: 150px;
    font-size: 1.5rem;
    font-weight: 900;
    width: auto;
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
}

@media (max-width: 1200px) {
    .editor-header.compact-header .header-right-top {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 900px) {
    .editor-header.compact-header .header-top.new-header-layout {
        grid-template-columns: 1fr;
    }

    .editor-header.compact-header .header-left-pane {
        width: 100%;
        justify-content: center;
    }

    .editor-header.compact-header .header-right-top {
        align-items: flex-start;
    }
}

.editor-header.compact-header .recipe-image {
    width: 160px;
    height: 160px;
    border-radius: 16px;
}

.editor-header.compact-header .header-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.editor-header.compact-header .header-meta-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.editor-header.compact-header .meta-dropdowns {
    display: flex;
    flex: 1 1 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.editor-header.compact-header .meta-numbers {
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.editor-header.compact-header .header-meta-compact .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 180px;
}

.editor-header.compact-header .header-meta-compact .form-group label {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
    width: 90px;
}

.editor-header.compact-header .header-meta-compact .form-group .custom-dropdown,
.editor-header.compact-header .header-meta-compact .form-group input {
    flex: 1;
    width: 100%;
    min-width: 0;
}

/* Special styling for Scale Yield */

.editor-header.compact-header .header-meta-compact .form-group.scale-yield label {
    color: var(--primary);
    font-weight: 600;
}

.editor-header.compact-header .header-meta-compact .form-group.scale-yield input {
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
}

/* Position action buttons at top-right of the header box */

.editor-header .actions {
    display: flex;
    gap: 8px;
    z-index: 5;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.editor-main {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section Styling */

.btn-pantry-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pantry-link:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-pantry-link.linked {
    background: var(--primary);
    color: var(--bg-dark);
}

.btn-pantry-unlink,
.btn-remove-ingredient {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger);
    color: var(--danger);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pantry-unlink:hover,
.btn-remove-ingredient:hover {
    background: var(--danger);
    color: rgb(179, 32, 32);
}

.editor-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.pantry-sidebar {
    grid-column: 1;
    grid-row: 1;
    z-index: 10;
    background: var(--bg-card);
}

.recipe-editor-layout.pantry-visible .editor-header,
.recipe-editor-layout.pantry-visible .editor-main {
    grid-column: 2;
}

.recipe-editor-layout.pantry-visible .economic-sidebar {
    grid-column: 3;
}

.pantry-sidebar {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 0;
    max-height: calc(100vh - 100px);
}

.pantry-sidebar.hidden {
    display: none;
}

.pantry-sidebar .sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pantry-sidebar .sidebar-header h3 {
    font-size: 1rem;
    margin: 0;
}

.btn-toggle-pantry {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 1.5rem;
    transition: color 0.2s;
}

.btn-toggle-pantry:hover {
    color: var(--text-main);
}

.pantry-sidebar .sidebar-content {
    overflow-y: auto;
}

.pantry-search {
    padding: 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 36px;
    color: var(--text-main);
    width: calc(100% - 1.5rem);
    margin: 0 0.75rem;
}

.pantry-search:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    outline: none;
}

.pantry-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
}

.pantry-option {
    padding: 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.pantry-option:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes lucide-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.lucide-spin {
    animation: lucide-spin 1s linear infinite;
    display: inline-block;
}

/* Scrollbar Styling for Premium Feel */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Modal Styles */

.pantry-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Responsive Design */

.pantry-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: pantryFadeIn 0.2s ease;
}

.pantry-modal {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    width: 520px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: pantrySlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.pantry-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.pantry-modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}

.pantry-modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.pantry-modal-row {
    display: flex;
    gap: 1rem;
}

.pantry-modal-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pantry-modal-field label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pantry-modal-field input,
.pantry-modal-field select {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.pantry-modal-field input:focus,
.pantry-modal-field select:focus {
    border-color: var(--primary);
    outline: none;
    background: var(--bg-card-hover);
}

.pantry-modal-allergens {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.pantry-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* Recipe Review Pipeline */

.review-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-meta);
    border: 2px solid var(--border-subtle);
    border-radius: 12px;
}

.menu-engineer-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 85vh;
    margin: -1.5rem;
    /* Negate parent padding for full-bleed feel */
}

/* Top Bar: Navigation, Title, and Economics */

.me-editor-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 64px);
}

/* Preview Sidebar */
.me-preview-sidebar.collapsed {
    display: none !important;
}

/* Tools Sidebar */
.me-tools-sidebar {
    z-index: 50;
    position: relative;
}

.me-tools-sidebar.collapsed {
    display: none !important;
}

/* Right Sidebar Container */

.menu-engineer-list {
    padding: 2rem;
}


.pantry-modal-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.review-filters {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid var(--border-subtle);
}

.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
}




/* ============================================================
   UTILITY CLASSES
   ============================================================ */


/* Utilities */

.p-4 {
    padding: 1.5rem !important;
}

.w-100 {
    width: 100%;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-8 {
    margin-bottom: 3rem !important;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.border-bottom {
    border-bottom: 1px solid var(--border-subtle);
}

.pb-3 {
    padding-bottom: 1rem;
}

.gap-2 {
    gap: 0.5rem !important;
}


.text-xs {
    font-size: 0.75rem !important;
}

.text-sm {
    font-size: 0.875rem !important;
}


.text-muted {
    color: var(--text-muted);
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.font-bold {
    font-weight: 700 !important;
}

.font-medium {
    font-weight: 500;
}

.mt-3 {
    margin-top: 1rem !important;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gap-1 {
    gap: 0.25rem !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.font-mono {
    font-family: monospace !important;
}

.cursor-pointer {
    cursor: pointer !important;
}

.w-full {
    width: 100%;
}

.flex-column {
    flex-direction: column !important;
}


.justify-content-end {
    justify-content: end !important;
}


.flex-grow-1 {
    flex-grow: 1 !important;
}

.gap-3 {
    gap: 1rem !important;
}


.p-3 {
    padding: 1rem !important;
}

.p-5 {
    padding: 3rem !important;
}


.pt-4 {
    padding-top: 1.5rem !important;
}


.text-4xl {
    font-size: 2.25rem !important;
}

.font-black {
    font-weight: 900 !important;
}

.rounded-lg {
    border-radius: 12px !important;
}

.rounded-xl {
    border-radius: 16px !important;
}

.border-top {
    border-top: 1px solid var(--border-subtle) !important;
}




/* ============================================================
   LIGHT MODE STYLES
   ============================================================ */


body.light-mode {
    --bg-dark: #f8f9fa;
    --bg-card: #ffffff;
    --bg-card2: #f1f3f5;
    --bg-card-hover: #e9ecef;
    --text-main: #212529;
    --text-muted: #6c757d;
    --border-subtle: #dee2e6;
}

/* ============================================================================
   LIGHT MODE OVERRIDES - Fix hardcoded colors for all elements
   ============================================================================ */

/* Sidebar in light mode */

body.light-mode .sidebar {
    background: var(--bg-sidebar);
}

/* User profile in light mode */

body.light-mode .user-profile {
    background: var(--bg-meta);
}

/* Input fields in light mode */

body.light-mode .table-input,
body.light-mode input,
body.light-mode select,
body.light-mode textarea {
    background: var(--bg-input);
    color: var(--text-main);
}

body.light-mode input::placeholder,
body.light-mode textarea::placeholder,
body.light-mode select {
    color: var(--text-muted);
}

/* Dropdown trigger in light mode */

body.light-mode .dropdown-trigger {
    background: var(--bg-card2);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

body.light-mode .dropdown-trigger:hover {
    background: var(--bg-card-hover);
}

/* Meta row in light mode */

body.light-mode .meta-row {
    background: var(--bg-meta);
}

/* Ingredient inputs in light mode */

body.light-mode .ing-input {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

body.light-mode select.ing-input {
    background-color: var(--bg-input);
    color: var(--text-main);
}

body.light-mode select.ing-input option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

/*  Branding tabs in light mode */

body.light-mode .me-branding-tabs {
    background: var(--bg-meta);
}

/* Branding group in light mode */

body.light-mode .me-branding-group {
    background: var(--bg-meta);
}

/* Ingredient rows in light mode */

body.light-mode .ingredient-row {
    background: var(--bg-input);
}

body.light-mode .ingredient-row:hover {
    background: var(--bg-card-hover);
}

/* Ingredient input fields in light mode */

body.light-mode .qty-input,
body.light-mode .unit-select,
body.light-mode .ingredient-name-input,
body.light-mode .brand-input,
body.light-mode .cost-input,
body.light-mode .notes-input {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

/* Method rows in light mode */

body.light-mode .method-row {
    background: var(--bg-input);
}

body.light-mode .method-row:hover {
    background: var(--bg-card-hover);
}

/* Description input in light mode */

body.light-mode .description-input {
    background: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

body.light-mode .description-input:focus {
    background: var(--bg-dark);
}

/* Method text in light mode */

body.light-mode .method-text {
    background: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

body.light-mode .method-text:focus {
    background: var(--bg-dark);
}

/* Metrics section in light mode */

body.light-mode .metrics-section {
    background: var(--bg-input);
    border-color: var(--border-subtle);
}

/* Pantry option in light mode */

body.light-mode .pantry-option {
    background: var(--bg-input);
    border-color: var(--border-subtle);
}

body.light-mode .pantry-option:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-dark);
}

/* Pantry search in light mode */

body.light-mode .pantry-search {
    background: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

body.light-mode .pantry-search:focus {
    background: var(--bg-dark);
}

/* Pantry modal field in light mode */

body.light-mode .pantry-modal-field input,
body.light-mode .pantry-modal-field select {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

body.light-mode .pantry-modal-field input:focus,
body.light-mode .pantry-modal-field select:focus {
    background: var(--bg-dark);
}

/* Allergen checkbox in light mode */

body.light-mode .allergen-checkbox {
    background: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-muted);
}

body.light-mode .allergen-checkbox:hover {
    border-color: var(--primary);
}

/* Modal dropdowns in light mode */

body.light-mode .dropdown-menu {
    box-shadow: var(--shadow-main);
}

body.light-mode .dropdown-menu a:hover {
    background: var(--bg-card-hover);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-xs {
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge i,
.badge svg {
    width: 10px;
    height: 10px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-xs {
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge i,
.badge svg {
    width: 10px;
    height: 10px;
}

/* Menu Engineer sidebar in light mode */

body.light-mode .me-sidebar-tabs {
    background: var(--bg-meta);
}

body.light-mode .me-sidebar-tab.active {
    background: rgba(195, 0, 0, 0.08);
}

/* Menu Engineer top bar in light mode */

body.light-mode .me-top-bar {
    background: rgba(248, 249, 250, 0.8);
}

/* Menu Engineer economics summary in light mode */

body.light-mode .me-economics-summary {
    background: var(--bg-meta);
    border-color: var(--border-subtle);
}

/* Menu Engineer right sidebars in light mode */

body.light-mode .me-right-sidebars {
    background: var(--bg-meta);
}

/* Menu Engineer item in light mode */

body.light-mode .me-item {
    background: var(--bg-input);
}

/* Preset card in light mode */

body.light-mode .me-preset-card {
    background: var(--bg-input);
}

body.light-mode .me-preset-card:hover {
    background: var(--bg-card-hover);
}

body.light-mode .me-preset-icon {
    background: var(--bg-input);
}

/* Review filters in light mode */

body.light-mode .review-filters {
    background: var(--bg-meta);
}

/* Title input in light mode */

body.light-mode .me-title-input {
    color: var(--text-main) !important;
}

/* Menu engineer inputs in light mode */

body.light-mode .me-section-title,
body.light-mode .me-item-title,
body.light-mode .me-item-price,
body.light-mode #me-rep-search,
body.light-mode #me-rep-sort,
body.light-mode #me-rep-sort-dir,
body.light-mode #me-rep-cost-min,
body.light-mode #me-rep-cost-max,
body.light-mode #me-rep-price-min,
body.light-mode #me-rep-price-max {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
}

/* Recipe editor inputs in light mode */

body.light-mode .dropdown-trigger,
body.light-mode .dropdown-search,
body.light-mode .ing-input,
body.light-mode .method-input {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
}

body.light-mode .ing-cost {
    color: var(--text-main) !important;
}

/* Comprehensive light mode overrides for inputs and dropdowns */

body.light-mode .dropdown-trigger,
body.light-mode .dropdown-search,
body.light-mode .ing-input,
body.light-mode .method-input,
body.light-mode .qty-input,
body.light-mode .unit-select,
body.light-mode #sales-price-input,
body.light-mode #cost-per-serving,
body.light-mode #batch-margin,
body.light-mode #pm-unit-trigger {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
}

/* Light mode heading and text overrides */

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode h6 {
    color: var(--text-main);
}

/* App loading overlay in light mode */

body.light-mode #app-loading-overlay {
    background: var(--bg-dark);
}

/* App loading overlay in light mode */

body.light-mode .app-loading-overlay {
    background: var(--bg-dark);
}

body.light-mode .app-loading-bar {
    background: var(--bg-meta);
}

body.light-mode .app-loading-text {
    color: var(--text-muted);
}

/* Additional light mode overrides for button and dropdown text */

body.light-mode .btn-secondary {
    color: var(--text-main);
}

body.light-mode .btn-secondary:hover {
    color: var(--text-main);
}

/* ============================================================
   MOBILE RESPONSIVE DESIGN - Tablet (768px)
   ============================================================ */
@media (max-width: 768px) {
    /* App container and sidebar - drawer pattern */
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 260px;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        padding: 1rem;
        margin: 0;
    }

    .app-container.sidebar-open .sidebar {
        transform: translateX(0);
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        display: none;
        z-index: 998;
        transition: opacity 0.3s ease;
    }

    .app-container.sidebar-open .sidebar-overlay {
        display: block;
    }

    /* Top bar adjustment for mobile */
    .top-bar {
        left: 0 !important;
        height: 64px;
        padding: 0 1rem;
        gap: 0.5rem;
    }

    /* Main content adjustment */
    .main-content {
        padding: 80px 1rem 1rem 1rem;
        flex: 1;
    }

    /* Main editor layouts - single column */
    .editor-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .economic-sidebar {
        grid-column: 1 !important;
        position: static;
        max-height: none;
    }

    /* Recipe grid - single column */
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Touch-friendly buttons and icons */
    .btn-icon-only {
        width: 44px !important;
        height: 44px !important;
        min-height: 44px;
        min-width: 44px;
    }

    .btn-icon-only i,
    .btn-icon-only svg {
        width: 24px;
        height: 24px;
    }

    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Padding reduction */
    .glass-panel,
    .sidebar-panels {
        padding: 1rem;
    }

    .top-bar .actions {
        gap: 0.25rem;
    }

    /* Breadcrumbs hidden on mobile */
    .breadcrumbs-nav {
        display: none;
    }

    /* Typography adjustments */
    .page-title {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    /* Modals - mobile optimized */
    .pantry-modal,
    .modal-content {
        width: 90vw;
        max-width: 90vw;
        margin: 1rem;
        max-height: 90vh;
    }

    /* Dropdowns - prevent overflow */
    .dropdown-menu {
        position: fixed;
        top: auto;
        right: auto;
        left: 0;
        max-width: calc(100vw - 1rem);
        z-index: 1001;
    }

    /* Editor header - responsive image */
    .editor-header.compact-header .recipe-image {
        width: 120px;
        height: 120px;
    }

    .editor-header.compact-header .header-top.new-header-layout {
        grid-template-columns: 1fr;
    }

    /* Meta fields - flexible layout */
    .header-meta-compact .form-group {
        min-width: auto;
        flex: 1 1 auto;
    }

    /* Stat cards - single column */
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Admin tables - horizontal scroll */
    .data-table {
        font-size: 0.85rem;
    }

    .data-table td,
    .data-table th {
        padding: 0.5rem 0.25rem;
    }

    /* Nav items - ensure touch size */
    .nav-item {
        height: 48px;
        gap: 1rem;
        padding: 0 1rem;
        margin-bottom: 0.5rem;
    }

    /* Menu engineer top bar */
    .me-top-bar {
        max-width: 100%;
        margin: 1rem 0;
        padding: 0.75rem;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* ============================================================
   MOBILE RESPONSIVE DESIGN - Large Phone (600px)
   ============================================================ */
@media (max-width: 600px) {
    /* Further reduce padding and spacing */
    .main-content {
        padding: 80px 0.75rem 1rem 0.75rem;
    }

    .glass-panel {
        padding: 1rem;
        border-radius: 12px;
    }

    /* Recipe grid - ensure single column */
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Editor sections stack */
    .editor-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Meta row - vertical stack */
    .meta-row {
        flex-direction: column;
        gap: 1rem;
        padding: 0.75rem;
    }

    /* Ingredient rows - stack on mobile */
    .ingredient-row {
        flex-direction: column;
        gap: 0.75rem;
    }

    .qty-input,
    .unit-select,
    .ingredient-name-input,
    .brand-input,
    .cost-input {
        width: 100%;
    }

    /* Typography - reduce sizes further */
    .page-title {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1rem;
    }

    /* Button groups - stack vertically */
    .btn-group,
    .actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn {
        width: 100%;
    }

    /* Admin UI adjustments */
    .tab-buttons {
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1;
        min-width: 120px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    /* Reduce gaps and margins */
    .sidebar-panels {
        gap: 1rem;
    }

    .editor-main {
        gap: 1rem;
    }

    /* Recipe editor header image reduction */
    .editor-header.compact-header .recipe-image {
        width: 100px;
        height: 100px;
    }

    .recipe-title-input {
        font-size: 1.25rem;
    }

    /* Dropdown - better mobile sizing */
    .dropdown-trigger {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .dropdown-menu {
        min-width: 100%;
    }

    /* Modal adjustments */
    .pantry-modal {
        width: 95vw;
        max-width: 95vw;
    }

    .pantry-modal-body,
    .pantry-modal-header {
        padding: 1rem;
    }

    /* Menu engineer - single column layout */
    .me-editor-workspace {
        grid-template-columns: 1fr !important;
    }

    .me-preview-sidebar,
    .me-tools-sidebar {
        display: none !important;
    }

    /* Menu engineer content full width */
    .me-editor-content {
        padding: 1.5rem 1rem;
        max-height: calc(100vh - 64px);
    }
}

/* ============================================================
   MOBILE RESPONSIVE DESIGN - Small Phone (480px)
   ============================================================ */
@media (max-width: 480px) {
    /* Minimal padding */
    .main-content {
        padding: 75px 0.5rem 0.75rem 0.5rem;
    }

    .top-bar {
        height: 56px;
        padding: 0 0.5rem;
    }

    .glass-panel {
        padding: 0.75rem;
        border-radius: 8px;
    }

    /* Minimal spacing */
    .sidebar-panels {
        gap: 0.75rem;
    }

    .editor-main {
        gap: 0.75rem;
    }

    /* Typography - minimum readable size */
    .page-title {
        font-size: 1.1rem;
    }

    h1 {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 0.95rem;
    }

    h3 {
        font-size: 0.9rem;
    }

    body {
        font-size: 0.9rem;
    }

    /* Input font size - prevent auto-zoom on iOS */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Button touch targets - minimum 44px */
    .btn,
    .btn-icon-only {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Stat cards reduce width */
    .stat-grid {
        grid-template-columns: 1fr;
    }

    /* Sidebar logo reduce */
    .logo {
        margin-bottom: 2rem;
    }

    .logo svg {
        height: 40px;
    }

    .nav-icon {
        width: 20px;
        height: 20px;
    }

    .nav-item {
        height: 44px;
        padding: 0 0.75rem;
        gap: 0.75rem;
    }

    /* Recipe editor - extreme compression */
    .editor-header {
        padding: 1rem;
        gap: 1rem;
    }

    .editor-header.compact-header .recipe-image {
        width: 80px;
        height: 80px;
    }

    .recipe-title-input {
        font-size: 1.1rem;
    }

    /* Form groups - full width */
    .form-group {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    input,
    select,
    textarea,
    .custom-dropdown {
        padding: 0.5rem;
        border-radius: 6px;
        font-size: 0.9rem;
    }

    /* Dropdown menu - mobile sizing */
    .dropdown-trigger {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    .dropdown-menu {
        max-height: 50vh;
    }

    .dropdown-option {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    /* Pantry modal */
    .pantry-modal {
        width: 95vw;
    }

    .pantry-modal-header,
    .pantry-modal-body,
    .pantry-modal-footer {
        padding: 0.75rem;
    }

    .pantry-modal-row {
        gap: 0.5rem;
        flex-direction: column;
    }

    .pantry-modal-field {
        flex: 1;
    }

    /* Tables - scrollable */
    .data-table {
        font-size: 0.75rem;
    }

    .data-table td,
    .data-table th {
        padding: 0.25rem;
    }

    /* Admin tabs */
    .tab-button {
        flex: 1;
        min-width: auto;
        padding: 0.5rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Badges */
    .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    /* Button groups - single column */
    .editor-actions {
        gap: 0.5rem;
    }

    .btn-sm {
        padding: 0 0.5rem;
        font-size: 0.75rem;
        height: 32px;
    }

    /* Menu engineer interface */
    .me-top-bar {
        margin: 0.5rem 0;
        padding: 0.5rem;
        min-height: 56px;
    }

    .me-editor-content {
        padding: 1rem 0.5rem;
    }

    /* Reduce animation complexity on slow devices */
    * {
        transition-duration: 0.15s !important;
    }

    /* Sidebar nav - improve mobile experience */
    .user-profile {
        padding: 0.75rem;
        margin-top: auto;
    }

    .avatar {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .name {
        font-size: 0.9rem;
    }

    .role {
        font-size: 0.75rem;
    }
}

/* ============================================================
   UTILITY RESPONSIVE CLASSES
   ============================================================ */
@media (max-width: 768px) {
    .hide-tablet {
        display: none !important;
    }

    .show-tablet {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .hide-mobile-only {
        display: none !important;
    }
}

body.light-mode .dropdown-option {
    color: var(--text-main);
}

body.light-mode .dropdown-option:hover {
    color: var(--text-main);
}

body.light-mode .dropdown-option[data-value=""] {
    color: var(--text-muted);
}

body.light-mode .dropdown-option[data-value=""]:hover {
    color: var(--primary);
}

/* Input field overrides in light mode */

body.light-mode .table-input,
body.light-mode .ing-input {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
}

body.light-mode .ing-input:focus {
    background: var(--bg-meta) !important;
}

/* Step number styling in light mode */

body.light-mode .step-num {
    color: white;
}

/* Button styling in light mode */

body.light-mode .btn-remove-method:hover {
    color: white;
}

body.light-mode .btn-remove-ingredient:hover {
    color: white;
}

body.light-mode .btn-danger:hover {
    color: white;
}

body.light-mode .btn-pantry-unlink:hover {
    color: white;
}

/* Input and select field styling in light mode */

body.light-mode .header-meta select:focus,
body.light-mode .header-meta input:focus,
body.light-mode .header-bottom input:focus {
    background: var(--bg-dark) !important;
    color: var(--text-main) !important;
    border-color: var(--primary) !important;
}

body.light-mode .recipe-title-input:focus {
    color: var(--text-main);
    background: var(--bg-dark);
    border-color: var(--primary);
}

body.light-mode input:focus,
body.light-mode select:focus,
body.light-mode textarea:focus {
    background: var(--bg-dark) !important;
    color: var(--text-main) !important;
    border-color: var(--primary) !important;
}

body.light-mode .ing-qty:focus {
    background: var(--bg-dark) !important;
    border-color: var(--primary) !important;
}

/* Modal and dropdown shadow adjustments in light mode */

body.light-mode .dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

/* Dropdown menu options styling in light mode */

body.light-mode .dropdown-menu .dropdown-option {
    background: transparent;
    color: var(--text-main);
}

body.light-mode .dropdown-menu .dropdown-option:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

/* Dropdown menu scrollbar in light mode */

body.light-mode .dropdown-menu::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
}

body.light-mode .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Dropdown trigger focus state in light mode */

body.light-mode .dropdown-trigger:focus {
    outline: 2px solid var(--primary);
    border-color: var(--primary);
    background: var(--bg-dark);
}

/* Method input focus state in light mode */

body.light-mode .method-input:focus {
    background: var(--bg-dark);
    color: var(--text-main);
}

/* Plating image section in light mode */

body.light-mode .plating-description-input {
    background: var(--bg-input);
    color: var(--text-main);
    border-color: var(--border-subtle);
}

body.light-mode .plating-description-input:focus {
    background: var(--bg-dark);
}

/* Economic Engine Sidebar in light mode */

body.light-mode .economic-sidebar {
    background: var(--bg-card);
    border-color: var(--border-subtle);
}

body.light-mode .economic-sidebar .sidebar-header {
    border-bottom-color: var(--border-subtle);
}

body.light-mode .metrics-section {
    background: var(--bg-input);
    border-color: var(--border-subtle);
}

body.light-mode .metrics-section h4 {
    color: var(--text-muted);
}

body.light-mode .metric-label {
    color: var(--text-muted);
}

body.light-mode .metric-value {
    color: var(--text-main);
}

body.light-mode .metric.highlight {
    background: rgba(195, 0, 0, 0.05);
}

body.light-mode #sales-price-input {
    background: var(--bg-input);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

body.light-mode #sales-price-input:focus {
    background: var(--bg-dark);
    border-color: var(--primary);
}

/* Recipe Editor Header in light mode */

body.light-mode .editor-header {
    background: var(--bg-card);
    border-color: var(--border-subtle);
}

body.light-mode .editor-header.compact-header .header-top,
body.light-mode .editor-header.compact-header .header-right {
    color: var(--text-main);
}

body.light-mode .recipe-title-input {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-subtle);
}

body.light-mode .recipe-title-input:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: var(--primary);
}

body.light-mode .editor-header .form-group label {
    color: var(--text-muted);
}

/* Health status section in light mode */

body.light-mode .health-status {
    background: rgba(59, 130, 246, 0.05);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Modal overlay in light mode */

body.light-mode .modal {
    background: rgba(0, 0, 0, 0.4);
}

body.light-mode .modal-content {
    background: var(--bg-card);
    border-color: var(--border-subtle);
    color: var(--text-main);
}

body.light-mode .modal-content h2 {
    color: var(--text-main);
}

/* Pantry modal specific in light mode */

body.light-mode .pantry-modal-header h3 {
    color: var(--primary);
}

body.light-mode .pantry-modal-footer {
    border-color: var(--border-subtle);
}

/* Drop zone in light mode */

body.light-mode .drop-zone {
    border-color: var(--border-subtle);
}

body.light-mode .drop-zone.active {
    border-color: var(--primary);
    background: rgba(195, 0, 0, 0.08);
}

/* Table styling in light mode */

body.light-mode .data-table th {
    border-bottom-color: var(--border-subtle);
}

body.light-mode .data-table tr:hover {
    background: var(--bg-meta);
}

body.light-mode .data-table td {
    border-bottom-color: var(--border-subtle);
}

/* Badge colors in light mode */

body.light-mode .badge.green {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

body.light-mode .badge.red {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Range slider in light mode */

body.light-mode input[type=range]::-webkit-slider-runnable-track {
    background: var(--border-subtle);
}

body.light-mode input[type=range]:focus::-webkit-slider-runnable-track {
    background: var(--border-subtle);
}

/* Queue item in light mode */

body.light-mode .queue-item {
    background: var(--bg-input);
    border-color: var(--border-subtle);
}

body.light-mode .queue-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(195, 0, 0, 0.2);
}

/* Category styling in light mode */

body.light-mode .category-header {
    border-bottom-color: var(--border-subtle);
    color: var(--text-muted);
}

/* Recipe card in light mode */

body.light-mode .recipe-card {
    background: var(--);
    border-color: var(--border-subtle);
}

body.light-mode .recipe-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(195, 0, 0, 0.1);
}

/* Btn icon in light mode */

body.light-mode .btn-icon {
    color: var(--text-main);
}

body.light-mode .btn-icon:hover {
    background: var(--bg-card-hover);
}

/* Light mode breadcrumb styling */

body.light-mode .breadcrumb-link {
    color: var(--text-muted);
}

body.light-mode .breadcrumb-link:hover {
    color: var(--primary);
    background: rgba(195, 0, 0, 0.08);
}

body.light-mode .breadcrumb-separator {
    color: var(--text-muted);
}

body.light-mode .breadcrumb-text {
    color: var(--text-main);
}

body.light-mode .breadcrumb-item.active .breadcrumb-text {
    color: var(--primary);
}

body.light-mode .portion-margin {
    color: var(--text-main);
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0% {
        filter: drop-shadow(0 0 12px rgb(59, 130, 246));
    }

    50% {
        filter: drop-shadow(0 0 24px rgba(59, 130, 246));
    }

    100% {
        filter: drop-shadow(0 0 12px rgba(59, 130, 246));
    }
}

@keyframes pantryFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes pantrySlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}




/* ============================================================
   PRINT STYLES
   ============================================================ */


@media print {

    .me-sidebar-tabs,
    .me-top-bar,
    .me-toggle-sidebar-btn,
    .review-filters,
    .btn,
    .nav-item {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .glass-panel {
        border: none !important;
        background: white !important;
        color: black !important;
    }
}

/* ============================================================
   MENU ENGINEER STYLES
   ============================================================ */

/*PRINT STYLES
/* print.css - A4 kitchen make sheet */

@media print {
    :root {
        --primary: #c30000;
        --border-subtle: #27272a;
    }

    /* Base */
    html,
    body {
        background: #fff !important;
        color: #000 !important;
        font-family: 'Outfit', sans-serif;
        font-size: 11pt;
        line-height: 1.15;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        margin: 0;
        padding: 0;
    }

    /* Hide app chrome */
    .sidebar,
    .top-bar,
    nav,
    .no-print,
    button,
    .btn,
    .controls {
        display: none !important;
    }

    /* Container */
    .make-sheet {
        width: 100%;
        max-width: 210mm;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    header.make-sheet-header {
        padding-bottom: 6px;
        margin-bottom: 8px;
        border-bottom: 2px solid #000;
    }

    h1 {
        font-size: 18pt;
        font-weight: 800;
        margin: 0 0 6px 0;
        color: #000;
    }

    .meta {
        display: grid;
        grid-template-columns: 160px 1fr;
        gap: 12px;
        align-items: start;
        margin-bottom: 10px;
    }

    .meta img {
        width: 160px;
        height: 160px;
        object-fit: cover;
        border: 2px solid #000;
        display: block;
    }

    .meta .meta-list p {
        margin: 2px 0;
        font-size: 10pt;
    }

    /* Ingredients table */
    .ingredients-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 10px;
        font-size: 10pt;
    }

    .ingredients-table th,
    .ingredients-table td {
        border-bottom: 1px solid var(--border-subtle);
        padding: 6px;
        text-align: left;
        vertical-align: top;
    }

    .ingredients-table th {
        background: #f0f0f0;
        font-weight: 700;
    }

    /* Methods / steps */

    /* Keep logical blocks together */
    .ingredient-row,
    .method-step,
    .meta {
        page-break-inside: avoid;
    }

    /* Small utilities */
    .muted {
        color: #333;
        font-size: 9.5pt;
    }

    .small {
        font-size: 9pt;
    }

    /* Avoid printing backgrounds that printers may drop */
    * {
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Prevent orphan headings */
    h2 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    /* Footer (optional) */
    footer.make-sheet-footer {
        margin-top: 8px;
        font-size: 9pt;
        color: #333;
    }
}

/* Logout Menu */




/* ============================================================
   OTHER STYLES
   ============================================================ */


.app-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.app-loading-logo {
    margin-bottom: 2rem;
}

.app-loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.app-loading-bar-fill {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: var(--primary);
    animation: loadingBar 1.5s infinite ease-in-out;
}

.app-loading-text {
    margin-top: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
}


.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3.5rem;
}

.user-profile {
    margin-top: auto;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.user-profile:hover {
    background: rgba(30, 41, 59, 0.8);
}

.logout-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.logout-menu.show {
    display: block;
    animation: slideUpFade 0.2s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logout-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.logout-menu a:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

/* Sidebar Toggle Functionality */

.name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

.role {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

.version-tag {
    margin-top: 1rem;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.1em;
    opacity: 0.5;
    text-align: center;
    width: 100%;
}

/* Main Content */

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.spin {
    animation: spin 1s linear infinite;
}

.pulse-glow {
    animation: pulse-glow 1s ease-in-out infinite;
    color: #3b82f6 !important;
    /* Blue glow color */
}


.header-actions button {
    margin: 0;

}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Search & Filter Input */

.page-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0.75rem 0;
    line-height: 1.0rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

@media (max-width: 1200px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
}

.category-group {
    margin-bottom: 3rem;
}

.category-header {
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.category-tag {
    background: var(--primary-dim);
    color: var(--text-main);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}




.ing-qty {
    width: 70px !important;
}


.recipe-image {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--bg-card);
    flex-shrink: 0;
}


.drop-zone {
    border: 2px dashed var(--border-subtle);
    border-radius: 20px;
    padding: 4rem 2rem;
    transition: all 0.2s;
}

.drop-zone.active {
    border-color: var(--primary);
    background: var(--primary-dim);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(251, 191, 36, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}



.upload-queue {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.queue-item {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 12px;
    border: 2px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.queue-item.active {
    border: 3px solid var(--primary);
    box-shadow: 0 0 20px var(--primary-dim);
}

.me-branding-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.me-branding-tab {
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.me-branding-tab:hover {
    color: var(--text-main);
    background: var(--bg-input);
}

.me-branding-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(195, 0, 0, 0.05);
}

.me-branding-group {
    background: var(--bg-meta);
    border: 2px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.me-preset-card {
    border: 2px solid var(--border-subtle);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-meta);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    text-align: center;
}

.me-preset-card:hover {
    border-color: var(--primary);
    background: rgba(195, 0, 0, 0.05);
    transform: translateY(-2px);
}

.me-preset-card.active {
    border-color: var(--primary);
    background: var(--primary-dim);
    color: white;
}

.me-preset-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-input);
}

/* Custom range slider styling */

.header-top {
    display: flex;
    justify-content: flex-start;
    /* align items to the left */
    align-items: flex-start;
    /* keeps everything aligned at the top */
    gap: 1.5rem;
}

.header-left {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex: 1;
    /* allows left section to take up remaining space */
    position: relative;
    /* needed for the camera icon overlay */
}


.header-actions button {
    width: 160px;
    /* consistent width for both buttons */
}

/* Compact header variant (two-column: image | title + meta) */

.recipe-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.recipe-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
}

.header-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.header-meta>div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}


.header-bottom>div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ingredients-section,
.methods-section,
.plating-section {
    background: var(--bg-card);
    border-radius: 36px;
    padding: 1.5rem;
}

.ingredients-section>h2,
.methods-section>h2,
.plating-section>h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.ingredients-container,
.methods-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.empty-message {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* Ingredient Row */

.ingredient-row {
    background: var(--bg-input);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.2s;
}

.ingredient-row:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.ingredient-main {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.ingredient-secondary {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.allergen-display {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.no-allergens {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.ingredient-notes {
    width: 100%;
}

.method-row {
    border-radius: 8px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    transition: all 0.2s;
}

.method-row:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.method-number {
    background: var(--primary);
    color: var(--bg-dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.method-text {
    flex: 1;
    min-height: 80px;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 24px;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    resize: vertical;
}

.method-text:focus {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    outline: none;
}

.plating-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.plating-image {
    width: 100%;
    max-height: 250px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s;
}

.plating-image:hover {
    border-color: var(--primary);
}

.metrics-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 2px solid var(--border-subtle);
    border-radius: 8px;
}

.metrics-section h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.875rem;
}

.metric.highlight {
    background: rgba(59, 130, 246, 0.05);
    padding: 0.5rem;
    border-radius: 4px;
    margin: 0.25rem -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.metric-value {
    color: var(--text-main);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.health-status {
    background: rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(59, 130, 246, 0.3);
    margin-top: 1rem;
}

.status-indicator {
    text-align: center;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

/* Pantry Sidebar */

@media (max-width: 1400px) {
    .recipe-editor-layout {
        grid-template-columns: 1fr 300px;
    }

    .editor-header,
    .editor-main {
        grid-column: 1;
    }

    .economic-sidebar,
    .pantry-sidebar {
        grid-column: 2;
        grid-row: auto;
    }

    .pantry-sidebar {
        display: none;
    }

    .pantry-sidebar.visible {
        display: flex;
    }
}

@media (max-width: 768px) {
    .recipe-editor-layout {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .editor-header {
        grid-column: 1;
    }

    .editor-main {
        grid-column: 1;
    }

    .economic-sidebar,
    .pantry-sidebar {
        grid-column: 1;
        position: relative;
        max-height: none;
    }

    .header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .header-right-top,
    .editor-header.compact-header .header-right-top {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    /* Hide sidebar on mobile */
    .sidebar {
        display: none;
    }

    .top-bar {
        left: 0;
    }

    .main-content {
        padding: 100px 1rem 2rem 1rem;
    }

    .header-right-top .actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .editor-header.compact-header .header-meta-compact {
        flex-direction: column;
        align-items: stretch;
    }

    .editor-header.compact-header .meta-dropdowns,
    .editor-header.compact-header .meta-numbers {
        flex: 1 1 auto;
        width: 100%;
    }

    .ingredient-main {
        flex-direction: column;
        gap: 0.5rem;
    }

    .qty-input,
    .unit-select,
    .ingredient-name-input,
    .brand-input,
    .cost-input {
        width: 100%;
    }

    .ingredient-secondary {
        width: 100%;
        gap: 0.5rem;
    }

    .btn-pantry-link,
    .btn-pantry-unlink,
    .btn-remove-ingredient {
        flex: 1;
        min-width: 100px;
    }

    /* Menu Engineer responsive */
    .me-top-bar {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    .me-top-title-row {
        flex-wrap: wrap;
    }

    .me-top-buttons-row {
        justify-content: flex-start;
        gap: 0.25rem;
    }

    .me-top-buttons-row .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .me-top-buttons-row .btn span {
        display: none;
        /* Hide button text on small screens */
    }

    .me-editor-workspace {
        min-width: 300px;
    }
}

/* Select options */

.me-top-left,
.me-top-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.me-economics-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--bg-meta);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    border: 2px solid var(--border-subtle);
}

.me-eco-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.me-eco-value {
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

/* Main Editor Area */

.me-main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.menu-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.menu-card {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-subtle);
}

.menu-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(195, 0, 0, 0.15);
}

/* Header Layout Styles */
.new-header-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.header-left-pane {
    flex-shrink: 0;
}

.header-right-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header-right-top {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.header-right-top .actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.header-meta-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meta-dropdowns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    order: 2;
}

.meta-dropdowns .form-group {
    flex: 0 1 auto;
    min-width: 180px;
}

.meta-numbers {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    order: 1;
}

.meta-numbers .form-group {
    flex: 0 1 auto;
    min-width: 120px;
}

/* Existing utility updates */
/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */

.admin-modal-overlay {
    display: none;
}

.admin-modal-overlay.active {
    display: flex;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.admin-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

.admin-header {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}

.admin-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.admin-header p {
    color: var(--text-muted);
}

.header-main h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
}

.subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.4rem 0.4rem 0.5rem;
    border-radius: 36px;
    background: rgba(0, 0, 0, 0.2);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.2s;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn i {
    width: 16px;
    height: 16px;
}

.tab-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--primary);
    background: rgba(195, 0, 0, 0.1);
}

.tab-panel {
    display: none;
    padding: 2rem;
    flex: 1;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.admin-stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    flex: 1;
    min-width: 200px;
    box-shadow: var(--shadow-main);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

.stat-icon i {
    width: 24px;
    height: 24px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.admin-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.admin-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-main);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-badge.status-approved {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-badge.status-denied {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-badge.status-suspended {
    background: rgba(105, 105, 105, 0.1);
    color: #696969;
}

.action-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.5rem;
}

.approve-btn {
    background: var(--success);
    color: white;
}

.deny-btn {
    background: var(--danger);
    color: white;
}

.suspend-btn {
    background: #696969;
    color: white;
}

.action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.admin-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.cancel-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
}

.submit-btn {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
}

/* ============================================================
   STOCK MANAGEMENT & PANTRY INTEGRATION
   ============================================================ */

.pantry-view-container {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-xxl);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    background: var(--bg-card-hover);
}

.stat-card.alert {
    border-left: 4px solid var(--danger);
}

.stat-card.warning {
    border-left: 4px solid var(--warning);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-input);
    color: var(--primary);
    border-radius: 12px;
}

.stat-icon i {
    width: 22px;
    height: 22px;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

/* Stock Sidebar */
.stock-sidebar {
    background: transparent;
    border-top: 3px var(--primary);
}

.stock-sidebar .glass-panel {
    background: var(--bg-card2);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: none;
}

.upload-dropzone {
    transition: all 0.2s ease;
    border: 2px dashed var(--border-subtle) !important;
}

.upload-dropzone:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--primary) !important;
}

.alert-item {
    transition: all 0.2s;
    cursor: pointer;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    transform: translateX(4px);
}

.tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--bg-input);
    border-radius: 8px;
}

.tabs .btn {
    flex: 1;
    font-size: 0.7rem;
    padding: 0.4rem 0.2rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
}

.tabs .btn.active {
    background: var(--primary);
    color: white;
}

.tx-item {
    transition: background 0.2s;
    border-radius: 6px;
}

.tx-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.btn-icon-sm {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-main);
    cursor: pointer;
    font-weight: bold;
}

.btn-icon-sm:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.font-mono {
    font-family: 'Inter', monospace;
}


.pulse-loading {
    color: var(--text-muted) !important;
    animation: pulseText 1.5s infinite ease-in-out;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 1.5rem;
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.alerts-list,
.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    transition: all 0.2s;
}

.alert-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-dim);
}

.alert-item.reorder {
    border-left: 4px solid var(--danger);
}

.alert-item.bottom {
    border-bottom: 4px solid var(--danger);
}

.alert-item.expiring {
    border-left: 4px solid var(--warning);
}

.alert-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.alert-info .item-name {
    font-weight: 600;
    color: var(--text-main);
}

.alert-info .alert-msg {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    text-align: center;
    gap: 1rem;
}

.empty-state i {
    width: 48px;
    height: 48px;
    opacity: 0.2;
}

/* Stock Transaction Modal Styles */
.stock-modal-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 12px;
}

.tab-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.stock-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selected-item-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}

.selected-item-display .item-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.selected-item-display .item-stock {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-input {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    width: 100%;
}

.input-with-unit {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-unit .unit-label {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

/* Stock Take View */
.take-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 5rem;
}

.take-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
}

.take-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.take-item-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.take-item-brand {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.take-item-current {
    font-size: 0.85rem;
    color: var(--primary-dim);
    margin-top: 0.25rem;
}

.take-item-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.count-input {
    width: 100px;
    padding: 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-main);
}

.btn-step {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-step:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.item-unit {
    width: 40px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.take-footer {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    left: 280px;
    /* Sidebar offset */
    background: rgba(10, 10, 12, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: all 0.3s;
}

.app-container.collapsed .take-footer {
    left: 100px;
}

@media (max-width: 768px) {
    .take-footer {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .take-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .take-item-input {
        width: 100%;
        justify-content: space-between;
    }
}

/* Sidebar Sub-Navigation */
.nav-item-sub {
    padding-left: 2.5rem !important;
    font-size: 0.9em;
}

/* Utility Classes to reduce inline styles */
.app-logo-svg {
    height: 48px;
    width: auto;
    fill: var(--primary);
}

.app-logo-svg path {
    fill: inherit;
}

.app-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 24.14px;
    font-weight: 800;
    fill: inherit;
}

.sidebar-logo-svg {
    height: 64px;
    width: auto;
    fill: var(--primary);
}

.sidebar-logo-svg path {
    fill: inherit;
}

.hidden {
    display: none !important;
}

.top-bar-logo-container {
    display: none;
    margin-left: 0.75rem;
}


/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}

.sidebar-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-footer a:hover {
    color: var(--primary);
}

.sidebar-footer .separator {
    opacity: 0.3;
}

/* Legal Content */
.legal-content h1,
.legal-content h3 {
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.legal-content p,
.legal-content li {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.legal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
}

/* Login Mode (Guest Legal Views) */
.app-container.login-mode .sidebar {
    display: none !important;
}

.app-container.login-mode .top-bar {
    display: none !important;
}

.app-container.login-mode .main-content {
    margin-left: 0 !important;
    padding-top: 2rem !important;
    max-width: 1000px;
    margin: 0 auto;
}