.cf-planner{font-family:system-ui,-apple-system,sans-serif;max-width:1200px;margin:1rem auto}.cf-nav{display:flex;align-items:center;justify-content:space-between;gap:1rem}.cf-nav a{font-size:2rem;text-decoration:none}.cf-filter{margin:1rem 0}.cf-filter select{padding:.45rem}.cf-day-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.cf-day-grid section,.cf-week-day{border:1px solid #ddd;border-radius:12px;padding:1rem;background:#fff}.cf-week{display:grid;grid-template-columns:repeat(7,minmax(180px,1fr));gap:.75rem;overflow-x:auto}.cf-list{list-style:none;padding:0;margin:.5rem 0}.cf-list li{padding:.45rem .5rem;margin:.25rem 0;border-radius:8px;background:#f5f5f5}.cf-event{border-left:4px solid #3b82f6}.cf-task{border-left:4px solid #10b981}.cf-meal{border-left:4px solid #f59e0b}.cf-recurring{border-left-color:#8b5cf6}.cf-toggle{border:0;background:transparent;font-size:1.1rem;cursor:pointer}.cf-task.is-done{text-decoration:line-through;opacity:.6}.cf-empty{color:#777;font-style:italic}@media(max-width:800px){.cf-day-grid{grid-template-columns:1fr}.cf-week{grid-template-columns:repeat(7,minmax(230px,1fr))}}
.cf-create{margin:1rem 0;border:1px solid #d5d9dd;border-radius:12px;background:#fff}.cf-create summary{cursor:pointer;padding:.8rem 1rem;font-weight:700}.cf-create-form{padding:0 1rem 1rem}.cf-create-form label{display:block}.cf-create-form input:not([type=checkbox]),.cf-create-form select,.cf-create-form textarea{box-sizing:border-box;width:100%;padding:.55rem;margin-top:.25rem;border:1px solid #aaa;border-radius:7px;background:#fff}.cf-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 1rem}.cf-checkbox{align-self:end;padding-bottom:.55rem}.cf-checkbox label{display:flex;align-items:center;gap:.5rem}.cf-submit{border:0;border-radius:8px;padding:.65rem 1.1rem;background:#2271b1;color:#fff;font-weight:700;cursor:pointer}.cf-success,.cf-error,.cf-notice{padding:.7rem 1rem;border-radius:8px}.cf-success{background:#e7f7ea;color:#126b24}.cf-error{background:#fde8e8;color:#8a1f1f}.cf-notice{background:#f4f4f4}.cf-create-form small{display:block;margin-top:.3rem;color:#666}@media(max-width:600px){.cf-form-grid{grid-template-columns:1fr}}

/* Version 0.3: bündige Listen und Frontend-Bearbeitung */
.cf-planner .cf-list{margin-left:0!important;padding-left:0!important;width:100%}
.cf-planner .cf-list li{box-sizing:border-box;margin-left:0!important;padding:.55rem .65rem;display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;width:100%}
.cf-edit-link{font-size:.82rem;white-space:nowrap;text-decoration:none}
.cf-weekday-field{border:0;padding:0;margin:.5rem 0;grid-column:1/-1}
.cf-weekday-field label{display:inline-flex!important;align-items:center;gap:.25rem;margin:0 1rem .5rem 0}
.cf-food-week{display:grid;grid-template-columns:repeat(7,minmax(180px,1fr));gap:.75rem;overflow-x:auto}
.cf-food-day{border:1px solid #ddd;border-radius:12px;padding:1rem;background:#fff}
.cf-food-day h3{margin-top:0}.cf-food-day h3 small{display:block;font-size:.75em;font-weight:400;color:#666}
.cf-standard{border-left-color:#ca8a04;background:#fff8db!important}
@media(max-width:800px){.cf-food-week{grid-template-columns:repeat(7,minmax(230px,1fr))}}


/* Version 0.3.3: Avatare und Mahlzeiten direkt entfernen */
.cf-entry-main{display:flex;align-items:center;gap:.5rem;min-width:0}
.cf-avatar{width:32px!important;height:32px!important;min-width:32px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.cf-avatar-empty{display:inline-flex;align-items:center;justify-content:center;background:#e5e7eb;color:#4b5563;font-weight:700;font-size:.85rem}
.cf-entry-actions{display:flex;align-items:center;gap:.35rem;margin-left:auto}
.cf-delete-meal{border:0;background:transparent;color:#b42318;font-size:1.35rem;line-height:1;cursor:pointer;padding:.1rem .25rem;border-radius:4px}
.cf-delete-meal:hover,.cf-delete-meal:focus{background:#fee4e2;outline:2px solid transparent}
.cf-delete-meal.is-loading{opacity:.5;pointer-events:none}


/* Version 0.3.4: Löschschaltfläche unabhängig von Theme-Button-Stilen sichtbar */
.cf-planner button.cf-delete-meal{
  -webkit-appearance:none!important;appearance:none!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;width:30px!important;height:30px!important;min-width:30px!important;
  margin:0!important;padding:0!important;border:1px solid #b42318!important;border-radius:50%!important;
  background:#fff!important;color:#b42318!important;font-family:Arial,sans-serif!important;
  font-size:24px!important;font-weight:700!important;line-height:1!important;text-indent:0!important;
  visibility:visible!important;opacity:1!important;cursor:pointer!important;overflow:visible!important;
}
.cf-planner button.cf-delete-meal span{display:block!important;line-height:24px!important;transform:translateY(-1px)}
.cf-planner button.cf-delete-meal:hover,.cf-planner button.cf-delete-meal:focus{background:#fee4e2!important;color:#8a1c13!important;outline:2px solid #fca5a5!important;outline-offset:1px!important}
.cf-planner button.cf-delete-meal.is-loading{opacity:.5!important;pointer-events:none!important}

.cf-entry-actions{display:flex;align-items:center;gap:.45rem;flex-shrink:0}
.cf-delete-meal{display:inline-flex!important;visibility:visible!important;opacity:1!important;align-items:center;gap:.25rem;border:1px solid #b42318!important;background:#fff!important;color:#b42318!important;font-size:.85rem!important;line-height:1!important;cursor:pointer;padding:.3rem .45rem!important;border-radius:6px!important;width:auto!important;height:auto!important;position:static!important;overflow:visible!important}
.cf-delete-meal .cf-delete-icon{font-size:1.25rem;font-weight:700;line-height:.7}
.cf-delete-meal .cf-delete-label{display:inline!important}
.cf-meal{display:flex;justify-content:space-between;align-items:center;gap:.75rem}


/* Version 0.3.6: kompakte Aktionssymbole */
.cf-screen-reader-text{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}
.cf-planner .cf-entry-actions{
  display:flex!important;align-items:center!important;gap:.25rem!important;margin-left:auto!important;flex:0 0 auto!important;
}
.cf-planner a.cf-edit-link,
.cf-planner button.cf-delete-meal{
  -webkit-appearance:none!important;appearance:none!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;width:28px!important;height:28px!important;min-width:28px!important;max-width:28px!important;
  min-height:28px!important;max-height:28px!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:6px!important;background:transparent!important;
  font-family:Arial,sans-serif!important;font-size:19px!important;font-weight:700!important;line-height:1!important;
  text-decoration:none!important;text-indent:0!important;overflow:hidden!important;box-shadow:none!important;
  position:static!important;visibility:visible!important;opacity:1!important;cursor:pointer!important;
}
.cf-planner a.cf-edit-link{color:#245b8a!important}
.cf-planner button.cf-delete-meal{color:#b42318!important}
.cf-planner a.cf-edit-link span[aria-hidden="true"],
.cf-planner button.cf-delete-meal .cf-delete-icon{
  display:block!important;font-size:19px!important;font-weight:700!important;line-height:1!important;transform:none!important;
}
.cf-planner a.cf-edit-link:hover,.cf-planner a.cf-edit-link:focus{background:#e8f1f8!important;color:#173f61!important;outline:2px solid #93b8d1!important;outline-offset:1px!important}
.cf-planner button.cf-delete-meal:hover,.cf-planner button.cf-delete-meal:focus{background:#fee4e2!important;color:#8a1c13!important;outline:2px solid #fca5a5!important;outline-offset:1px!important}
.cf-planner .cf-list li:hover{background:#eeeeee}
.cf-planner .cf-standard:hover{background:#fff3bf!important}
@media(max-width:600px){
  .cf-planner a.cf-edit-link,.cf-planner button.cf-delete-meal{
    width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;min-height:34px!important;max-height:34px!important;
  }
}


.cf-planner button.cf-delete-item{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:30px!important;height:30px!important;min-width:30px!important;padding:0!important;
  margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;
  color:#b42318!important;font-size:22px!important;line-height:1!important;cursor:pointer!important;
  box-shadow:none!important;text-decoration:none!important;
}
.cf-planner button.cf-delete-item:hover,.cf-planner button.cf-delete-item:focus{
  background:#fee4e2!important;color:#8a1c13!important;outline:2px solid #fca5a5!important;outline-offset:1px!important;
}
.cf-planner button.cf-delete-item.is-loading{opacity:.5!important;pointer-events:none!important}

/* Version 0.3.9: kompakte Wochenansicht mit Swimlanes */
.cf-week-swimlanes{
  display:grid;grid-template-columns:110px repeat(7,minmax(145px,1fr));
  border:1px solid #d9dde2;border-radius:12px;overflow:auto;background:#fff;
}
.cf-week-corner,.cf-week-head,.cf-lane-label,.cf-lane-cell{box-sizing:border-box;border-right:1px solid #e4e7eb;border-bottom:1px solid #e4e7eb}
.cf-week-head{position:sticky;top:0;z-index:2;padding:.5rem .35rem;text-align:center;background:#f7f8fa;font-size:.82rem;line-height:1.15}
.cf-week-head strong{display:block;font-size:.9rem}.cf-week-head span{color:#667085}
.cf-lane-label{position:sticky;left:0;z-index:1;display:flex;align-items:flex-start;gap:.35rem;padding:.55rem .5rem;background:#f7f8fa;font-size:.82rem;font-weight:700}
.cf-lane-cell{min-height:68px;padding:.3rem;background:#fff}
.cf-week-items{list-style:none!important;margin:0!important;padding:0!important}
.cf-week-item{--cf-person-color:#98a2b3;display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:.2rem!important;width:100%!important;box-sizing:border-box!important;margin:0 0 .25rem!important;padding:.28rem .25rem .28rem .4rem!important;border:0!important;border-left:4px solid var(--cf-person-color)!important;border-radius:5px!important;background:#f8fafc!important;font-size:.75rem!important;line-height:1.25!important}
.cf-week-item:last-child{margin-bottom:0!important}.cf-week-item:hover{background:#f1f5f9!important}
.cf-week-event{background:#eff6ff!important}.cf-week-task{background:#f7fee7!important}.cf-week-meal{--cf-person-color:#f59e0b;background:#fffbeb!important}
.cf-week-item.is-done{opacity:.55;text-decoration:line-through}
.cf-week-item-text{min-width:0;overflow-wrap:anywhere}.cf-week-item-text strong{font-size:.72rem}
.cf-week-item .cf-entry-actions{gap:0!important;opacity:.72}.cf-week-item:hover .cf-entry-actions,.cf-week-item:focus-within .cf-entry-actions{opacity:1}
.cf-week-item a.cf-edit-link,.cf-week-item button.cf-delete-item,.cf-week-item button.cf-delete-meal{width:22px!important;height:22px!important;min-width:22px!important;max-width:22px!important;min-height:22px!important;max-height:22px!important;font-size:15px!important;border-radius:4px!important}
.cf-week-item a.cf-edit-link span[aria-hidden="true"],.cf-week-item button.cf-delete-meal .cf-delete-icon{font-size:15px!important}
.cf-week-item .cf-toggle{padding:0!important;font-size:.9rem!important;line-height:1!important}
.cf-week-empty{display:block;text-align:center;color:#98a2b3;padding:.45rem 0;font-size:.8rem}
@media(max-width:800px){.cf-week-swimlanes{grid-template-columns:88px repeat(7,minmax(135px,1fr))}.cf-lane-label{font-size:.75rem}.cf-lane-cell{min-height:62px}}


/* Version 0.4.0: Rezepte und Einkaufsliste */
.cf-form textarea{width:100%;box-sizing:border-box}
.cf-shopping-period{margin:1rem 0 1.5rem;padding:1rem;border:1px solid #e4e7eb;border-radius:12px;background:#fff}
.cf-shopping-period h3{margin:0}
.cf-shopping-range{margin:.15rem 0 .8rem;color:#667085;font-size:.9rem}
.cf-shopping-list{list-style:none!important;margin:0!important;padding:0!important;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.35rem .8rem}
.cf-shopping-list li{margin:0!important;padding:.45rem .55rem!important;border:1px solid #eaecf0;border-radius:8px;background:#f9fafb}
.cf-shopping-list label{display:flex;align-items:flex-start;gap:.5rem;cursor:pointer}
.cf-shopping-list input{margin-top:.2rem}
.cf-shopping-list input:checked+span{text-decoration:line-through;opacity:.55}
.cf-shopping-missing{margin-top:1rem;padding-top:.75rem;border-top:1px solid #eaecf0;color:#667085}
.cf-shopping-missing summary{cursor:pointer;font-weight:600}


/* Version 0.4.2: Personenfarben auch in der Tagesansicht */
.cf-day-grid .cf-list li.cf-person-coded{
  --cf-person-color:#98a2b3;
  border-left-color:var(--cf-person-color)!important;
}
.cf-day-grid .cf-person-coded .cf-avatar{
  box-sizing:border-box;
  border:2px solid var(--cf-person-color)!important;
}
.cf-day-grid .cf-person-coded small{
  color:var(--cf-person-color);
  font-weight:600;
}

/* Mehrfachzuordnung von Personen bei Terminen */
.cf-person-options{display:flex;flex-wrap:wrap;gap:.45rem .8rem;margin-top:.45rem}
.cf-person-options label{display:inline-flex;align-items:center;gap:.3rem;padding:.35rem .55rem;border:1px solid #dcdcde;border-radius:6px;background:#fff}
.cf-person-options input{margin:0}
.cf-avatar-group{display:inline-flex;align-items:center;margin-right:.35rem}
.cf-avatar-group .cf-avatar{margin-right:-7px;box-shadow:0 0 0 2px #fff}
.cf-avatar-group .cf-avatar:last-child{margin-right:0}
.cf-week-event:before,.cf-event.cf-person-coded:before{background:var(--cf-person-color,#bbb)}


/* Version 0.4.4: korrekte Mehrpersonen-Farbcodes */
.cf-week-item.cf-week-event,
.cf-day-grid .cf-list li.cf-event.cf-person-coded{
  position:relative!important;
  border-left:0!important;
  overflow:hidden;
}
.cf-week-item.cf-week-event::before,
.cf-day-grid .cf-list li.cf-event.cf-person-coded::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:5px;
  background:var(--cf-person-stripe,var(--cf-person-color,#98a2b3))!important;
  border-radius:5px 0 0 5px;
}
.cf-week-item.cf-week-event{padding-left:.55rem!important}
.cf-day-grid .cf-list li.cf-event.cf-person-coded{padding-left:calc(1rem + 5px)!important}
.cf-day-grid .cf-event .cf-avatar-group .cf-avatar{
  border-color:#fff!important;
}


/* Version 0.4.6: Profilbilder bei Mehrpersonen-Terminen in der Tagesansicht untereinander */
.cf-day-grid .cf-event .cf-avatar-group{
  display:inline-flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:4px!important;
  flex:0 0 auto!important;
  margin:0 .45rem 0 0!important;
}
.cf-day-grid .cf-event .cf-avatar-group .cf-avatar{
  display:block!important;
  margin:0!important;
  box-shadow:0 0 0 2px #fff!important;
}

.cf-delete-recurring{
  width:2rem !important;
  min-width:2rem !important;
  height:2rem !important;
  min-height:2rem !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  border-radius:50% !important;
  background:transparent !important;
  color:#c62828 !important;
  font-size:1.4rem !important;
  line-height:1 !important;
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.cf-delete-recurring:hover,.cf-delete-recurring:focus{background:#fdeaea !important;}
.cf-recurring-dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:1rem;
  background:rgba(0,0,0,.45);
}
.cf-recurring-dialog{
  width:min(34rem,100%);
  padding:1.25rem;
  border-radius:.75rem;
  background:#fff;
  box-shadow:0 1rem 3rem rgba(0,0,0,.25);
}
.cf-recurring-dialog h3{margin-top:0;}
.cf-recurring-dialog-actions{display:flex;flex-wrap:wrap;gap:.65rem;justify-content:flex-end;margin-top:1.25rem;}
.cf-recurring-dialog-actions button{width:auto !important;min-width:0 !important;padding:.6rem .85rem !important;}
.cf-recurring-all{background:#b71c1c !important;color:#fff !important;border-color:#b71c1c !important;}
@media (max-width:600px){.cf-recurring-dialog-actions{flex-direction:column}.cf-recurring-dialog-actions button{width:100% !important;}}

.cf-form-actions{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap;margin-top:1rem}.cf-cancel{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:42px;padding:.6rem 1rem;border:1px solid #8c8f94;border-radius:8px;background:#fff;color:#2c3338!important;text-decoration:none!important;font-weight:700}.cf-cancel:hover,.cf-cancel:focus{border-color:#2271b1;color:#135e96!important;background:#f6f7f7}

/* Version 0.5.0: klare Trennung zwischen Gerichten (Vorlagen) und Mahlzeiten (Terminen) */
.cf-meal-source { display:flex; flex-wrap:wrap; gap:.75rem 1.25rem; padding:.8rem; border:1px solid #dcdcde; border-radius:8px; }
.cf-meal-source legend { padding:0 .35rem; }
.cf-meal-template-fields,
.cf-meal-new-fields { grid-column:1 / -1; padding:1rem; background:#f7f7f8; border:1px solid #e2e2e5; border-radius:8px; }
.cf-edit-dish-link { display:inline-flex; align-items:center; gap:.35rem; font-weight:600; }
.cf-dish-list { list-style:none; margin:1rem 0; padding:0; display:grid; gap:.75rem; }
.cf-dish-card { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; padding:1rem; border:1px solid #dedee3; border-radius:10px; background:#fff; }
.cf-dish-card pre { white-space:pre-wrap; font:inherit; margin:.5rem 0; }
.cf-dish-status { display:inline-block; margin-left:.45rem; padding:.12rem .45rem; border-radius:999px; background:#ececf1; font-size:.78rem; }
