:root {
    --primary-saffron: #FF9933;
    --text-slate: #2C3E50;
    --bg-creme: #FDFEFE;
}

html, body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-creme);
    color: var(--text-slate);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

*, *::before, *::after {
    box-sizing: border-box;
}

header {
    padding: 20px;
    border-bottom: 2px solid var(--primary-saffron);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    flex: 1 1 100%; /* Allows it to take up the full width */
    min-width: 250px; /* Forces search to the next line on thin phones */
}
.logo {
    max-width: 150px; 
    height: auto;
}

/* Mobile App Zoom Prevention */
input, textarea, button, select {
    font-size: 16px !important; 
}

/* ==========================================
   1. MAIN GENERATOR & FORMS
   ========================================== */
.generator-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

#recipe-input {
    width: 100%;
    padding: 15px;
    margin: 20px 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box; 
    font-family: inherit;
}

#recipe-input:focus { border-color: var(--primary-saffron); outline: none; }

.saffron-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-saffron);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}
.saffron-btn:active { transform: scale(0.98); }

.secondary-btn {
    padding: 15px;
    background-color: var(--bg-creme);
    color: var(--text-slate);
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}
.secondary-btn:hover { border-color: var(--primary-saffron); color: var(--primary-saffron); }

.button-group { display: flex; gap: 10px; margin-top: 15px; width: 100%; }
.button-group button { flex: 1; margin: 0; }

#modal-close-btn {
    background-color: var(--primary-saffron) !important;
    color: white !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    margin: 20px auto 0 auto !important; 
    min-width: 120px !important;
}

#modal-close-btn:hover {
    opacity: 0.9;
}

.input-field {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
}
.input-field:focus { border-color: var(--primary-saffron); outline: none; }

/* ==========================================
   2. APP HEADER & SIDEBAR NAVIGATION
   ========================================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-bottom: 2px solid var(--primary-saffron);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    flex-wrap: wrap; 
    gap: 15px;
}

.header-left, .header-right { display: flex; align-items: center; gap: 15px; }
.app-header .logo { max-height: 40px; width: auto; }

.icon-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-slate);
    transition: color 0.3s;
    padding: 5px;
}
.icon-btn:hover { color: var(--primary-saffron); }

#menu-btn {
    font-size: 34px; 
    padding: 10px 15px 10px 5px; 
    font-weight: bold;
}

.search-container {
    display: flex; align-items: center; background: var(--bg-creme);
    border: 1px solid #ddd; border-radius: 20px; padding: 5px 12px; position: relative; width: 100%; left: 0 !important; right: 0 !important;
}

.search-box {
    border: none; background: transparent; outline: none;
    padding: 4px; width: 200px; font-family: inherit; font-size: 16px; width: 100%;
}

@media (max-width: 600px) {
    .search-box { width: 140px !important; } 
    .app-header .logo { max-height: 30px; }
}

.search-dropdown {
    position: absolute; top: 120%; left: 0; width: 250px;
    background: white; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 300px; overflow-y: auto; display: none; z-index: 200; border: 1px solid #eee; width: 100% !important; left: 0 !important; right: 0 !important;
}

.search-result-item {
    padding: 12px 15px; border-bottom: 1px solid #f5f5f5; cursor: pointer;
    font-size: 14px; color: var(--text-slate); transition: background 0.2s, color 0.2s; text-align: center !important;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-creme); color: var(--primary-saffron); font-weight: 500; }

.sidebar {
    position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
    background: white; box-shadow: 2px 0 15px rgba(0,0,0,0.15); z-index: 1000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column;
}
.sidebar.open { left: 0; }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid #eee; background: var(--bg-creme);
}
.sidebar-header h2 { margin: 0; font-size: 18px; color: var(--text-slate); }

.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li a {
    display: block; padding: 20px 24px; text-decoration: none; color: var(--text-slate);
    border-bottom: 1px solid #f5f5f5; font-weight: 600; font-size: 18px; transition: background 0.2s, padding-left 0.2s, color 0.2s;
}
.sidebar-menu li a:hover { background: var(--bg-creme); color: var(--primary-saffron); padding-left: 32px; }

.overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 999; visibility: hidden; opacity: 0; transition: opacity 0.3s, visibility 0.3s;
}
.overlay.visible { visibility: visible; opacity: 1; }

/* Windows 11 Style Expandable Header Search */
.expandable-search {
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 34px; /* Exact size of the icon initially */
    height: 34px;
    position: relative;
    overflow: visible; /* Allows dropdown to escape */
}
.expandable-search.active {
    background: #f0f2f5; /* Light gray pill background when open */
    width: 200px; /* Stretches to full size */
    box-shadow: inset 0 0 0 1px #e0e0e0;
}
.expandable-input {
    width: 0;
    opacity: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    font-size: 15px;
    color: var(--text-slate);
    transition: all 0.3s ease;
    pointer-events: none;
}
.expandable-search.active .expandable-input {
    width: 100%;
    opacity: 1;
    padding: 0 10px 0 5px;
    pointer-events: auto;
}
#search-toggle-btn { z-index: 2; margin: 0; }

/* Profile Card Pop Animation */
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes popDown {
    0% { opacity: 0; transform: translateY(-30px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

#header-search-container #search-results {
    position: absolute !important;
    top: 45px !important; /* Drops right below the pill */
    right: 0 !important; /* Aligns to the right side */
    left: auto !important;
    min-width: 280px !important;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #eee;
    z-index: 2000;
}

/* ==========================================
   3. LUMIA TILES & DIETARY CHIPS
   ========================================== */
.category-tiles-container {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 25px;
}

.lumia-tile {
    padding: 15px 10px; color: white; font-weight: 600; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px; min-height: 100px;        
    border-radius: 8px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.1s ease, filter 0.2s ease; letter-spacing: 0.5px;
}
.lumia-tile:active { transform: scale(0.96); }
.lumia-tile:hover { filter: brightness(1.08); }

.tile-icon { font-size: 36px; line-height: 1; }
.tile-text { font-size: 15px; text-align: center; }

.tile-veg { background-color: #339933; }      
.tile-nonveg { background-color: #E51400; }   
.tile-vegan { background-color: #00ABA9; }    
.tile-egg { background-color: #2980b9; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.chip-input { display: none; }
.chip-label {
    padding: 6px 12px; background: var(--bg-creme); border: 1px solid #ddd;
    border-radius: 20px; font-size: 13px; color: var(--text-slate); cursor: pointer;
    transition: all 0.2s ease; user-select: none;
}
.chip-input:checked + .chip-label {
    background: var(--primary-saffron); color: white; border-color: var(--primary-saffron); font-weight: 600;
}

.dietary-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.dietary-badge {
    background: #fff8eb; color: var(--primary-saffron); border: 1px solid var(--primary-saffron);
    padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: bold;
}
.dietary-badge:empty { display: none !important; }

/* ==========================================
   4. MANUAL BUILDER (FLASHCARDS & DRAG)
   ========================================== */
.flashcard {
    background: white; border-radius: 12px; padding: 20px; margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #eee; text-align: left;
}
.flashcard h3 { margin-top: 0; color: var(--primary-saffron); border-bottom: 2px solid #f5f5f5; padding-bottom: 10px; }
.micro-text { font-size: 12px; color: #888; margin-top: -10px; margin-bottom: 10px; }

.input-with-btn { display: flex; gap: 10px; align-items: flex-start; }
.plus-btn { width: 50px; height: 46px; padding: 0; font-size: 24px; display: flex; align-items: center; justify-content: center; }
.autocomplete-wrapper { position: relative; width: 100%; }
#ing-autocomplete-list { top: 50px; width: calc(100% - 60px); }

.dynamic-list { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }

.ing-row {
    display: flex; gap: 8px; align-items: center; background: var(--bg-creme);
    padding: 8px; border-radius: 8px; border: 1px solid #e0e0e0; animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.ing-name { flex: 2; font-weight: 500; font-size: 14px; }
.ing-qty { flex: 1; min-width: 60px; padding: 6px; border: 1px solid #ccc; border-radius: 4px; }
.ing-unit { flex: 1; min-width: 80px; padding: 6px; border: 1px solid #ccc; border-radius: 4px; background: white; }

.delete-row-btn { background: none; border: none; color: #e74c3c; font-size: 18px; cursor: pointer; }

.dynamic-step-item {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
    background: transparent; padding: 0; border: none;
}
.step-number { font-weight: bold; color: var(--primary-saffron); min-width: 55px; text-align: right; font-size: 14px; }
.step-content-box {
    flex: 1; background: var(--bg-creme); padding: 10px 12px; border-radius: 8px;
    border: 1px solid #e0e0e0; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.drag-handle { color: #aaa; font-size: 24px; cursor: grab; padding-right: 8px; user-select: none; touch-action: none; }
.sortable-ghost { opacity: 0.4; background-color: #fff8eb; }

[contenteditable="true"] { background-color: #fff8eb; border-radius: 4px; padding: 2px 5px; outline: 1px dashed var(--primary-saffron); }

/* ==========================================
   5. PREVIEW CARD (WHITE MODE)
   ========================================== */
.recipe-card {
    background: white; border-radius: 12px; padding: 25px; margin: 20px auto;
    max-width: 800px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-top: 5px solid var(--primary-saffron);
}
.card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }

.action-buttons { display: flex; gap: 10px; }
.action-btn { background: white; border: 1px solid #ddd; padding: 8px 15px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: bold; color: var(--text-slate); transition: all 0.2s; }
.action-btn:hover { border-color: var(--primary-saffron); color: var(--primary-saffron); }
.save-btn { background-color: #2980b9; color: white; border-color: #2980b9; }
.save-btn:hover { background-color: #3498db; border-color: #3498db; color: white; }

.recipe-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; margin-top: 20px; }
@media (max-width: 600px) { .recipe-grid { grid-template-columns: 1fr; } }

.checklist, .steplist { list-style-type: none; padding: 0; }
.checklist li { padding: 10px 0; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checklist input[type="checkbox"] { accent-color: var(--primary-saffron); width: 18px; height: 18px; }
.steplist li { padding: 15px; background: var(--bg-creme); margin-bottom: 10px; border-radius: 8px; border-left: 3px solid var(--primary-saffron); }


/* ==========================================
   6. PANORAMA COOK MODE (DARK KITCHEN)
   ========================================== */
.panorama-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #111; color: white; z-index: 10000; display: flex; flex-direction: column;
}

/* Glass Roof Header */
.panorama-header {
    display: flex; justify-content: space-between; padding: 20px;
    background: linear-gradient(to bottom, #111 70%, transparent); 
    position: absolute; top: 0; width: 100%; box-sizing: border-box; 
    z-index: 10001 !important; align-items: center;
}

.panorama-actions { display: flex; gap: 15px; }
.pano-action-btn {
    font-size: 32px !important; padding: 8px; margin-left: 8px;
    background: rgba(255, 255, 255, 0.05); border-radius: 50%; backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; color: white;
}
.pano-action-btn:active { transform: scale(0.9); background: rgba(255, 255, 255, 0.15); }
.favorited svg, .favorited svg path { fill: #E51400 !important; stroke: #E51400 !important; }

/* Swiping Container */
.panorama-container {
    display: flex; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; height: 100%;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; 
    cursor: grab; /* Desktop hint */
}
.panorama-container:active { cursor: grabbing; }
.panorama-container::-webkit-scrollbar { display: none; } 

/* Panel Content Layout */
.pano-panel {
    min-width: 100vw; height: 100%; box-sizing: border-box; scroll-snap-align: start;
    display: flex; flex-direction: column; justify-content: flex-start; overflow-y: auto; 
    padding: 130px 25px 150px !important; /* Forces top clear of header, bottom clear for scrolling */
}

.pano-title { font-size: 52px; font-weight: 300; line-height: 1.1; margin-top:0; margin-bottom: 10px; font-family: 'Segoe UI', sans-serif;}
.pano-header-title {
    position: absolute !important;
    left: 60px !important; 
    right: 105px !important;
    top: 50% !important;
    transform: translateY(-50%) !important; 
    width: auto !important;
    max-width: none !important;
    text-align: center;
    line-height: 1.2;
    font-weight: 600;
    color: white;
    margin: 0;
    padding: 0;
    opacity: 0; 
    transition: opacity 0.3s ease;
    pointer-events: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal !important;
}
.pano-header-title.visible { opacity: 1; }
.pano-time { font-size: 22px; color: #bbb; margin-bottom: 25px; }
.pano-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.panel-content-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 2px solid #333; padding-bottom: 10px; margin-bottom: 20px; }
.panel-content-header h2 { font-size: 36px; font-weight: 300; margin: 0; color: white; }
#panel-hero { align-items: flex-start !important; text-align: left !important; justify-content: center !important; padding-top: 0 !important; padding-bottom: 0 !important; }
#panel-hero #pano-badges { justify-content: flex-start !important;}

.swipe-indicator {
    margin-top: 40px; display: inline-flex; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.8); font-size: 18px; font-weight: 500; animation: swipePulse 2s infinite;
}
@keyframes swipePulse { 0% { transform: translateX(0); opacity: 0.5; } 50% { transform: translateX(10px); opacity: 1; } 100% { transform: translateX(0); opacity: 0.5; } }

/* Glossy Interactive Lists */
.pano-list { list-style: none; padding: 0; margin: 0; }
.interactive-list li {
    background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    padding: 20px 20px 20px 60px; margin-bottom: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer; transition: all 0.3s ease; position: relative; font-size: 20px; line-height: 1.4; user-select: none;
}
.interactive-list li:active { transform: scale(0.98); }

/* Circular Checkbox Override */
.interactive-list li::before {
    content: ''; position: absolute; left: 20px; top: 22px; width: 22px; height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%; transition: all 0.3s ease;
}
.interactive-list li.completed { opacity: 0.5; background: rgba(0,0,0,0.3); text-decoration: line-through; }
.interactive-list li.completed::before {
    background-color: #339933; border-color: #339933;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    background-size: 14px; background-repeat: no-repeat; background-position: center;
}

.action-pill {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.12); /* Subtle glass background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px; /* The perfect pill shape */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2px 6px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-pill .pano-action-btn {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    padding: 8px;
    margin: 0; /* Strip out the old margins */
    box-shadow: none !important;
}

.pill-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

/* ==========================================
   7. SMART TIMERS
   ========================================== */
.timer-container {
    display: flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 15px; width: 100%; max-width: 250px; box-sizing: border-box; cursor: default;
}
.timer-display { font-family: monospace; font-size: 20px; font-weight: bold; color: var(--primary-saffron); min-width: 50px; }
.timer-controls { display: flex; gap: 10px; margin-left: auto; }
.control-btn { background: none; border: none; font-size: 18px; cursor: pointer; padding: 2px 4px; transition: transform 0.1s; color: white;}
.control-btn:active { transform: scale(0.9); }


/* ==========================================
   8. MODALS & GROCERIES (HIGHEST Z-INDEX)
   ========================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7); z-index: 40000 !important; /* Top Layer */
    display: flex; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box;
}

.modal-content {
    width: 100%; max-width: 400px; box-shadow: 0 15px 35px rgba(0,0,0,0.8);
    animation: popIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(145deg, #222, #111) !important; color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important; border-radius: 16px !important;
    position: relative !important; padding: 30px 25px !important;
}

.grocery-trigger { font-size: 36px; animation: gentlePulse 2s infinite; }
@keyframes gentlePulse { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }

.grocery-checklist { max-height: 50vh; overflow-y: auto; margin-top: 10px; }
.grocery-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #333; font-size: 18px; }
.grocery-item input[type="checkbox"] { width: 24px; height: 24px; accent-color: #0078D7; }

/* --- Phase 8: Chef's Vault Styles --- */
.vault-header { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0; }
.chef-avatar { font-size: 40px; background: #fff8eb; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--primary-saffron); }

/* Vault, Grocery & CoBo Hub Seamless Search Pills */
.vault-controls { display: flex; gap: 10px; margin-bottom: 20px; align-items: center; flex-wrap: wrap; width: 100%; }
.vault-controls .search-container, #grocery-view .search-container, #community-view .search-container {
    flex: 1 1 100%; min-width: 200px; padding: 0 !important; border-radius: 30px !important;
    border: 2px solid #eee !important; background: white !important; overflow: hidden; display: flex; width: 100%;
}
#vault-local-search, #grocery-internal-search, #community-search {
    border: none !important; background: transparent !important; padding: 12px 20px !important;
    margin: 0 !important; box-shadow: none !important; width: 100% !important; text-align: left !important;
}
#vault-local-search::placeholder, #grocery-internal-search::placeholder, #community-search::placeholder { text-align: left !important; }

.view-toggles { display: flex; gap: 5px; background: #eee; padding: 4px; border-radius: 8px; }
.view-toggles .icon-btn { border-radius: 6px; padding: 6px; color: #888; }
.view-toggles .active-view { background: white; color: var(--primary-saffron); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Grid vs List Layout Engine - FIXED GAP */
.vault-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.vault-grid .vault-card { height: 100%; } /* Replaced the square aspect ratio so it fits text perfectly */
.vault-grid .vault-card > div:first-child { flex-direction: column !important; align-items: flex-start !important; height: 100% !important; }
.vault-grid .vault-card h4 { white-space: normal !important; display: -webkit-box !important; -webkit-line-clamp: 3 !important;  -webkit-box-orient: vertical !important; margin-bottom: auto !important; }
.vault-grid .action-pill { width: 100% !important; justify-content: space-between !important; margin-top: 15px !important; }
.vault-list { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* The Vault Recipe Card */
.vault-card { background: white; border-radius: 12px; border: 1px solid #eee; padding: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.vault-card:active { transform: scale(0.97); }
.vault-card h4 { margin: 0 0 5px 0; font-size: 16px; color: var(--text-slate); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vault-card-meta { font-size: 12px; color: #888; margin-bottom: 15px; }

/* Main Header Search Centered */
#vault-search { text-align: center !important; width: 100% !important; flex: 1; }
#vault-search::placeholder { text-align: center !important; }

/* Card Actions (Edit, Share, Delete) */
.card-actions { display: flex; justify-content: space-between; border-top: 1px solid #f5f5f5; padding-top: 10px; margin-top: auto; }
.card-action-btn { background: none; border: none; font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; color: #666; }
.card-action-btn:hover { background: #f0f0f0; color: var(--text-slate); }
.card-action-delete { color: #e74c3c; }
.card-action-delete:hover { background: #feebeb; }

/* --- Phase 9: Smart Groceries Accordion --- */
.grocery-group-card { background: white; border-radius: 12px; border: 1px solid #eee; margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); overflow: hidden; }
.grocery-group-header { padding: 15px; display: flex; justify-content: space-between; align-items: center; background: #fcfcfc; cursor: pointer; user-select: none; transition: background 0.2s; }
.grocery-group-header:active { background: #f0f0f0; }

.grocery-group-title { font-weight: 600; font-size: 16px; color: var(--text-slate); margin: 0; display: flex; align-items: center; gap: 8px; }
.grocery-item-count { background: var(--primary-saffron); color: white; font-size: 12px; padding: 2px 8px; border-radius: 12px; font-weight: bold; }
.toggle-icon { font-size: 20px; color: #888; font-weight: 300; transition: transform 0.3s; font-family: monospace; }

.grocery-items-list { padding: 0; margin: 0; list-style: none; display: none; }
.grocery-items-list.expanded { display: block; border-top: 1px solid #eee; }

/* The Satisfying Checklist Rows */
.groc-item-row { padding: 15px; border-bottom: 1px solid #f5f5f5; display: flex; align-items: center; gap: 15px; cursor: pointer; transition: background 0.2s; }
.groc-item-row:last-child { border-bottom: none; }
.groc-item-row:active { background: #fafafa; }

/* Big Circular Checkboxes */
.groc-checkbox { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #ccc; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.groc-item-row.checked .groc-checkbox { background: #2ecc71; border-color: #2ecc71; }
.groc-item-row.checked .groc-checkbox::after { content: '✓'; color: white; font-size: 16px; font-weight: bold; }

.groc-item-text { font-size: 16px; color: var(--text-slate); transition: all 0.2s; flex: 1; }
.groc-item-row.checked .groc-item-text { color: #aaa; text-decoration: line-through; }

/* --- Phase 10: Coming Soon Menu Badges --- */
.coming-soon { font-size: 10px; background: #f0f0f0; color: #888; padding: 2px 6px; border-radius: 12px; margin-left: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle; }
.disabled-link { opacity: 0.6; cursor: not-allowed !important; pointer-events: none; }

/* Phase 11 Toggle Switch */
#recipe-is-public:checked + .slider { background-color: var(--primary-saffron) !important; }
#recipe-is-public:checked + .slider .knob { box-shadow: 0 0 1px var(--primary-saffron) !important; }

/* --- Phase 12: Cobo Hub & Reactions --- */
.reaction-bar { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; flex-wrap: wrap;}
.react-btn { background: #f8f9fa; border: 1px solid #eee; border-radius: 20px; padding: 4px 10px; font-size: 13px; cursor: pointer; transition: all 0.2s; color: var(--text-slate); font-weight: bold; }
.react-btn:active { transform: scale(0.9); background: #eee; }
.react-btn:hover { border-color: var(--primary-saffron); }

.comm-filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; scrollbar-width: none; }
.comm-filters::-webkit-scrollbar { display: none; }
.filter-pill { padding: 8px 16px; border-radius: 20px; background: white; border: 1px solid #ddd; white-space: nowrap; cursor: pointer; font-weight: 500; font-size: 14px; transition: all 0.2s;}
.filter-pill.active { background: var(--primary-saffron); color: white; border-color: var(--primary-saffron); box-shadow: 0 4px 10px rgba(255, 153, 51, 0.3); }

/* --- Microsoft Edge Style Tabs --- */
.edge-tabs { display: flex; border-bottom: 2px solid #e1dfdd; margin-bottom: 10px; }
.edge-tab {
    flex: 1; background: transparent; border: none; padding: 12px 15px; font-size: 15px;
    font-weight: 600; color: #888; cursor: pointer; transition: all 0.2s;
    border-bottom: 3px solid transparent; margin-bottom: -2px; outline: none;
}
.edge-tab:hover { color: var(--text-slate); background: #f9f9f9; }
.edge-tab.active { color: var(--primary-saffron); border-bottom-color: var(--primary-saffron); }
.tab-content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
