@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Nunito:wght@400;600;700;800&display=swap');
:root{--ink:#382b3d;--muted:#786d79;--aubergine:#553466;--purple:#76508b;--purple-dark:#42284f;--lavender:#dfd0e8;--lavender-pale:#f2eaf5;--beige:#efe2cc;--cream:#f8f0e2;--paper:#fffaf0;--gold:#b58a4b;--line:#ddcfc5;--danger:#9c4d5b}
*{box-sizing:border-box}body{min-height:100vh;background:radial-gradient(circle at 9% 6%,rgba(194,164,211,.24),transparent 24rem),radial-gradient(circle at 92% 18%,rgba(210,181,139,.2),transparent 26rem),var(--cream);color:var(--ink);font-family:Nunito,system-ui,sans-serif}.app-navbar{background:rgba(247,238,221,.95);border-bottom:1px solid rgba(85,52,102,.18);box-shadow:0 7px 28px rgba(69,46,76,.08);backdrop-filter:blur(13px)}.navbar-brand{display:flex;align-items:center;gap:.7rem;color:var(--aubergine)!important;font-family:"Cormorant Garamond",serif;font-size:1.55rem;font-weight:700}.brand-mascot{width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(67,39,77,.18))}.nav-link{color:#5d4f61;border-radius:999px;padding:.65rem 1rem!important;font-size:.88rem;font-weight:800}.nav-link:hover,.nav-link.active{color:var(--purple-dark);background:var(--lavender)}footer{color:var(--muted);font-family:"Cormorant Garamond",serif;font-size:1rem}.login-mascot{width:180px;height:180px;margin:-1rem auto .5rem;object-fit:contain}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;margin-bottom:1.45rem}.page-heading h1{margin:0;color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:clamp(2.5rem,6vw,4.2rem);font-weight:700;line-height:1;letter-spacing:-.025em}.card{background:rgba(255,250,240,.94);border:1px solid var(--line);border-radius:1rem;box-shadow:0 9px 27px rgba(66,40,79,.07)}.filter-card,.form-card{padding:1.2rem}.table-card{overflow:hidden}.btn{min-height:42px;border-radius:.68rem;font-weight:800}.btn-primary{background:var(--aubergine);border-color:var(--aubergine)}.btn-primary:hover,.btn-primary:focus{background:var(--purple-dark);border-color:var(--purple-dark)}.btn-outline-primary{color:var(--aubergine);border-color:#9877a8}.btn-outline-primary:hover{background:var(--aubergine);border-color:var(--aubergine)}.form-control,.form-select,.input-group-text{min-height:44px;border-color:#d7c7c5;border-radius:.65rem;background:#fffdf7;color:var(--ink)}.form-control:focus,.form-select:focus{border-color:var(--purple);box-shadow:0 0 0 .2rem rgba(118,80,139,.15)}.form-label{color:#5d4a62;font-size:.79rem;font-weight:800}.form-actions{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding-top:1.4rem;margin-top:1.4rem;border-top:1px solid var(--line)}.alert-success{color:#4f375b;background:#eee2f2;border-color:#d7bedf}.table>:not(caption)>*>*{padding:.82rem 1rem;border-bottom-color:#e8ddd4;background:transparent}.table thead th{color:#67566c;background:#eaddef;font-size:.68rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase}.category-row th{padding:.65rem 1rem!important;color:var(--aubergine);background:#f0e1c9!important;border-top:1px solid #d7c1a0;font-family:"Cormorant Garamond",serif;font-size:1.2rem;letter-spacing:.02em}.ingredient-name-cell{display:flex;align-items:center;gap:.8rem;min-width:220px}.ingredient-name-cell img,.ingredient-initial{width:38px;height:38px;flex:0 0 38px;border-radius:50%;object-fit:cover}.ingredient-initial{display:grid;place-items:center;color:var(--aubergine);background:var(--lavender-pale);border:1px solid #d8c2df;font-family:"Cormorant Garamond",serif;font-size:1.2rem;font-weight:700}.ingredient-name-cell>div{display:flex;flex-direction:column}.ingredient-name-cell small{max-width:340px;color:var(--muted);font-size:.7rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-actions{display:flex;align-items:center;justify-content:flex-end;gap:.3rem}.diet-icons{display:inline-flex;align-items:center;gap:.3rem}.diet-icon{display:inline-grid;place-items:center;width:29px;height:29px;border-radius:50%;font-family:Nunito,sans-serif;font-size:.76rem;font-weight:900;cursor:help}.diet-vegetarian{color:#5e6239;background:#ece8c9}.diet-vegan{color:#4d684e;background:#dce8d8}.diet-gluten_free{color:#654477;background:#e9dbee}.recipe-category-section{margin-bottom:2rem}.recipe-category-section>h2,.shopping-title h2{margin:0 0 .8rem;color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:2rem;font-weight:700}.recipe-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.1rem}.recipe-card{overflow:hidden}.recipe-visual{position:relative;height:230px;overflow:hidden;background:#d9c6df}.recipe-visual>img{width:100%;height:100%;object-fit:cover;transition:transform .25s ease}.recipe-card:hover .recipe-visual>img{transform:scale(1.025)}.recipe-visual.is-placeholder{background:linear-gradient(135deg,#e8d8bd,#d3bcdd)}.recipe-visual.is-placeholder>img{object-fit:contain;object-position:center 17%;filter:drop-shadow(0 8px 12px rgba(67,39,77,.15))}.recipe-title-overlay{position:absolute;left:.75rem;right:.75rem;bottom:.75rem;padding:.65rem .8rem;border:1px solid rgba(255,255,255,.58);border-radius:.7rem;background:rgba(255,248,233,.86);box-shadow:0 4px 16px rgba(48,28,57,.14);backdrop-filter:blur(8px)}.recipe-title-overlay small{color:var(--purple);font-size:.63rem;font-weight:900;letter-spacing:.09em;text-transform:uppercase}.recipe-title-overlay h3{margin:.06rem 0 0;color:var(--purple-dark);font-family:"Cormorant Garamond",serif;font-size:1.45rem;font-weight:700;line-height:1.05}.recipe-content{display:flex;flex-direction:column;padding:1rem}.recipe-meta{display:flex;flex-wrap:wrap;gap:.65rem;margin-bottom:.65rem;color:var(--muted);font-size:.69rem;font-weight:700}.ingredients-preview{margin:.7rem 0;color:var(--muted);font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-actions{display:flex;align-items:center;gap:1rem;padding-top:.75rem;margin-top:auto;border-top:1px solid var(--line);font-size:.76rem;font-weight:800}.card-actions a{color:var(--aubergine);text-decoration:none}.card-actions form{margin-left:auto}.btn-link-danger{border:0;background:none;color:var(--danger);font-size:.8rem;font-weight:800}.recipe-text{line-height:1.65}.recipe-line{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(180px,.7fr) 44px;align-items:end;gap:.8rem;padding:.85rem 0;border-top:1px solid var(--line)}.recipe-line:first-child{border-top:0}.remove-line{color:var(--danger);background:#f2e1e1}.empty-lines,.empty-state,.empty-table{padding:3rem 1rem;text-align:center;color:var(--muted)}.empty-lines{padding:2rem;border:1px dashed #cbb8c7;border-radius:.8rem}.empty-table{padding:2rem}.menu-table .servings-form{width:95px}.menu-table .form-control{text-align:center}.shopping-title{margin-top:2rem}.shopping-title h2{margin-bottom:0}.shopping-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:start;gap:1rem}.shopping-group{padding:1.1rem;margin-bottom:.85rem}.shopping-group h3{margin:0 0 .45rem;color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:1.55rem;font-weight:700}.shopping-line{display:grid;grid-template-columns:24px 1fr auto 115px;align-items:center;gap:.7rem;padding:.7rem 0;border-top:1px solid var(--line)}.shopping-name{font-weight:700}.shopping-line small{text-align:right;color:var(--muted)}.shopping-line:has(input:checked){opacity:.45;text-decoration:line-through}.shopping-summary{position:sticky;top:95px;padding:1.2rem}.shopping-summary>span{color:var(--muted);font-size:.7rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.shopping-summary>strong{color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:2.5rem}.modal-content{border:1px solid #d6c0dc;border-radius:1rem;background:var(--paper);box-shadow:0 24px 70px rgba(46,27,54,.25)}.modal-header,.modal-footer{border-color:var(--line)}.modal-title{color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-weight:700}.modal-recipe-list{display:grid;gap:.5rem}.modal-recipe-choice{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:.75rem;padding:.8rem;border:1px solid var(--line);border-radius:.75rem;background:#fffdf8;cursor:pointer}.modal-recipe-choice:has(input:checked){border-color:var(--purple);background:var(--lavender-pale)}.modal-recipe-choice>span{display:flex;flex-direction:column}.modal-recipe-choice small{color:var(--muted)}.servings-modal-input{width:110px}.config-list{display:grid;gap:.5rem}.config-row{display:grid;grid-template-columns:28px 1fr auto 32px;align-items:center;gap:.6rem;padding:.65rem;border:1px solid var(--line);border-radius:.7rem;background:#fffdf7}.config-row>span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;color:var(--aubergine);background:var(--lavender);font-size:.7rem;font-weight:800}.config-row small{color:var(--muted)}
.recipe-visual{display:block;text-decoration:none}.back-link{display:inline-block;margin-bottom:.55rem;color:var(--purple);font-size:.8rem;font-weight:800;text-decoration:none}.recipe-reader-heading>div,.menu-detail-heading>div,.shopping-page-heading>div{min-width:0}.recipe-reader-meta{display:flex;align-items:center;flex-wrap:wrap;gap:.65rem;margin-top:.85rem;color:var(--muted);font-size:.82rem;font-weight:800}.recipe-reader{overflow:hidden}.recipe-reader-cover{height:min(36vh,380px);overflow:hidden;background:linear-gradient(135deg,#e8d8bd,#d3bcdd)}.recipe-reader-cover img{width:100%;height:100%;object-fit:cover}.recipe-reader-cover.is-placeholder img{object-fit:contain;filter:drop-shadow(0 8px 12px rgba(67,39,77,.15))}.recipe-reader-layout{display:grid;grid-template-columns:minmax(250px,330px) minmax(0,1fr)}.recipe-reader-ingredients{padding:2rem;background:rgba(239,226,204,.48);border-right:1px solid var(--line)}.recipe-reader-ingredients h2,.recipe-reader-method h2{margin:0;color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:2rem;font-weight:700}.recipe-reader-ingredients>p{margin:.2rem 0 1.25rem;color:var(--muted);font-size:.8rem}.recipe-reader-ingredients ul{padding:0;margin:0;list-style:none}.recipe-reader-ingredients li{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;padding:.8rem 0;border-top:1px solid rgba(85,52,102,.14)}.recipe-reader-ingredients li span{font-weight:700}.recipe-reader-ingredients li strong{flex:0 0 auto;color:var(--purple);font-size:.82rem}.recipe-reader-method{min-height:360px;padding:2rem clamp(1.5rem,4vw,3.5rem)}.recipe-prose{margin-top:1.35rem;color:#443847;font-size:1.05rem;line-height:1.9;white-space:normal}.menus-list-table time{color:var(--purple);font-weight:800;white-space:nowrap}.menus-list-table .table-actions{flex-wrap:wrap}.menu-detail-heading p,.shopping-page-heading p{margin:.55rem 0 0;color:var(--muted);font-weight:700}.menu-recipe-link{color:var(--aubergine);font-weight:800;text-decoration:none}.summary-recipe{display:flex;justify-content:space-between;gap:.75rem;padding:.4rem 0}.summary-recipe small{color:var(--muted)}.menu-recipe-modal-form{display:flex;flex-direction:column;max-height:calc(100vh - 2rem);min-height:0}.menu-recipe-modal-form .modal-header,.menu-recipe-modal-form .modal-footer{flex:0 0 auto}.menu-recipe-modal-form .modal-body{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;padding-bottom:.75rem}.modal-filters{flex:0 0 auto;margin-bottom:.75rem}.menu-recipe-modal-form .modal-recipe-list{flex:1 1 auto;min-height:0;overflow-y:auto;padding-right:.35rem;overscroll-behavior:contain}.menu-recipe-modal-form .modal-recipe-choice{grid-template-columns:24px minmax(0,1fr) auto;gap:.6rem;padding:.52rem .65rem}.menu-recipe-modal-form .modal-recipe-choice>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-recipe-modal-form .modal-recipe-choice .diet-icons{display:inline-flex;flex-flow:row nowrap;align-items:center}.menu-recipe-modal-form .diet-icon{width:25px;height:25px;font-size:.68rem}.modal-servings{display:flex;align-items:center;gap:.65rem}.modal-servings .form-label{margin:0!important}.servings-modal-input{width:90px}
@media(max-width:991px){.recipe-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.shopping-layout{grid-template-columns:1fr}.shopping-summary{position:static}.navbar-brand{font-size:1.35rem}.brand-mascot{width:45px;height:45px}.recipe-reader-layout{grid-template-columns:1fr}.recipe-reader-ingredients{border-right:0;border-bottom:1px solid var(--line)}}
@media(max-width:650px){.page-heading{align-items:flex-start;flex-direction:column}.page-heading>.btn{width:100%}.recipe-grid{grid-template-columns:1fr}.recipe-line{grid-template-columns:1fr 1fr}.recipe-line .remove-line{grid-column:2;justify-self:end}.shopping-line{grid-template-columns:24px 1fr auto}.shopping-line small{grid-column:2/4;text-align:left}.ingredient-name-cell small{display:none}.table-actions{align-items:flex-end;flex-direction:column}.navbar-brand span{max-width:170px;line-height:1}.brand-mascot{width:42px;height:42px}.recipe-reader-cover{height:250px}.recipe-reader-ingredients,.recipe-reader-method{padding:1.35rem}.menu-detail-heading>div+div{width:100%}.menu-detail-heading>div+div>*{flex:1 1 auto}.menu-recipe-modal-form{max-height:calc(100vh - 1rem)}.menu-recipe-modal-form .modal-body{padding:.75rem}.modal-footer{gap:.75rem}.modal-servings{flex:1}.menus-list-table .table-actions{align-items:flex-start}}
.ingredient-name-cell img{width:44px;height:44px;flex-basis:44px;padding:1px;border-radius:.65rem;background:var(--lavender-pale);object-fit:contain}.recipe-unit-select{max-width:105px}.brand-mascot{width:60px;height:46px}.appearance-card{display:flex;align-items:center;justify-content:space-between;gap:2rem}.appearance-card form{width:min(100%,320px)}
[data-theme="dark"]{color-scheme:dark;--ink:#eee3ef;--muted:#bcaebe;--aubergine:#d8b9e5;--purple:#c69bd8;--purple-dark:#f0dff6;--lavender:#4c3758;--lavender-pale:#34273b;--beige:#3a302d;--cream:#171119;--paper:#241b27;--gold:#d6ae68;--line:#4c3b4e;--danger:#e58a9b;--bs-body-color:var(--ink);--bs-body-bg:var(--cream);--bs-emphasis-color:#fff;--bs-secondary-color:var(--muted)}
[data-theme="dark"] body{background:radial-gradient(circle at 9% 6%,rgba(126,75,151,.2),transparent 24rem),radial-gradient(circle at 92% 18%,rgba(172,128,73,.12),transparent 26rem),var(--cream)}[data-theme="dark"] .app-navbar{background:rgba(28,20,31,.95);border-bottom-color:#49374d;box-shadow:0 7px 28px rgba(0,0,0,.3)}[data-theme="dark"] .nav-link{color:#c8b9cb}[data-theme="dark"] .nav-link:hover,[data-theme="dark"] .nav-link.active{color:#f3e7f7;background:#493552}[data-theme="dark"] .navbar-toggler{border-color:#69546f;filter:invert(1)}
[data-theme="dark"] .card{background:rgba(37,27,40,.96);border-color:var(--line);box-shadow:0 10px 30px rgba(0,0,0,.2)}[data-theme="dark"] .form-control,[data-theme="dark"] .form-select,[data-theme="dark"] .input-group-text,[data-theme="dark"] .modal-recipe-choice,[data-theme="dark"] .config-row{color:var(--ink);background:#1f1822;border-color:#57445a}[data-theme="dark"] .form-control::placeholder{color:#8f8192}[data-theme="dark"] .form-control:focus,[data-theme="dark"] .form-select:focus{color:var(--ink);background:#251c28;border-color:#a77aba}[data-theme="dark"] .form-label{color:#d4c0d8}
[data-theme="dark"] .table{--bs-table-color:var(--ink);--bs-table-bg:transparent;--bs-table-border-color:var(--line)}[data-theme="dark"] .table thead th{color:#d5c0da;background:#3c2b43}[data-theme="dark"] .category-row th{color:#efdaf5;background:#3b302d!important;border-top-color:#665044}[data-theme="dark"] .ingredient-initial,[data-theme="dark"] .ingredient-name-cell img{background:#33263a;border-color:#58435e}
[data-theme="dark"] .recipe-visual.is-placeholder,[data-theme="dark"] .recipe-reader-cover{background:linear-gradient(135deg,#3a302d,#443149)}[data-theme="dark"] .recipe-title-overlay{border-color:rgba(223,200,231,.2);background:rgba(34,25,37,.88);box-shadow:0 4px 16px rgba(0,0,0,.3)}[data-theme="dark"] .recipe-title-overlay small,[data-theme="dark"] .recipe-title-overlay h3{color:#ead7f1}[data-theme="dark"] .recipe-reader-ingredients{background:rgba(57,45,42,.55);border-color:var(--line)}[data-theme="dark"] .recipe-prose{color:#e8dce9}
[data-theme="dark"] .modal-content{color:var(--ink);background:var(--paper);border-color:#604965}[data-theme="dark"] .modal-recipe-choice:has(input:checked){background:#44324c;border-color:#b487c7}[data-theme="dark"] .alert-success{color:#e8d7ed;background:#44314b;border-color:#65496e}[data-theme="dark"] .text-secondary{color:#aa9cad!important}[data-theme="dark"] .btn-close{filter:invert(1) grayscale(1)}
[data-theme="dark"] .card h1,[data-theme="dark"] .card h2{color:var(--ink)}[data-theme="dark"] .btn-primary{color:#25182b;background:#c9a0d9;border-color:#c9a0d9}[data-theme="dark"] .btn-primary:hover,[data-theme="dark"] .btn-primary:focus{color:#1d1222;background:#e0c2eb;border-color:#e0c2eb}
[data-theme="dark"] .recipe-reader-ingredients li span,[data-theme="dark"] .ingredient-name-cell strong,[data-theme="dark"] .shopping-name,[data-theme="dark"] .summary-recipe b,[data-theme="dark"] .modal-recipe-choice strong,[data-theme="dark"] .config-row strong{color:var(--ink)}
@media(max-width:650px){.appearance-card{align-items:stretch;flex-direction:column;gap:1rem}.appearance-card form{width:100%}}
@media print{.app-navbar,footer,.page-heading .btn,.shopping-summary,.menu-table,.filter-card{display:none!important}body{background:#fff}.shopping-layout{display:block}.shopping-group{box-shadow:none;break-inside:avoid}.shopping-line{padding:.4rem 0}}
.recipe-reader-ingredients li{align-items:center;padding:.65rem 0}.recipe-reader-ingredient-name{display:flex;min-width:0;align-items:center;gap:.7rem}.recipe-reader-ingredient-name img,.recipe-reader-ingredient-initial{width:46px;height:46px;flex:0 0 46px;padding:2px;border:1px solid rgba(85,52,102,.13);border-radius:.7rem;background:var(--lavender-pale);object-fit:contain}.recipe-reader-ingredient-initial{display:grid;place-items:center;color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:1.25rem;font-weight:700}
[data-theme="dark"] .recipe-visual{background:linear-gradient(135deg,#3a302d,#443149)}
.recipe-reader-sections{display:grid;gap:1.25rem;padding:1.4rem;background:rgba(255,250,240,.45)}.recipe-subrecipe{overflow:hidden;border:1px solid var(--line);border-radius:.9rem;background:rgba(255,253,247,.76)}.recipe-subrecipe>h2{padding:1rem 1.35rem;margin:0;color:var(--aubergine);background:var(--lavender-pale);border-bottom:1px solid var(--line);font-family:"Cormorant Garamond",serif;font-size:2rem;font-weight:700}.recipe-subrecipe .recipe-reader-ingredients h3,.recipe-subrecipe .recipe-reader-method h3{margin:0;color:var(--aubergine);font-family:"Cormorant Garamond",serif;font-size:1.55rem;font-weight:700}.recipe-subrecipe .recipe-reader-method{min-height:0}.recipe-section-editor{margin-bottom:1rem}.recipe-section-heading{display:flex;align-items:end;gap:1rem}.recipe-section-editor .empty-lines{padding:1.2rem}.shopping-sync-status{color:var(--purple);font-size:.75rem;font-weight:800}
[data-theme="dark"] .recipe-reader-sections{background:rgba(20,15,22,.35)}[data-theme="dark"] .recipe-subrecipe{background:rgba(37,27,40,.76);border-color:var(--line)}[data-theme="dark"] .recipe-subrecipe>h2{color:var(--ink);background:#3c2b43}
@media(max-width:650px){.recipe-reader-sections{padding:.7rem}.recipe-section-heading{align-items:stretch;flex-direction:column}.recipe-section-heading .remove-section{align-self:flex-end}.recipe-subrecipe>h2{font-size:1.65rem}}
