.cm-content-plan-root{
  display:grid;
  gap:14px;
}

.cm-content-plan-root .card{
  margin:0;
  padding:18px 18px 16px;
  border:1px solid rgba(203, 223, 163, 0.95);
  border-radius:16px;
  background:rgba(255, 255, 255, 0.96);
  box-shadow:0 10px 24px rgba(160, 185, 110, 0.12);
}

.cm-content-plan-root .title{
  margin:0;
  color:#4f513f;
  font-size:15px;
  font-weight:800;
  letter-spacing:0;
  text-transform:none;
}

.cm-content-plan-root .row{
  display:flex;
  align-items:center;
  gap:10px;
}

.cm-content-plan-root .row.space{
  justify-content:space-between;
}

.cp-panel{
  display:grid;
  gap:14px;
}

.cp-top{
  display:grid;
  gap:12px;
}

.cp-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.cp-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-left:auto;
}

.cp-actions .btn{
  min-width:182px;
  min-height:38px;
  padding:0 16px;
  font-size:13px;
  font-weight:700;
}

.cp-filter-row{
  display:flex;
  align-items:center;
  gap:10px;
}

.cp-filter-row .sel{
  width:auto;
  min-width:0;
}

.cp-strategy{
  flex:0 0 305px;
  max-width:305px;
}

.cp-template{
  flex:0 0 145px;
  max-width:145px;
}

.cp-net-row{
  display:flex;
  align-items:center;
}

.cp-net-toggles{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.cp-net{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  padding:0;
  border:1px solid #d8e6b8;
  border-radius:999px;
  background:#fffef9;
  color:#707457;
  font-size:12px;
  font-weight:700;
  line-height:1;
  transition:border-color .15s ease, background-color .15s ease, color .15s ease;
}

.cp-net:hover{
  border-color:#bfd66b;
}

.cp-net.is-on{
  border-color:#bfd66b;
  background:#f5fad8;
  color:#5f6447;
}

.cp-extra{
  display:block;
}

.cp-extra .in{
  width:100%;
  min-height:82px;
  padding:12px 14px;
  resize:vertical;
}

.cp-help,
.cp-note{
  color:#969a87;
  font-size:12px;
  line-height:1.35;
}

.cp-err{
  color:#c45d5d;
  font-size:12px;
  line-height:1.35;
}

.cp-calendar{
  display:grid;
  gap:10px;
}

.cp-calendar-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.cp-month-title{
  font-size:15px;
}

.cp-calendar-nav{
  display:flex;
  align-items:center;
  gap:8px;
}

.cp-calendar-nav .btn{
  min-height:32px;
  padding:0 14px;
  font-size:13px;
  font-weight:700;
}

.cp-calendar-nav .btn.icon{
  width:32px;
  min-width:32px;
  padding:0;
}

.cp-calendar .cp-cal-head,
.cp-calendar .cp-row{
  display:grid;
  grid-template-columns:repeat(7, minmax(0, 1fr));
}

.cp-calendar .cp-cal-head .cell{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:0 8px;
  border:1px solid rgba(225, 233, 206, 0.9);
  border-bottom:none;
  background:rgba(254, 255, 251, 0.88);
  color:#a8b861;
  font-size:13px;
  font-weight:700;
}

.cp-calendar .cp-row .cell{
  display:flex;
  flex-direction:column;
  min-height:140px;
  border:1px solid rgba(225, 233, 206, 0.9);
  border-top:none;
  background:rgba(255, 255, 255, 0.94);
}

.cp-calendar .cp-row .cell.is-empty{
  background:rgba(255, 255, 255, 0.78);
}

.cp-calendar .cp-row .cell.is-out{
  background:rgba(255, 255, 255, 0.88);
}

.cp-calendar .cell__head{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  padding:12px 12px 4px;
  border:none;
}

.cp-calendar .day{
  color:#edf0e8;
  font-size:72px;
  font-weight:700;
  line-height:.92;
  letter-spacing:-0.06em;
}

.cp-calendar .cell.is-out .day{
  color:#f1f3ed;
}

.cp-calendar .cell__body{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  gap:6px;
  min-height:24px;
  padding:0 10px 6px;
}

.cp-calendar .cell__foot{
  display:flex;
  justify-content:center;
  align-items:flex-end;
  min-height:28px;
  margin-top:auto;
  padding:4px 8px 8px;
}

.cp-calendar .cell__foot .btn{
  min-height:auto;
  padding:0;
  border:none;
  background:transparent;
  box-shadow:none;
  color:#7b7e69;
  font-size:11px;
  font-weight:700;
}

.cp-calendar .cell__foot .btn:hover{
  color:#61644d;
}

.cp-calendar .chip{
  min-height:24px;
  border-radius:999px;
}

.cp-calendar .month-badge{
  opacity:.72;
}

.cp-modal{
  position:fixed;
  inset:0;
  z-index:60;
}

.cp-modal[hidden]{
  display:none;
}

.cp-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(137, 149, 104, 0.18);
  backdrop-filter:blur(1px);
}

.cp-modal__dialog{
  position:relative;
  width:min(900px, calc(100vw - 72px));
  max-height:580px;
  margin:138px auto 0;
  overflow:auto;
  border:1px solid #e6ebd7;
  border-radius:8px;
  background:#fff;
  box-shadow:0 12px 30px rgba(99, 111, 72, 0.10);
}

.cp-modal__head,
.cp-modal__foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 16px 16px;
}

.cp-modal__head{
  border-bottom:1px solid #eff3e7;
}

.cp-modal__body{
  display:grid;
  gap:14px;
  padding:16px 20px 16px;
}

.cp-modal__titlebar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.cp-modal-grid{
  display:grid;
  grid-template-columns:repeat(3, 160px);
  gap:16px;
  align-items:end;
  max-width:512px;
}

.cp-modal-grid .field{
  min-width:0;
}

.cp-modal-text-field .in{
  width:860px;
  max-width:100%;
  min-height:145px;
  height:145px;
  resize:none;
}

.cp-modal-text-field .cp-help{
  margin-top:4px;
}

.cp-modal-tags-field{
  width:260px;
  max-width:260px;
  margin-top:-2px;
}

.cp-modal__foot{
  border-top:1px solid #eff3e7;
}

.cp-modal__actions-left,
.cp-modal__actions-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.cp-modal__actions-right{
  justify-content:flex-end;
}

.cp-modal__foot--new{
  justify-content:flex-end;
  padding-top:14px;
  padding-bottom:16px;
}

.cp-modal__foot--new .cp-modal__actions-right .btn{
  width:160px;
  min-width:160px;
  height:36px;
  min-height:36px;
  justify-content:center;
}

.cp-modal__head .btn.icon{
  width:24px;
  min-width:24px;
  height:24px;
  padding:0;
  border-color:#e9eedc;
  color:#8a9075;
}

.cp-modal__head .title{
  font-family:"Mulish", sans-serif;
  font-size:14px;
  font-weight:600;
  line-height:1;
  letter-spacing:0;
  color:#555944;
}

.cp-modal .label{
  display:block;
  margin-bottom:6px;
  font-family:"Mulish", sans-serif;
  color:#565a48;
  font-size:11px;
  font-weight:600;
  line-height:1;
  letter-spacing:0;
}

.cp-modal .in,
.cp-modal .sel{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  min-height:30px;
  padding:5px 12px;
  border-color:#e3e7cf;
  border-radius:4px;
  color:#757963;
  font-weight:400;
  box-shadow:none;
}

.cp-modal .sel{
  padding-right:34px;
}

.cp-modal-tags-field .in{
  width:260px;
  max-width:260px;
  height:36px;
  min-height:36px;
}

.cp-modal .in::placeholder{
  color:#c4c7bb;
}

.cp-modal-text-field{
  margin-top:2px;
}

.cp-modal-text-field .label{
  margin-bottom:7px;
}

.cp-modal-text-field .in{
  padding-top:10px;
}

.cp-modal .cp-help{
  color:#a1a491;
  font-size:11px;
}

.cp-modal-text-field .row.space{
  margin-top:2px;
}

.cp-modal .cp-help .row,
.cp-modal .row.space{
  width:100%;
}

.cp-modal .md-tabs-bar{
  gap:6px;
  margin:4px 0 8px;
}

.cp-modal .md-tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:76px;
  min-width:76px;
  height:24px;
  min-height:24px;
  padding:0 10px;
  font-family:"Mulish", sans-serif;
  border-color:#e5ead7;
  border-radius:4px;
  background:#fff;
  color:#8d917b;
  font-size:11px;
  font-weight:600;
  line-height:1;
  letter-spacing:0;
  text-align:center;
}

.cp-modal .md-tab.is-active{
  border-color:#dfe6ca;
  background:#fbfcf8;
  box-shadow:none;
}

.cp-modal__actions-right{
  gap:10px;
}

.cp-modal__actions-right .btn.primary{
  background:#c7e45f;
  color:#58603a;
  border-color:#c7e45f;
}

.cp-modal__actions-right .btn{
  border-color:#dfe6ca;
  color:#73785f;
  font-size:13px;
  font-weight:700;
}

.cp-modal__actions-right .btn:not(.primary){
  background:#fff;
}

.cp-modal__foot--new .cp-modal__actions-right{
  margin-left:auto;
}

@media (max-width: 1080px){
  .cp-topbar,
  .cp-calendar-top{
    flex-direction:column;
    align-items:stretch;
  }

  .cp-actions,
  .cp-calendar-nav{
    justify-content:flex-start;
    margin-left:0;
  }
}

@media (max-width: 860px){
  .cp-filter-row{
    flex-wrap:wrap;
  }

  .cp-strategy,
  .cp-template{
    flex:1 1 240px;
    max-width:none;
  }

  .cp-modal__dialog{
    width:min(96vw, 900px);
    max-height:88vh;
    margin:3vh auto;
  }

  .cp-modal-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .cm-content-plan-root .card{
    padding:14px;
  }

  .cp-actions{
    flex-wrap:wrap;
  }

  .cp-actions .btn{
    width:100%;
  }

  .cp-calendar .cp-row .cell{
    min-height:112px;
  }

  .cp-calendar .day{
    font-size:46px;
  }

  .cp-modal__head,
  .cp-modal__body,
  .cp-modal__foot{
    padding:14px;
  }
}

@media (max-width: 760px){
  .cm-content-plan-root{
    gap:12px;
  }

  .cm-content-plan-root .card{
    padding:18px 14px 16px;
    border-radius:18px;
  }

  .cp-top{
    gap:14px;
  }

  .cp-topbar{
    display:block;
  }

  .cp-heading{
    font-size:16px;
    line-height:1.2;
  }

  .cp-filter-row{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }

  .cp-strategy,
  .cp-template{
    flex:none;
    width:100%;
    max-width:none;
  }

  .cp-net-row{
    overflow-x:auto;
    padding-bottom:2px;
  }

  .cp-net-toggles{
    flex-wrap:nowrap;
    gap:10px;
    min-width:max-content;
  }

  .cp-extra .in{
    min-height:132px;
  }

  .cp-help.row.space{
    align-items:flex-start;
  }

  .cp-actions{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:0;
    border:1px solid rgba(203, 223, 163, 0.95);
    border-radius:10px;
    overflow:hidden;
  }

  .cp-actions .btn{
    width:100%;
    min-width:0;
    min-height:46px;
    border:none;
    border-radius:0;
    padding:0 12px;
    justify-content:center;
    text-align:center;
  }

  .cp-actions .btn + .btn{
    border-left:1px solid rgba(203, 223, 163, 0.95);
  }

  .cp-calendar{
    gap:14px;
    overflow:visible;
  }

  .cp-calendar-top{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:start;
    gap:12px;
  }

  .cp-month-title{
    font-size:16px;
    line-height:1.2;
  }

  .cp-calendar-nav{
    display:grid;
    grid-template-columns:repeat(2, 40px);
    grid-template-areas:
      "today today"
      "prev next";
    justify-content:end;
    gap:8px;
  }

  #cp-today{
    grid-area:today;
    min-width:0;
    width:100%;
  }

  #cp-prev{
    grid-area:prev;
  }

  #cp-next{
    grid-area:next;
  }

  .cp-calendar-nav .btn,
  .cp-calendar-nav .btn.icon{
    width:100%;
    min-width:0;
    height:40px;
    min-height:40px;
    padding:0;
  }

  .cp-modal{
    padding:0 12px;
  }

  .cp-modal__dialog{
    width:100%;
    max-height:calc(100vh - 88px);
    margin:88px auto 0;
    border-radius:14px;
  }

  .cp-modal__head,
  .cp-modal__body,
  .cp-modal__foot{
    padding:16px;
  }

  .cp-modal__head{
    align-items:flex-start;
  }

  .cp-modal__titlebar{
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:10px;
    width:100%;
  }

  .cp-modal__titlebar .chip{
    justify-self:start;
  }

  .cp-modal-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px 12px;
    max-width:none;
  }

  .cp-modal-grid .field:nth-child(3){
    grid-column:1 / -1;
  }

  .cp-modal-text-field .in,
  .cp-modal-tags-field,
  .cp-modal-tags-field .in{
    width:100%;
    max-width:none;
  }

  .cp-modal-text-field .in{
    min-height:178px;
    height:178px;
  }

  .cp-modal__foot--new{
    display:block;
  }

  .cp-modal__foot--new > div:first-child{
    display:none;
  }

  .cp-modal__foot--new .cp-modal__actions-right{
    display:flex;
    width:100%;
    gap:12px;
  }

  .cp-modal__foot--new .cp-modal__actions-right .btn{
    flex:1 1 0;
    width:auto;
    min-width:0;
    height:44px;
    min-height:44px;
  }

  #cp-new-save{
    order:2;
  }

  .cp-modal__foot--new [data-close="#cp-new-modal"]{
    order:1;
  }

  .cp-modal__foot--slot{
    display:grid;
    gap:12px;
  }

  .cp-modal__actions-left,
  .cp-modal__actions-right{
    width:100%;
  }

  .cp-modal__actions-left{
    justify-content:stretch;
  }

  .cp-modal__actions-left .btn,
  .cp-modal__actions-right .btn{
    flex:1 1 calc(50% - 6px);
    min-width:calc(50% - 6px);
    justify-content:center;
    min-height:44px;
  }

  #cp-slot-save{
    order:2;
  }

  .cp-modal__actions-right [data-close="#cp-slot-modal"]{
    order:1;
  }
}

@media (max-width: 560px){
  .cp-modal__dialog{
    margin-top:72px;
  }

  .cp-modal__body{
    gap:12px;
  }
}

@media (max-width: 760px){
  .cm-content-plan-root.cp-mobile-calendar .cp-cal-head{
    display:none;
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-row{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-calendar .cp-row .cell{
    min-height:224px;
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-calendar .cell__head{
    display:grid;
    grid-template-columns:1fr;
    justify-items:center;
    align-items:start;
    gap:6px;
    padding:12px 10px 4px;
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-calendar .cell__dow{
    color:#a8b861;
    font-size:16px;
    font-weight:800;
    line-height:1;
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-calendar .day{
    font-size:92px;
    line-height:.88;
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-calendar .cell__foot{
    min-height:44px;
    padding:8px 10px 12px;
  }

  .cm-content-plan-root.cp-mobile-calendar .cp-calendar .cell__foot .btn{
    font-size:14px;
  }
}
