/* Chef Dish App - Wells & Co Branded Responsive CSS */

:root {
    /* Wells & Co Brand Colors */
    --primary-core: #095470;
    --primary-teal: #90baac;
    --primary-green: #298d7d;
    --supporting-dark: #0f2f40;
    --supporting-light: #f1f2f0;
    --supporting-coral: #cf7e5e;
    --accent-red: #ea5842;
    --accent-yellow: #ebc340;
    --accent-bronze: #c3a16b;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--supporting-dark);
    background-color: var(--supporting-light);
}

/* Container and layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-core) 0%, var(--primary-green) 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(9, 84, 112, 0.2);
}

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

/* Header right-side cluster: theme toggle + meta text */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-actions small {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
}

/* Theme toggle button */
.theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.1rem;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Language switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-btn--active {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
}

.auth-user__name {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-login-btn {
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.auth-login-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.25);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo img {
    height: 70px;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white */
}

.header-text {
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Search section */
.search-section {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid #e9ecef;
}

.search-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-core);
    box-shadow: 0 0 0 3px rgba(9, 84, 112, 0.15);
}

.search-btn {
    background: var(--primary-core);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(9, 84, 112, 0.2);
}

.search-btn:hover {
    background: var(--primary-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(9, 84, 112, 0.3);
}

/* Main content */
main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

/* Loading and error states */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.error-message {
    background: rgba(234, 88, 66, 0.1);
    color: var(--supporting-dark);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--accent-red);
}

.success-message {
    background: rgba(41, 141, 125, 0.1);
    color: var(--supporting-dark);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-green);
}

/* Dish grid */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Dish cards */
.dish-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(9, 84, 112, 0.1);
    border: 1px solid rgba(144, 186, 172, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dish-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(9, 84, 112, 0.2);
    border-color: var(--primary-teal);
}

.dish-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

.dish-content {
    padding: 20px;
}

.dish-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-core);
}

.dish-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.dish-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #888;
}

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

.chef-info {
    background: var(--supporting-light);
    padding: 15px;
    border-top: 1px solid var(--primary-teal);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chef-name {
    font-weight: 600;
    color: var(--primary-core);
}

/* Categories and tags */
.category-tag {
    background: rgba(144, 186, 172, 0.2);
    color: var(--primary-core);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--primary-teal);
}

/* Nutrition info */
.nutrition-info {
    margin-top: 15px;
    padding: 15px;
    background: var(--supporting-light);
    border-radius: 8px;
    border: 1px solid rgba(144, 186, 172, 0.3);
}

.nutrition-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-core);
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.nutrition-item {
    text-align: center;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.nutrition-value {
    font-weight: 600;
    color: var(--primary-green);
}

.nutrition-label {
    font-size: 0.8rem;
    color: var(--supporting-dark);
    opacity: 0.8;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    background: white;
    border: 2px solid var(--primary-teal);
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--primary-core);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: var(--primary-core);
    color: var(--primary-green);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-core);
    border-color: var(--primary-core);
    color: white;
    box-shadow: 0 2px 8px rgba(9, 84, 112, 0.3);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--supporting-dark), var(--primary-core));
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
    box-shadow: 0 -2px 10px rgba(9, 84, 112, 0.1);
}

/* Responsive breakpoints */

/* Tablet styles */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .header-content {
        text-align: center;
        flex-direction: column;
        gap: 15px;
    }
    
    .header-logo {
        justify-content: center;
    }
    
    .header-logo img {
        height: 55px;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: unset;
    }
    
    .dishes-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .dish-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .search-section {
        padding: 20px 0;
    }
    
    main {
        padding: 20px 0;
    }
    
    .dishes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dish-content {
        padding: 15px;
    }
    
    .dish-title {
        font-size: 1.2rem;
    }
    
    .chef-info {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

/* Print styles */
@media print {
    header, .search-section, footer {
        display: none;
    }
    
    .dish-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Dark mode support - Wells & Co branded */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--supporting-dark);
        color: var(--supporting-light);
    }
    
    .dish-card {
        background: #1a2a35;
        border: 1px solid var(--primary-teal);
    }
    
    .search-section {
        background: #1a2a35;
        border-color: var(--primary-teal);
    }
    
    .search-input {
        background: #2a3a45;
        border-color: var(--primary-teal);
        color: var(--supporting-light);
    }
    
    .nutrition-info {
        background: #3d3d3d;
    }
}


/* ========================================================
   DISH DETAIL PAGE (dish.php)
   ======================================================== */

/* Main page container */
.dish-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Back navigation link */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-core);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--primary-core);
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    background: var(--primary-core);
    color: white;
}

/* Image gallery section */
.image-gallery {
    background: white;
    border: 1px solid var(--primary-teal);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(9, 84, 112, 0.08);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.image-item,
.uploaded-image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 4 / 3;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.gallery-image:hover {
    transform: scale(1.03);
}

/* Video placeholder */
.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--supporting-dark) 0%, var(--primary-core) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.video-placeholder:hover {
    opacity: 0.85;
}

.video-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.video-text {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    padding: 0 8px;
}

/* Delete button on image tiles */
.delete-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--accent-red);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    transition: background 0.2s ease;
}

.delete-btn:hover {
    background: #c0392b;
}

/* Fullscreen image / video modal */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

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

.close-btn {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close-btn:hover {
    opacity: 1;
}

.modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-image {
    max-width: 90vw;
    max-height: 75vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-btn {
    background: var(--primary-core);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-btn:hover {
    background: var(--primary-green);
}

.image-counter {
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Collapsible info sections */
.collapsible-section {
    background: white;
    border: 1px solid var(--primary-teal);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(9, 84, 112, 0.08);
}

/* Dish info detail cards grid */
.dish-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.detail-card {
    background: var(--supporting-light);
    border: 1px solid var(--primary-teal);
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
}

.detail-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 6px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--supporting-dark);
}

/* Dish page responsive */
@media (max-width: 768px) {
    .dish-detail-container {
        padding: 20px 16px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .dish-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dish-details-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ========================================================
   REUSABLE LAYOUT CLASSES
   Replace inline styles in views for dark-mode compatibility.
   ======================================================== */

/* Search box wrappers (home.php) */
.search-box {
    margin-bottom: 25px;
    background: #f1f2f0;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #90baac;
}

/* Collapsible expanded content panels (dish-detail.php) */
.collapsible-body {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    line-height: 1.6;
}

/* Sub-recipe nested collapsible is smaller */
.collapsible-body-sm {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 0 0 6px 6px;
    margin-top: 5px;
    line-height: 1.6;
}

/* White item cards inside collapsibles */
.content-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
}

/* Sub-recipe stat mini-tiles */
.sub-stat-tile {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

/* Upload section wrapper */
.upload-section {
    background: linear-gradient(145deg, #f1f2f0, #ffffff);
    border: 2px solid #90baac;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(144, 186, 172, 0.1);
}

/* Menu tab navigation (home page) */
.menu-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.menu-tab {
    padding: 10px 22px;
    border: 2px solid #90baac;
    border-radius: 25px;
    background: white;
    color: #095470;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.menu-tab:hover {
    background: #90baac;
    color: white;
    border-color: #90baac;
}

.menu-tab.active {
    background: #095470;
    color: white;
    border-color: #095470;
}


/* ========================================================
   DARK MODE  — [data-theme="dark"]
   Applied by theme.js from localStorage preference.
   Overrides the prefers-color-scheme block above so the
   user-controlled toggle always wins.
   Phase 6 will expand these rules and move inline colours
   into CSS variables.
   ======================================================== */

[data-theme="dark"] {
    --bg-body:   #0d1f2a;
    --bg-card:   #132330;
    --bg-input:  #1a2e3b;
    --bg-section: #0f2030;
    --text-main:  #dde8ef;
    --text-muted: #8aacba;
    --border:     #2a4a5a;
}

[data-theme="dark"] body {
    background-color: var(--bg-body);
    color: var(--text-main);
}

[data-theme="dark"] main {
    background-color: var(--bg-body);
}

/* Header — keep the brand gradient, just darken it slightly */
[data-theme="dark"] header {
    background: linear-gradient(135deg, #062e3e 0%, #1a5e54 100%);
}

/* Footer */
[data-theme="dark"] footer {
    background: linear-gradient(135deg, #062e3e 0%, #1a5e54 100%);
}

/* Search / nav bar */
[data-theme="dark"] .search-section {
    background: var(--bg-section);
    border-color: var(--border);
}

/* Cards */
[data-theme="dark"] .dish-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
}

[data-theme="dark"] .dish-card:hover {
    border-color: var(--primary-teal);
}

[data-theme="dark"] .dish-title {
    color: #c8dde7;
}

[data-theme="dark"] .dish-description {
    color: var(--text-muted);
}

/* Search inputs */
[data-theme="dark"] .search-input {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="dark"] .search-input::placeholder {
    color: var(--text-muted);
}

/* Nutrition / modifier info box */
[data-theme="dark"] .nutrition-info {
    background: var(--bg-section);
    border-color: var(--border);
}

/* Inline search boxes on home page (no CSS class — target by context) */
[data-theme="dark"] input[type="text"] {
    background: var(--bg-input) !important;
    border-color: var(--border) !important;
    color: var(--text-main) !important;
}

/* Dish detail page */
[data-theme="dark"] .dish-detail-container {
    background: var(--bg-body);
}

[data-theme="dark"] .image-gallery {
    background: var(--bg-card);
    border-color: var(--border);
}

[data-theme="dark"] .collapsible-section {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="dark"] .collapsible-section h2 {
    color: #c8dde7 !important;
}

[data-theme="dark"] .detail-card {
    background: var(--bg-section);
    border-color: var(--border);
}

[data-theme="dark"] .detail-value {
    color: var(--text-main);
}

/* Category tags */
[data-theme="dark"] .category-tag {
    background: rgba(144, 186, 172, 0.12);
    color: var(--text-muted);
    border-color: var(--border);
}

/* Back button */
[data-theme="dark"] .back-button {
    background: var(--bg-card);
    border-color: var(--primary-teal);
    color: var(--primary-teal);
}

[data-theme="dark"] .back-button:hover {
    background: var(--primary-green);
    color: white;
}

/* Error / success messages */
[data-theme="dark"] .error-message {
    background: #3a1010;
    border-color: #6b2222;
    color: #f4a4a4;
}

[data-theme="dark"] .success-message {
    background: #0d2e1f;
    border-color: #1d5c3a;
    color: #72c99e;
}

/* Pagination */
[data-theme="dark"] .pagination-btn {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-main);
}

[data-theme="dark"] .pagination-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
}

/* --- Search box wrappers (home.php) --- */
[data-theme="dark"] .search-box {
    background: var(--bg-section);
    border-color: var(--border);
}

/* --- Collapsible expanded panels (dish-detail.php) --- */
[data-theme="dark"] .collapsible-body,
[data-theme="dark"] .collapsible-body-sm {
    background: var(--bg-section);
    color: var(--text-main);
}

[data-theme="dark"] .collapsible-body h3,
[data-theme="dark"] .collapsible-body h4,
[data-theme="dark"] .collapsible-body-sm h4,
[data-theme="dark"] .collapsible-body-sm h5 {
    color: #c8dde7 !important;
}

/* --- White content cards inside collapsibles --- */
[data-theme="dark"] .content-card {
    background: var(--bg-input);
    color: var(--text-main);
}

[data-theme="dark"] .content-card h3,
[data-theme="dark"] .content-card h4 {
    color: #c8dde7 !important;
}

[data-theme="dark"] .content-card div[style*="color: #666"],
[data-theme="dark"] .content-card div[style*="color: #333"],
[data-theme="dark"] .collapsible-body div[style*="color: #333"],
[data-theme="dark"] .collapsible-body div[style*="color: #666"] {
    color: var(--text-muted) !important;
}

/* --- Sub-recipe stat tiles --- */
[data-theme="dark"] .sub-stat-tile {
    background: var(--bg-section);
    color: var(--text-main);
}

[data-theme="dark"] .sub-stat-tile div[style*="color: #666"] {
    color: var(--text-muted) !important;
}

/* --- Upload section --- */
[data-theme="dark"] .upload-section {
    background: linear-gradient(145deg, var(--bg-section), var(--bg-card));
    border-color: var(--border);
}

/* --- Breadcrumb nav and page-level headings with inline colours --- */
[data-theme="dark"] .dish-detail-container nav[style] {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .dish-detail-container nav span[style*="color: #333"] {
    color: var(--text-main) !important;
}

[data-theme="dark"] .image-gallery h2[style] {
    color: #c8dde7 !important;
}

/* --- File input (upload) dark mode --- */
[data-theme="dark"] input[type="file"] {
    background: var(--bg-input) !important;
    color: var(--text-main) !important;
    border-color: var(--border) !important;
}

/* --- Menu tabs --- */
[data-theme="dark"] .menu-tab {
    background: var(--bg-card);
    color: var(--text-muted);
    border-color: var(--border);
}

[data-theme="dark"] .menu-tab:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

[data-theme="dark"] .menu-tab.active {
    background: #0b6a8a;
    color: white;
    border-color: #0b6a8a;
}

/* --- Any element with inline color: #095470 (dark teal → too dark on dark bg) --- */
[data-theme="dark"] [style*="color: #095470"] {
    color: var(--text-muted) !important;
}

/* --- Search-box label / small text --- */
[data-theme="dark"] .search-box label,
[data-theme="dark"] .search-box small {
    color: var(--text-muted) !important;
}