.appointment-batch[hidden]{display:none!important}
.appointment-batch{width:100%;height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);gap:12px;padding:14px 18px 16px;color:#073650;overflow:hidden}
.appointment-batch__header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px}
.appointment-batch__back{padding:8px 14px;border:0;border-radius:9px;background:#08677a;color:#fff;font-weight:800;cursor:pointer}
.appointment-batch__heading h1{margin:0;font-size:22px}.appointment-batch__heading p{margin:3px 0 0;color:#728795;font-size:12px}
.appointment-batch__summary{display:flex;gap:8px;flex-wrap:wrap}.appointment-batch__summary span{padding:6px 10px;border:1px solid #d7e4e9;border-radius:999px;background:#fff;color:#526f80;font-size:12px}.appointment-batch__summary strong{color:#087d89}
.appointment-batch__workspace{min-height:0;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(520px,.95fr);gap:12px}
.appointment-batch__pane{min-width:0;min-height:0;border:1px solid #d8e4e9;border-radius:12px;background:#fff;overflow:hidden}
.appointment-batch__pane--working{display:grid;grid-template-rows:auto minmax(0,1fr)}
.appointment-batch__pane--source{display:grid;grid-template-rows:minmax(0,1fr) auto}
.appointment-batch__pane-head{padding:12px 14px;border-bottom:1px solid #e2eaee;background:#f8fbfc}.appointment-batch__pane-head h2,.appointment-batch__block-head h2,.appointment-batch__block-head h3{margin:0}.appointment-batch__pane-head h2{font-size:18px}.appointment-batch__block-head h2{font-size:17px}.appointment-batch__block-head h3{font-size:16px}.appointment-batch__pane-head p,.appointment-batch__block-head p{margin:3px 0 0;color:#728795;font-size:11px;line-height:1.35}
.appointment-batch__working-list,.appointment-batch__source-scroll{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
.appointment-batch__working-list{padding:10px;display:grid;align-content:start;gap:8px}
.appointment-batch__source-scroll{padding:10px;display:grid;align-content:start;gap:10px}
.appointment-batch__block{border:1px solid #e0e8ec;border-radius:10px;padding:11px;background:#fff}.appointment-batch__block-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px}.appointment-batch__block-head>button{padding:7px 11px;border:1px solid #b9d8df;border-radius:8px;background:#087d89;color:#fff;font-weight:800;cursor:pointer}.appointment-batch__block-head>button:disabled{opacity:.45;cursor:not-allowed}
.appointment-batch__field{position:relative;display:grid;gap:5px;font-size:12px;font-weight:800}.appointment-batch__field>input,.appointment-batch__field>select,.appointment-batch__field>textarea,.appointment-batch__date-control>input,.appointment-batch__other-patient>input{width:100%;min-width:0;border:1px solid #c8dbe4;border-radius:8px;padding:8px 9px;background:#fff;color:#163e54;font:inherit}.appointment-batch__field>input[readonly]{background:#f5f8f9;color:#5f7685}.appointment-batch__field>textarea{min-height:64px;resize:vertical}
.appointment-batch__hospital-field .patient-master-candidate-list{position:absolute;left:0;right:0;top:100%;z-index:80;background:#fff}
.appointment-batch__due-list{display:grid;gap:6px;max-height:280px;overflow-y:auto;scrollbar-gutter:stable}.appointment-batch__due-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 9px;border:1px solid #e0e8ec;border-radius:8px;background:#fbfdfd}.appointment-batch__due-row.is-added{background:#edf7f2;border-color:#c9e5d7}.appointment-batch__due-row input[type=checkbox]{width:16px;height:16px}.appointment-batch__due-main strong{display:block;font-size:13px}.appointment-batch__due-main small{display:block;margin-top:2px;color:#718795;font-size:11px}.appointment-batch__due-state{font-size:11px;font-weight:800;color:#087d89;white-space:nowrap}
.appointment-batch__working-card{border:1px solid #dbe6ea;border-radius:9px;padding:9px 10px;background:#fbfdfd}.appointment-batch__working-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.appointment-batch__working-name{font-size:14px;font-weight:850}.appointment-batch__working-meta{margin-top:3px;color:#708695;font-size:11px}.appointment-batch__remove{padding:5px 8px;border:1px solid #e5b9b5;border-radius:7px;background:#fff;color:#bd3d36;cursor:pointer}
.appointment-batch__empty{padding:16px;text-align:center;color:#8497a3;border:1px dashed #cfdee4;border-radius:9px;background:#fbfdfd;font-size:12px}
.appointment-batch__other-patient{position:relative}.appointment-batch__patient-results{margin-top:7px;border:1px solid #d7e5ea;border-radius:8px;overflow:hidden}
.appointment-batch__form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.appointment-batch__remark{margin-top:9px}.appointment-batch__date-control{display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px}.appointment-batch__date-control>button{width:34px;height:34px;border:1px solid #c8dbe4;border-radius:8px;background:#fff;color:#07556a;cursor:pointer}
.appointment-batch__footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 11px;border-top:1px solid #e2eaee;background:#f8fbfc}.appointment-batch__footer>span{font-size:11px;color:#718795}.appointment-batch__footer>div{display:flex;gap:8px}.appointment-batch__footer button{padding:7px 12px;border:1px solid #c6d9e1;border-radius:8px;background:#fff;color:#466274;font-weight:800}.appointment-batch__footer .is-primary{background:#087d89;color:#fff;border-color:#087d89}.appointment-batch__footer button:disabled{opacity:.5}
@media(max-width:1050px){.appointment-batch__workspace{grid-template-columns:1fr}.appointment-batch{height:auto;min-height:100%;overflow:visible}.appointment-batch__pane--working,.appointment-batch__pane--source{min-height:560px}.appointment-batch__header{grid-template-columns:auto 1fr}.appointment-batch__summary{grid-column:1/-1}.appointment-batch__form-grid{grid-template-columns:1fr}}

/* DEV-4.03A1 | Batch Working Set status + complete lock */
.appointment-batch__working-card.is-completed{
    background:#edf8f1;
    border-color:#b8dfc7;
}
.appointment-batch__working-name{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.appointment-batch__working-state{
    display:inline-flex;
    align-items:center;
    min-height:22px;
    padding:3px 8px;
    border-radius:999px;
    background:#fff3d6;
    color:#9a6800;
    font-size:11px;
    font-weight:800;
}
.appointment-batch__working-state.is-locked{
    background:#dff2e5;
    color:#237548;
}
.appointment-batch__working-actions{
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
    gap:8px;
    flex-wrap:wrap;
}
.appointment-batch__status-field{
    display:grid;
    gap:4px;
    color:#587182;
    font-size:11px;
    font-weight:800;
}
.appointment-batch__status-field select{
    min-width:132px;
    padding:6px 8px;
    border:1px solid #c9dbe3;
    border-radius:8px;
    background:#fff;
    color:#173d51;
    font:inherit;
}
.appointment-batch__complete,
.appointment-batch__unlock{
    padding:7px 10px;
    border:1px solid #b8d7ca;
    border-radius:8px;
    background:#edf8f1;
    color:#237548;
    font-weight:800;
    cursor:pointer;
}
.appointment-batch__unlock{
    border-color:#c8d8e0;
    background:#fff;
    color:#355d70;
}
.appointment-batch__locked-status{
    display:inline-flex;
    align-items:center;
    min-height:32px;
    padding:6px 10px;
    border-radius:8px;
    background:#fff;
    border:1px solid #cfe4d7;
    color:#237548;
    font-size:12px;
    font-weight:800;
}


/* DEV-4.03B | per-patient contact note + formal Draft */
.appointment-batch__contact-note{
    display:grid;
    grid-template-columns:72px minmax(0,1fr);
    align-items:start;
    gap:8px;
    margin-top:8px;
    padding-top:8px;
    border-top:1px solid #e5edf0;
    color:#587182;
    font-size:11px;
    font-weight:800;
}
.appointment-batch__contact-note textarea{
    width:100%;
    min-height:42px;
    max-height:90px;
    resize:vertical;
    border:1px solid #c9dbe3;
    border-radius:8px;
    padding:7px 8px;
    background:#fff;
    color:#173d51;
    font:inherit;
    font-weight:500;
    line-height:1.4;
}
.appointment-batch__contact-note.is-locked>div{
    min-height:30px;
    padding:6px 8px;
    border:1px solid #cfe4d7;
    border-radius:8px;
    background:#f7fbf8;
    color:#385e4a;
    font-weight:500;
    white-space:pre-wrap;
}

/* DEV-4.03C1 | Optional detailed time, same interaction as completed Follow */
.appointment-batch__detail-toggle{display:inline-flex!important;align-items:center;gap:7px;margin-top:3px;color:#526b7a;font-size:11px;font-weight:800;cursor:pointer}
.appointment-batch__detail-toggle input{width:16px!important;min-height:16px!important;height:16px;margin:0;padding:0}
.appointment-batch__detail-time{margin-top:2px}
.appointment-batch__detail-time>input{width:100%;min-height:36px;border:1px solid #c8dbe4;border-radius:8px;padding:8px 9px;background:#fff;color:#163e54;font:inherit}
