.todo-manager{position:relative;display:grid;gap:10px}
.todo-manager-open .top-work-info{display:none}
.todo-manager-open .portal-heading{display:block}
.todo-toolbar{position:relative;z-index:20;display:flex;height:0;justify-content:flex-end}
.todo-month-control{position:absolute;top:-68px;right:130px;display:grid;width:234px;grid-template-columns:42px 150px 42px;align-items:center;overflow:hidden;border:1px solid #d8d0c5;border-radius:13px;background:#fff;box-shadow:0 8px 22px rgba(32,39,49,.05)}
.todo-month-control button{height:44px;border:0;background:#fff;color:#153b68;font-size:23px;cursor:pointer}
.todo-month-control button:hover{background:#f4f0e9}
.todo-month-control input{width:100%;height:44px;border:0;border-right:1px solid #eee7de;border-left:1px solid #eee7de;padding:0 8px;color:#173552;background:#fff;text-align:center;font-weight:850}
.todo-status{min-height:18px;color:#617286;font-size:11px}
.todo-status:empty{display:none}
.todo-status.error{color:#a94444}

.todo-workbench{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:start}
.todo-workbench.has-detail{grid-template-columns:minmax(280px,.85fr) minmax(420px,1.15fr)}
.todo-list-panel,.todo-detail-panel{overflow:hidden;border:1px solid #ddd5ca;border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(32,39,49,.05)}
.todo-list-head{display:flex;min-height:46px;align-items:center;justify-content:space-between;gap:12px;padding:9px 13px;border-bottom:1px solid #e8e1d7;background:#fbf7ef}
.todo-head-title{display:flex;align-items:center;gap:12px}
.todo-list-head h3{margin:0;color:#173552;font-size:17px;letter-spacing:-.035em}
.todo-column-dot{width:8px;height:8px;border-radius:50%;background:#e58a32;box-shadow:0 0 0 4px rgba(229,138,50,.13)}
.todo-task-list{min-height:clamp(650px,calc(100vh - 165px),920px);padding:9px;background:#fcfbf8}
.todo-list{display:grid;gap:7px}
#todoActiveList{position:relative;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(var(--todo-slot-count,12),minmax(48px,1fr));min-height:clamp(620px,calc(100vh - 195px),880px)}
#todoActiveList .todo-card{grid-column:1;grid-row:var(--todo-slot)}
#todoActiveList.has-drop-slot::before{content:"";z-index:3;grid-column:1;grid-row:var(--todo-drop-slot);pointer-events:none;border:2px dashed #52789d;border-radius:9px;background:rgba(82,120,157,.1)}
.todo-completed-group{margin-top:10px;padding-top:9px;border-top:1px solid #e8e1d7}
.todo-completed-label{margin:0 3px 7px;color:#768596;font-size:9px;font-weight:900;letter-spacing:.02em}

.todo-card{position:relative;z-index:1;display:grid;grid-template-columns:30px minmax(0,1fr) 28px;align-items:center;gap:8px;min-height:48px;padding:7px 9px;border:1px solid #e4ddd3;border-radius:9px;background:#fff;box-shadow:0 3px 10px rgba(32,39,49,.025);cursor:pointer;transition:border-color .15s,box-shadow .15s,opacity .15s,background .15s}
.todo-card:hover{border-color:#aebfce;box-shadow:0 6px 15px rgba(32,52,76,.07)}
.todo-card.is-selected{border-color:#52789d;box-shadow:0 0 0 2px rgba(66,105,145,.14)}
.todo-card.is-dragging{opacity:.42;border-color:#6f8eae}
.todo-check{display:grid;width:25px;height:25px;place-items:center;border:1px solid #aebdca;border-radius:50%;color:transparent;background:#fff;cursor:pointer}
.todo-check:hover{border-color:#4b718f;color:#9eb1c1}
.todo-check[aria-pressed="true"]{border-color:#3f8479;color:#fff;background:#4b8c81}
.todo-check span{font-size:12px;font-weight:950}
.todo-copy{min-width:0}
.todo-copy strong{display:block;overflow:hidden;color:#142f4b;font-size:18px;line-height:1.4;text-overflow:ellipsis;white-space:nowrap}
.todo-card.todo-patient-name{grid-template-columns:minmax(0,1fr) 28px;padding-left:16px}.todo-patient-name-open{color:#65798d;font-size:22px;line-height:1;text-align:center}
.todo-card.is-completed .todo-copy strong{color:#84909e;text-decoration:line-through;text-decoration-color:#a3adb7}
.todo-more{display:grid;width:26px;height:28px;place-items:center;border:0;border-radius:7px;color:#73869a;background:transparent;font-size:19px;line-height:1;cursor:pointer}
.todo-more:hover{background:rgba(255,255,255,.72);color:#173552}

.todo-tone-red{background:#fde8e7}
.todo-tone-orange{background:#ffeddc}
.todo-tone-yellow{background:#fff5c7}
.todo-tone-green{background:#e6f4e8}
.todo-tone-mint{background:#e1f5ef}
.todo-tone-sky{background:#e3f2fa}
.todo-tone-blue{background:#e5edfa}
.todo-tone-purple{background:#eee7f9}
.todo-tone-pink{background:#f9e6f0}
.todo-tone-gray{background:#edf0f3}
.todo-tone-vivid-red{background:#df2f2f}
.todo-tone-vivid-yellow{background:#ffd400}
.todo-tone-vivid-blue{background:#176dc1}
.todo-tone-vivid-green{background:#159447}
.todo-card.todo-tone-vivid-red .todo-copy strong,.todo-card.todo-tone-vivid-blue .todo-copy strong,.todo-card.todo-tone-vivid-green .todo-copy strong{color:#fff}
.todo-card.todo-tone-vivid-red .todo-more,.todo-card.todo-tone-vivid-blue .todo-more,.todo-card.todo-tone-vivid-green .todo-more{color:#fff}

.todo-add-trigger{min-height:30px;padding:0 10px;border:1px solid #cfc4b6;border-radius:8px;color:#173552;background:#fff;font-size:9px;font-weight:900;cursor:pointer}
.todo-add-trigger:hover{border-color:#7990a8;background:#f4f8fb}
.todo-inline-create{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px}
.todo-header-create{padding:8px 10px;border-bottom:1px solid #e8e1d7;background:#f8f5ef}
.todo-inline-create input{width:100%;height:38px;border:1px solid #b9c4cf;border-radius:8px;padding:0 11px;color:#173552;background:#fff;font:750 12px/1 Pretendard,"Noto Sans KR",sans-serif;outline:none}
.todo-inline-create input:focus{border-color:#6b88a7;box-shadow:0 0 0 3px rgba(66,105,145,.1)}
.todo-inline-create button{height:32px;padding:0 10px;border-radius:7px;font-size:9px;font-weight:900;cursor:pointer}
.todo-create-cancel{border:1px solid #d2c8ba;color:#667486;background:#fff}
.todo-create-confirm{border:1px solid #153b68;color:#fff;background:#153b68}
.todo-inline-create button:disabled{opacity:.55;cursor:wait}
.todo-detail-panel{position:sticky;top:12px;display:flex;min-height:clamp(450px,56vh,680px);flex-direction:column;padding:9px}
.todo-detail-panel[hidden]{display:none}
.todo-detail-panel.todo-patient-name-detail{min-height:0}
.todo-editor-shell[hidden]{display:none}
.todo-detail-controls{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;margin-bottom:7px}
.todo-detail-title{width:100%;height:31px;padding:0 9px;border:1px solid transparent;border-radius:7px;color:#000;background:transparent;font:900 13px/1 Pretendard,"Noto Sans KR",sans-serif;outline:none}
.todo-detail-title:hover,.todo-detail-title:focus{border-color:#c9d3dc;background:#fff}
.todo-detail-controls button{height:31px;padding:0 10px;border-radius:7px;font-size:9px;font-weight:900;cursor:pointer}
.todo-detail-controls #todoDetailClose{display:grid;width:31px;padding:0;place-items:center;border:0;color:#607286;background:#f0ece5;font-size:20px}
.todo-detail-delete{border:1px solid #dacbc4;color:#9b4b4b;background:#fff}
.todo-editor-shell{display:flex;min-height:clamp(390px,50vh,620px);flex:1;flex-direction:column;overflow:visible;border:1px solid #d3cabf;border-radius:9px;background:#fff}
.todo-editor-shell:focus-within{border-color:#6b88a7;box-shadow:0 0 0 3px rgba(66,105,145,.1)}
.todo-format-toolbar{position:relative;display:flex;flex-wrap:wrap;gap:5px;padding:7px;border-bottom:1px solid #e6dfd6;background:#f8f6f2}
.todo-format-toolbar button,.todo-font-size-select{min-height:31px;padding:0 9px;border:1px solid #d2c9bd;border-radius:7px;color:#38536d;background:#fff;font:800 10px/1 Pretendard,"Noto Sans KR",sans-serif;cursor:pointer}
.todo-format-toolbar button:hover,.todo-font-size-select:hover{border-color:#7890a6;color:#173552;background:#eef4f8}
.todo-font-size-select{min-width:68px;outline:none}
.todo-format-menu-wrap{position:relative;display:flex}
.todo-format-menu{position:absolute;z-index:40;top:calc(100% + 6px);left:0;display:grid;min-width:145px;gap:6px;padding:9px;border:1px solid #d4cabd;border-radius:10px;background:#fff;box-shadow:0 14px 30px rgba(17,31,48,.18)}
.todo-format-menu[hidden]{display:none}
.todo-format-menu-wrap.align-right .todo-format-menu{right:0;left:auto}
.todo-format-menu button{width:100%;text-align:left;white-space:nowrap}
.todo-format-menu .todo-format-primary{border-color:#173552;color:#fff;background:#173552;text-align:center}
.todo-list-format-menu button{font-size:11px}
.todo-table-format-menu{grid-template-columns:1fr 1fr;min-width:205px}
.todo-table-format-menu label,.todo-text-color-menu label{display:grid;gap:4px;color:#607286;font-size:9px;font-weight:850}
.todo-table-format-menu select{height:32px;border:1px solid #c9d1d9;border-radius:7px;padding:0 8px;color:#173552;background:#fff;font-weight:850}
.todo-table-format-menu .todo-format-primary{grid-column:1/-1}
.todo-text-color-menu{min-width:185px}
.todo-text-color-presets{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;padding-bottom:3px}
.todo-text-color-presets button{width:28px;height:28px;min-height:28px;padding:0;border:1px solid rgba(23,53,82,.18);border-radius:8px;background:var(--todo-text-swatch)}
.todo-text-color-presets button:hover{transform:scale(1.08);border-color:#173552;background:var(--todo-text-swatch)}
.todo-text-color-menu input[type="color"]{width:100%;height:34px;border:1px solid #c9d1d9;border-radius:7px;padding:3px;background:#fff;cursor:pointer}
.todo-detail-editor{display:block;width:100%;min-height:340px;flex:1;overflow:auto;padding:14px;color:#000;background:#fff;font:700 13px/1.75 Pretendard,"Noto Sans KR",sans-serif;outline:none;white-space:pre-wrap;word-break:break-word}
.todo-detail-editor:empty::before{content:attr(data-placeholder);color:#9aa5af;pointer-events:none}
.todo-detail-editor img{display:block;max-width:100%;height:auto;margin:6px 0;border-radius:4px;object-fit:contain}
.todo-detail-editor p,.todo-detail-editor div{margin:0;line-height:inherit}
.todo-detail-editor ul,.todo-detail-editor ol{margin:5px 0 10px;padding-left:24px}
.todo-detail-editor table{width:100%;margin:8px 0 12px;border-collapse:collapse;table-layout:fixed}
.todo-detail-editor th,.todo-detail-editor td{min-width:80px;border:1px solid #bcc8d2;padding:7px 8px;vertical-align:top}
.todo-detail-editor th{color:inherit;background:#eef3f7;text-align:left}
.todo-detail-editor [data-font-size="small"]{font-size:.72rem}
.todo-detail-editor [data-font-size="normal"]{font-size:.8125rem}
.todo-detail-editor [data-font-size="large"]{font-size:1rem}
.todo-detail-editor [data-font-size="xlarge"]{font-size:1.25rem;line-height:1.55}
.todo-detail-editor [data-text-color]{text-decoration-color:currentColor}
.todo-detail-editor hr{height:0;margin:18px 0;border:0;border-top:2px solid #9aabba}
.todo-editor-check{display:flex;min-height:30px;align-items:flex-start;gap:8px;margin:4px 0;cursor:text}
.todo-editor-check input{width:17px;height:17px;margin:5px 0 0;accent-color:#3f8479;cursor:pointer}
.todo-editor-check span{min-width:40px;flex:1}
.todo-detail-backdrop{display:none}

.todo-root-page{display:grid;max-width:760px;gap:10px}.todo-root-page[hidden],.todo-board-page[hidden]{display:none}
.todo-folder-page-head{display:flex;justify-content:flex-end}
.todo-folder-create{padding:10px;border:1px solid #ddd5ca;border-radius:10px;background:#f9f6f0}
.todo-folder-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:4px}
.todo-patient-folder-grid{min-height:clamp(650px,calc(100vh - 165px),920px);align-content:start;padding:9px;background:#fcfbf8}
.todo-patient-folder-section{position:relative}.todo-patient-folder-section.is-dragging{opacity:.38}.todo-patient-folder-section.is-drop-before::before,.todo-patient-folder-section.is-drop-after::after{content:"";position:absolute;z-index:2;right:4px;left:4px;height:2px;border-radius:2px;background:#315d9b}.todo-patient-folder-section.is-drop-before::before{top:-3px}.todo-patient-folder-section.is-drop-after::after{bottom:-3px}
.todo-patient-folder-section .todo-folder-row{grid-template-columns:34px minmax(0,1fr) auto auto}.todo-patient-folder-toggle{display:flex;align-items:center;justify-content:space-between;gap:10px}.todo-patient-folder-toggle span{color:#65798d;font-size:22px;font-weight:500;line-height:1}.todo-patient-add{height:32px;padding:0 10px;border:1px solid #cfc4b6;border-radius:7px;color:#173552;background:#fff;font-size:10px;font-weight:900;white-space:nowrap;cursor:pointer}.todo-patient-add:hover{border-color:#7990a8;background:#f4f8fb}
.todo-patient-names{margin:3px 6px 8px 40px;padding:7px 9px;border-left:2px solid #d6e0e8}.todo-patient-names[hidden],.todo-patient-inline-create[hidden]{display:none}.todo-patient-inline-create{margin-bottom:6px}.todo-patient-name-list{display:grid;gap:3px}.todo-patient-name-row{display:grid;grid-template-columns:minmax(0,1fr) auto;min-height:36px;align-items:center;gap:10px;padding:5px 6px 5px 11px;border:1px solid #e3ddd4;border-radius:7px;color:#173552;background:#fff;font-size:15px;font-weight:800;line-height:1.3}.todo-patient-delete{height:28px;padding:0 9px;border:1px solid #dfc2bd;border-radius:6px;color:#a13e35;background:#fff;font-size:11px;font-weight:850;cursor:pointer}.todo-patient-delete:hover{border-color:#c98f86;background:#fff4f2}.todo-patient-delete:disabled{opacity:.55;cursor:wait}
.todo-folder-row{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr) auto 34px;align-items:center;gap:7px;min-height:48px;padding:4px 6px;border:1px solid transparent;border-radius:8px;background:rgba(244,245,246,.82);cursor:pointer;transition:border-color .15s,background .15s,opacity .15s}.todo-folder-row:hover{border-color:#d7dde2;background:#eef1f4}.todo-folder-row.is-dragging{opacity:.38}.todo-folder-row.is-drop-before::before,.todo-folder-row.is-drop-after::after{content:"";position:absolute;right:4px;left:4px;height:2px;border-radius:2px;background:#315d9b}.todo-folder-row.is-drop-before::before{top:-3px}.todo-folder-row.is-drop-after::after{bottom:-3px}
.todo-folder-drag,.todo-folder-open{display:grid;width:32px;height:32px;padding:0;place-items:center;border:0;border-radius:7px;background:transparent;cursor:pointer}.todo-folder-drag{color:#315d9b;font-size:17px;line-height:1;cursor:grab}.todo-folder-drag:active{cursor:grabbing}.todo-folder-drag:hover,.todo-folder-open:hover{background:#fff}.todo-folder-open{color:#65798d;font-size:22px;line-height:1}
.todo-folder-name{min-width:0;width:100%;height:34px;border:0;border-radius:7px;padding:0 7px;overflow:hidden;color:#172f47;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap;font:800 18px/1 Pretendard,"Noto Sans KR",sans-serif;outline:none;cursor:pointer}.todo-folder-name:hover,.todo-folder-name:focus-visible{background:#fff}.todo-folder-count{display:grid;min-width:24px;height:24px;padding:0 7px;place-items:center;border-radius:999px;color:#5e6d7a;background:#e3e6e8;font-size:10px;font-weight:850}
.todo-head-title{min-width:0;flex:1}.todo-head-title input{min-width:0;width:min(360px,100%);height:34px;border:1px solid transparent;border-radius:8px;padding:0 8px;color:#173552;background:transparent;font:950 14px/1 Pretendard,"Noto Sans KR",sans-serif;outline:none}.todo-head-title input:hover,.todo-head-title input:focus{border-color:#c8d2db;background:#fff}.todo-parent-button{display:grid;width:31px;height:31px;padding:0 0 2px;place-items:center;border:1px solid #ccd4dc;border-radius:8px;color:#173552;background:#fff;font-size:22px;line-height:1;cursor:pointer}

.todo-empty{display:flex;min-height:120px;align-items:center;justify-content:center;padding:20px;color:#87919c;text-align:center}
.todo-empty.error{color:#a94444}

.todo-color-menu{position:fixed;z-index:100050;width:218px;padding:12px;border:1px solid #d8d0c5;border-radius:12px;background:#fff;box-shadow:0 18px 44px rgba(17,31,48,.2)}
.todo-color-menu>strong{display:block;margin-bottom:9px;color:#173552;font-size:11px}
.todo-color-options{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}
.todo-color-swatch{width:32px;height:32px;border:1px solid rgba(23,53,82,.12);border-radius:9px;cursor:pointer}
.todo-color-swatch.is-selected{border-color:#173552;box-shadow:0 0 0 2px #fff,0 0 0 4px #173552}
.todo-color-clear{width:100%;height:30px;margin-top:10px;border:1px solid #d4cabc;border-radius:7px;color:#657487;background:#fff;font-size:9px;font-weight:850}
.todo-color-clear.is-selected{border-color:#173552;color:#173552;background:#eef3f8}

@media(max-width:1200px){
  .todo-workbench.has-detail{grid-template-columns:minmax(240px,1fr) minmax(360px,420px)}
}
@media(max-width:860px){
  .todo-workbench.has-detail{grid-template-columns:1fr}
  .todo-detail-panel{position:fixed;z-index:100020;top:0;right:0;bottom:0;width:min(94vw,520px);min-height:0;border-radius:16px 0 0 16px;overflow:auto;box-shadow:-18px 0 45px rgba(17,31,48,.24)}
  .todo-editor-shell{min-height:calc(100dvh - 64px)}
  .todo-detail-editor{min-height:calc(100dvh - 122px)}
  .todo-detail-backdrop:not([hidden]){display:block;position:fixed;z-index:100010;inset:0;border:0;background:rgba(16,29,44,.38)}
  body.todo-detail-open{overflow:hidden}
}
@media(max-width:760px){
  .todo-month-control{top:-55px;right:0;width:230px;grid-template-columns:40px 150px 40px}
  .todo-task-list{min-height:clamp(560px,calc(100dvh - 145px),820px)}
  #todoActiveList{min-height:clamp(530px,calc(100dvh - 175px),780px)}
}
@media(max-width:420px){
  .todo-toolbar{height:44px}
  .todo-month-control{position:static;width:100%;grid-template-columns:40px 1fr 40px}
  .todo-inline-create{grid-template-columns:minmax(0,1fr) auto}
  .todo-create-cancel{display:none}
}
