.habit-day-col{width:42px;min-width:42px;max-width:42px;text-align:center!important;padding-left:0!important;padding-right:0!important;white-space:nowrap}
.habit-day-col .habit-check{display:grid;place-items:center;margin:0 auto!important}
.day-head{align-items:center;gap:5px;margin-bottom:11px}
.day-head-date{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0}
.day-type-select{width:66px;height:23px;padding:2px 3px;border:1px solid #344c66;border-radius:6px;background:#17283e;color:#aebfd0;font-size:8px;line-height:1.1;outline:none}
.day-type-select.is-work{border-color:#a9914d;background:#494126;color:#fff4d5}
.day-type-select.is-off{border-color:#477b64;background:#1a362d;color:#eff9f2}
.month-day-head{align-items:center;gap:3px;margin-bottom:9px}
.month-day-label{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-start;min-width:0}
.month-day-head>.day-type-select{width:68px;min-width:0;height:22px;margin:0;font-size:8px}
.today-card-head>.day-type-select{width:100px;height:31px;font-size:9px}
.day-dialog-head-actions>.day-type-select{width:104px;height:30px;font-size:9px}
.today-task,.queue-task,.undated-task,.group-task-row,.day-detail-task{display:flex;align-items:center;gap:8px}
.today-task-title,.queue-task-title,.task-chip-title,.month-task-title,.day-detail-title,.group-task-title{flex:1;min-width:0;overflow-wrap:anywhere}
.task-chip,.month-task{display:flex;align-items:center;gap:5px}
.month-task{white-space:normal}
.month-task-title{overflow:hidden;text-overflow:ellipsis}
.today-task,.task-chip,.month-task,.day-detail-task{background:#17283e!important}
.today-task,.day-detail-task{position:relative;overflow:hidden}
.today-task::before,.day-detail-task::before{content:"";position:absolute;left:0;top:7px;bottom:7px;width:4px;border-radius:0 4px 4px 0;background:var(--group-color)}
.task-chip{background:#17283e!important}
.task-chip::before{width:4px;top:4px;bottom:4px}
.month-task{border-left:4px solid var(--group-color);padding-left:5px;background:#17283e!important}
.month-task.missed{border-left-color:#db7c82}
.today-task:hover{transform:none!important;filter:none!important}
.task-delete-quick{display:grid;place-items:center;flex:0 0 20px;width:20px;height:22px;padding:0;border:0;border-radius:5px;background:transparent;color:#ed858e;font-size:19px;font-weight:500;line-height:1;opacity:.9}
.task-delete-quick:hover,.task-delete-quick:focus-visible{opacity:1;background:#4a2932;color:#ffd4d7}
.task-delete-quick:focus-visible{outline:2px solid #70b9ed;outline-offset:2px}
.day-detail-task .task-delete-quick{margin-left:auto}
.task-order-controls{display:none;flex:0 0 19px;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.task-order-controls button{display:grid;place-items:center;width:19px;height:14px;padding:0;border:0;border-radius:4px;background:transparent;color:#a8c4dc;font-size:11px;line-height:1}
.task-order-controls button:hover,.task-order-controls button:focus-visible{background:#2a4660;color:#e4f3ff}
.today-task:hover .task-order-controls,.today-task:focus-within .task-order-controls,.task-chip:hover .task-order-controls,.month-task:hover .task-order-controls{display:flex}
.task-chip,.month-task{cursor:grab}
.task-chip.reorder-target,.month-task.reorder-target,.today-task.reorder-target{outline:2px solid #72b7e8;outline-offset:1px}
@media(max-width:760px){
  .habit-day-col{width:38px;min-width:38px;max-width:38px}
  .habit-table{table-layout:fixed;min-width:570px}
  .habit-table th:first-child,.habit-table td:first-child{width:132px}
  .day-column .day-type-select{width:53px;font-size:7px}
  .month-day-head>.day-type-select{width:53px;font-size:7px}
  .today-card-head>.day-type-select{width:84px}
  .day-dialog-head-actions>.day-type-select{width:90px}
  .task-delete-quick{flex-basis:26px;width:26px;height:26px}
  .today-task .task-order-controls{display:flex}
  .today-task .task-order-controls button{width:24px;height:16px;font-size:13px}
}

.task-chip.done .task-chip-title,.month-task.done .month-task-title,.today-task.done .today-task-title,.day-detail-task.done .day-detail-title,.group-task-row.done .group-task-title{text-decoration:line-through;color:#8fa0b3!important;opacity:.78}
.task-moved-indicator{display:inline-grid;place-items:center;flex:0 0 20px;width:20px;height:22px;border:1px solid #397aab;border-radius:6px;background:#1b3c55;color:#9bd8ff;font-size:15px;font-weight:800;line-height:1;cursor:help}.task-chip.missed .task-chip-title,.month-task.missed .month-task-title{color:#c5aeb3}

.group-task-date{flex:0 1 auto;max-width:46%;white-space:normal;text-align:right;overflow-wrap:anywhere}

.repeat-pause-option{display:flex;align-items:center;gap:8px;margin:10px 0 2px;color:#c8d8e8;font-size:11px;font-weight:650}.repeat-pause-option input{accent-color:#58a7df}.repeat-pause-option small{color:#8fa3b8;font-size:9px;font-weight:500}

.today-task,.task-chip,.month-task{user-select:none;cursor:grab}
.today-task-title,.task-chip-title,.month-task-title{flex:0 1 auto!important;width:max-content;max-width:100%;user-select:text;cursor:pointer}
.today-task-title:hover,.task-chip-title:hover,.month-task-title:hover{text-decoration:underline}
.today-task:hover,.task-chip:hover,.month-task:hover,.today-task.dragging,.task-chip.dragging,.month-task.dragging,.today-task.reorder-target,.task-chip.reorder-target,.month-task.reorder-target{background:#17283e!important;filter:none!important;transform:none!important}
.subtask-completion-badge{display:inline-flex;align-items:center;flex:1 0 calc(100% - 28px);min-width:0;margin-left:28px;color:#9fcaf0;font-size:9px;font-weight:600;line-height:1.25;overflow-wrap:anywhere}
.subtasks-dialog{width:min(480px,calc(100% - 28px));padding:22px}
.subtask-list{display:grid;gap:7px;max-height:min(48vh,360px);overflow:auto;margin:8px 0 14px}
.subtask-row{display:flex;align-items:center;gap:9px;min-height:38px;padding:7px 9px;border:1px solid #2b4059;border-radius:8px;background:#17283e;color:#dce7f2}
.subtask-row input{accent-color:#58a7df;flex:0 0 auto}
.subtask-row span{flex:1;min-width:0;overflow-wrap:anywhere}
.subtask-row.done span{color:#8fa3b8;text-decoration:line-through}
.subtask-row button{border:0;background:none;color:#ed858e;font-size:17px;cursor:pointer}
.subtask-add-form{display:flex;gap:8px}
.subtask-add-form .text-field{min-width:0;flex:1}
.subtask-add-form .add-button{flex:0 0 auto}
.subtask-empty{padding:16px 8px;text-align:center;color:#8fa3b8;font-size:11px}

/* Фон календарной ячейки остаётся неизменным во время перетаскивания */
.today-card.drop-active{background:#142238!important}
.day-column.drop-active{background:#111e30!important}
.day-column.today.drop-active{background:#162a40!important}
.month-day.drop-active{background:#111e30!important}
.month-day.today.drop-active{background:#162a40!important}
.month-day.past-day.drop-active{background:#101b2b!important}

/* Всплывающая лесенка с подзадачами */
.task-subtasks-hover{position:relative;display:inline-flex;flex:0 1 auto;min-width:0;max-width:100%;align-items:flex-start}
.task-subtasks-hover:hover,.task-subtasks-hover:focus-within{z-index:50}
.task-subtask-preview{display:none;position:absolute;top:calc(100% + 7px);left:0;z-index:60;width:max-content;min-width:190px;max-width:min(300px,72vw);padding:7px 8px 8px 0;border:1px solid #34506d;border-radius:10px;background:#14243a;box-shadow:0 12px 28px rgba(2,8,18,.42)}
.task-subtasks-hover:hover .task-subtask-preview,.task-subtasks-hover:focus-within .task-subtask-preview{display:grid;gap:5px;animation:subtask-steps-in .18s ease-out both}
.task-subtask-step{display:flex;align-items:flex-start;gap:7px;min-height:29px;margin-left:calc(8px + var(--offset));padding:5px 7px;border:1px solid #2b4561;border-radius:7px;background:#1a304a;color:#d7e5f2;font-size:10px;line-height:1.3;overflow-wrap:anywhere;cursor:pointer;animation:subtask-step-in .2s ease-out both;animation-delay:var(--delay)}
.task-subtask-step input{flex:0 0 auto;margin:1px 0 0;accent-color:#58a7df;cursor:pointer}
.task-subtask-step span{min-width:0;max-width:250px;overflow-wrap:anywhere}
.task-subtask-step.done span{color:#91a8bd;text-decoration:line-through}
@keyframes subtask-steps-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}
@keyframes subtask-step-in{from{opacity:0;transform:translateX(-5px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.task-subtasks-hover:hover .task-subtask-preview,.task-subtasks-hover:focus-within .task-subtask-preview,.task-subtask-step{animation:none}}

.task-subtasks-hover:hover,.task-subtasks-hover:focus-within{z-index:50}
.today-task,.task-chip,.month-task,.month-day{overflow:visible}

.task-subtask-preview{top:100%;padding-top:7px}
.today-task,.task-chip,.month-task{position:relative;flex-wrap:wrap;overflow:visible}
.task-subtasks-hover{display:flex;flex:1 1 170px;width:auto;min-width:min(150px,100%);max-width:100%;align-items:flex-start}
.task-subtasks-hover .today-task-title,.task-subtasks-hover .task-chip-title,.task-subtasks-hover .month-task-title,.task-subtasks-hover .queue-task-title,.task-subtasks-hover .group-task-title{display:block;flex:1 1 auto!important;width:auto!important;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.task-subtask-step{box-sizing:border-box;width:calc(100% - 8px - var(--offset));margin-left:calc(8px + var(--offset));min-width:0}
.task-subtask-preview{padding-right:8px}

.task-subtasks-hover .today-task-title,.task-subtasks-hover .task-chip-title,.task-subtasks-hover .month-task-title,.task-subtasks-hover .queue-task-title,.task-subtasks-hover .group-task-title{display:inline!important;flex:0 0 auto!important;width:max-content!important;max-width:100%;cursor:pointer}
.subtask-progress{flex:0 0 auto;display:inline-flex;align-items:center;white-space:nowrap;padding:3px 6px;border:1px solid #345775;border-radius:6px;background:#19324b;color:#b3d9f8;font-size:9px;font-weight:700;line-height:1.2}
.task-actions-dialog,.subtask-create-dialog{width:min(360px,calc(100% - 28px));padding:17px}
.task-actions-heading{margin:0 0 12px;color:#d9e7f5;font-size:13px;font-weight:750;overflow-wrap:anywhere}
.task-action-choice{display:flex;align-items:center;gap:11px;width:100%;margin:7px 0;padding:11px;border:1px solid #304963;border-radius:10px;background:#192d45;color:#e2edf8;text-align:left;cursor:pointer}
.task-action-choice:hover{background:#203a56;border-color:#4b789f}
.task-action-icon{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:8px;background:#244968;color:#a7d8ff;font-size:17px}
.task-action-choice strong,.task-action-choice small{display:block}.task-action-choice strong{font-size:11px}.task-action-choice small{margin-top:3px;color:#9db2c8;font-size:9px}
.task-action-choice:focus-visible{outline:2px solid #70baf0;outline-offset:2px}

.task-subtasks-hover{flex:0 1 auto;width:max-content;min-width:0;max-width:70%}

.month-calendar-head,.month-day-placeholder,.month-mobile-count{display:none}
.task-moved-indicator{flex:0 0 21px;width:21px;height:21px;border-radius:50%;background:#1b3c55;color:#a8dcff;font-size:14px;font-weight:800}
.task-delete-quick{order:99;flex:0 0 26px;width:26px;height:26px;margin-left:auto}
@media(max-width:760px){
  #weekView .days-card{overflow:visible;padding:0;background:transparent;border:0;box-shadow:none}
  #weekView .day-columns{display:grid;grid-template-columns:minmax(0,1fr);min-width:0;gap:10px}
  #weekView .day-column{min-height:0;padding:13px;border-radius:12px}
  #weekView .day-head{margin-bottom:11px}
  #weekView .day-name{font-size:11px}
  #weekView .day-number{font-size:17px}
  #weekView .day-tasks{display:grid;gap:8px}
  #weekView .task-chip{min-height:56px;padding:11px 10px;font-size:13px;gap:8px}
  #weekView .task-chip-title{font-size:13px;line-height:1.4}
  #weekView .subtask-progress{font-size:10px}
  #weekView .column-add{min-height:38px}
  #monthView{padding:0;overflow:visible}
  #monthView .month-card{padding:8px;border-radius:12px}
  #monthView .month-calendar-head{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;margin:0 0 6px;text-align:center;color:#9aacc1;font-size:9px;font-weight:700}
  #monthView .month-grid{grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:auto;min-width:0;gap:3px}
  #monthView .month-day-placeholder{display:block;min-height:50px}
  #monthView .month-day{position:relative;display:flex;min-width:0;width:auto;height:52px;min-height:52px;align-items:flex-start;justify-content:flex-start;padding:5px 4px;border-radius:8px;overflow:hidden}
  #monthView .month-day-head{width:100%;justify-content:center;margin:0}
  #monthView .month-day-label{display:flex;justify-content:center;width:100%}
  #monthView .month-weekday-tag,#monthView .month-day-head>.day-type-select{display:none}
  #monthView .month-day-number{font-size:11px;line-height:1.2}
  #monthView .month-mobile-count{display:grid;place-items:center;align-self:center;min-width:16px;height:16px;margin-top:4px;padding:0 3px;border-radius:6px;background:#1b3c55;color:#b8ddfb;font-size:8px;font-weight:700}
  #monthView .month-mobile-count:empty{visibility:hidden}
  #monthView .month-day-tasks{display:none}
  #monthView .month-day-empty{display:none}
  #monthView .month-day.past-day{opacity:.48}
  #monthView .month-day.today{border:1px solid #86bce3;background:#1a3048}
  .task-delete-quick{order:99;flex:0 0 27px;width:27px;height:27px;margin-left:auto}
  .today-task,.task-chip,.month-task{gap:7px}
}

.today-task{display:grid;grid-template-columns:18px minmax(0,1fr) auto;grid-template-rows:auto auto;column-gap:11px;row-gap:5px;align-items:center}
.today-task>[data-task-check]{grid-column:1;grid-row:1}
.today-task>.task-subtasks-hover{grid-column:2;grid-row:1;width:auto;max-width:100%;min-width:0}
.today-task-actions{grid-column:3;grid-row:1;display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:max-content;white-space:nowrap}
.today-task-actions .today-task-group{flex:0 0 auto;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.today-task-actions .task-order-controls{flex:0 0 22px}
.today-task-actions .task-delete-quick{order:initial;flex:0 0 26px;width:26px;margin:0}
.today-task>.subtask-completion-badge{grid-column:2/-1;grid-row:2;margin:0}
@media(min-width:761px){.today-task-actions .task-order-controls{display:flex;visibility:hidden}.today-task:hover .task-order-controls,.today-task:focus-within .task-order-controls{visibility:visible}}
@media(max-width:760px){.today-task{grid-template-columns:18px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:9px}.today-task-actions{grid-column:2;grid-row:2;min-width:0;justify-content:flex-end;gap:7px}.today-task>.subtask-completion-badge{grid-row:3}.today-task-actions .today-task-group{max-width:96px}.today-task-actions .task-order-controls{visibility:visible}}
@media(max-width:760px){#monthView .month-day.day-work{background:#34301f;border-color:#8c793e}#monthView .month-day.day-work.today{background:#3b3521;border-color:#b19a52}#monthView .month-day.day-off{background:#1b342b;border-color:#3d775a}#monthView .month-day.day-off.today{background:#1d3c30;border-color:#56a275}}

.task-title-stack{display:flex;flex-direction:column;align-items:flex-start;gap:3px;min-width:0;max-width:100%}
.task-title-stack .subtask-progress{align-self:flex-start;display:inline-flex;flex:0 0 auto;max-width:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:#9db9d4;font-size:10px;font-weight:650;line-height:1.2;white-space:nowrap}
