/* --------------------------------------------------------------------------
 * 부드러운 이동(soft-nav.js) — 맨 위의 가는 진행 줄(0.12초 넘게 걸릴 때만). 알림은 28-toast.css.
 * -------------------------------------------------------------------------- */
.soft-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    width: 0;
    height: 2px;
    background: var(--hospital-blue);
    opacity: 0;
    pointer-events: none;
}
.soft-progress.is-active {
    width: 80%;
    opacity: 1;
    transition: width 2.5s cubic-bezier(0.1, 0.6, 0.2, 1), opacity 0.1s;
}
.soft-progress.is-done {
    width: 100%;
    opacity: 0;
    transition: width 0.15s ease-out, opacity 0.2s ease 0.1s;
}
#page-main:focus {
    outline: none;
}
/* --------------------------------------------------------------------------
 * 첨부파일 칸(components/file-drop · file-drop.js) — mf-attach.
 *   위: 폭 전체의 낮은 끌어 놓는 곳(아이콘 · 안내 · 오른쪽 한도). 칸 어디에 끌어 놓아도 받는다.
 *   아래: 파일이 있으면 테두리 하나로 묶은 목록 — 머리(개수 · 총 용량 · 모두 빼기) + 줄마다
 *         확장자 꼬리표(이미지는 미리보기) · 이름 · 크기 · 빼기.
 * overrides.css 의 .file-drop(입고 사진)과 이름이 겹치지 않게 mf-attach 로 둔다.
 * -------------------------------------------------------------------------- */
.mf-attach-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.mf-attach-zone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: 0.625rem 1rem;
    border: 1.5px dashed var(--ln);
    border-radius: 0.625rem;
    background: var(--sf-inset);
    color: var(--tx);
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}
.mf-attach-zone:hover,
.mf-attach-zone:focus-visible {
    border-color: var(--hospital-blue);
    outline: none;
}
.mf-attach.is-over .mf-attach-zone {
    border-style: solid;
    border-color: var(--hospital-blue);
    background: color-mix(in srgb, var(--hospital-blue) 8%, var(--sf-card));
}
.mf-attach.is-invalid .mf-attach-zone {
    border-color: var(--st-danger-fill);
}
.mf-attach-zone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hospital-blue) 12%, var(--sf-card));
    color: var(--hospital-blue);
}
.mf-attach-zone-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}
.mf-attach-pick {
    color: var(--hospital-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.mf-attach-limits {
    margin-left: auto;
    color: var(--tx-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}
.mf-attach-zone-text.is-full {
    display: none;
    color: var(--tx-muted);
}
.mf-attach.is-full .mf-attach-zone {
    border-style: solid;
    cursor: default;
}
.mf-attach.is-full .mf-attach-zone:hover {
    border-color: var(--ln);
}
.mf-attach.is-full .mf-attach-zone-icon {
    background: var(--sf-raised);
    color: var(--tx-faint);
}
.mf-attach.is-full [data-file-drop-prompt] {
    display: none;
}
.mf-attach.is-full .mf-attach-zone-text.is-full {
    display: inline;
}

.mf-attach-box {
    margin-top: 0.625rem;
    overflow: hidden;
    border: 1px solid var(--ln);
    border-radius: 0.625rem;
    background: var(--sf-card);
}
.mf-attach:not(.has-files) .mf-attach-box {
    display: none;
}
.mf-attach-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4375rem 0.875rem;
    border-bottom: 1px solid var(--ln);
    background: var(--sf-inset);
    color: var(--tx-muted);
    font-size: 0.8125rem;
}
.mf-attach-summary strong {
    color: var(--tx-strong);
    font-variant-numeric: tabular-nums;
}
.mf-attach-clear {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tx-muted);
    font-size: 0.8125rem;
}
.mf-attach-clear:hover,
.mf-attach-clear:focus-visible {
    color: var(--st-danger);
    text-decoration: underline;
}
.mf-attach-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mf-attach-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.5rem 0.5rem 0.5rem 0.875rem;
}
.mf-attach-item + .mf-attach-item {
    border-top: 1px solid var(--ln-soft);
}
.mf-attach-item:hover {
    background: var(--sf-inset);
}

/* 확장자 꼬리표 — 종류마다 옅은 색, 이미지는 미리보기 */
.mf-attach-type {
    --type: var(--tx-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--type) 13%, var(--sf-card));
    color: var(--type);
    font-size: 0.5625rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}
.mf-attach-type[data-type="pdf"] { --type: var(--st-danger-fill); }
.mf-attach-type:is([data-type="xls"], [data-type="xlsx"], [data-type="csv"]) { --type: var(--st-success-fill); }
.mf-attach-type:is([data-type="doc"], [data-type="docx"], [data-type="hwp"], [data-type="hwpx"], [data-type="txt"]) { --type: var(--hospital-blue); }
.mf-attach-type:is([data-type="ppt"], [data-type="pptx"]) { --type: var(--st-warning-fill); }
.mf-attach-type:is([data-type="jpg"], [data-type="jpeg"], [data-type="png"], [data-type="gif"], [data-type="webp"], [data-type="heic"]) { --type: #7c3aed; }
.mf-attach-type.is-image {
    overflow: hidden;
    border: 1px solid var(--ln);
    background: var(--sf-inset);
}
.mf-attach-type.is-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mf-attach-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    color: var(--tx);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mf-attach-state {
    flex-shrink: 0;
    padding: 0.0625rem 0.4375rem;
    border-radius: 999px;
    background: var(--sf-raised);
    color: var(--tx-muted);
    font-size: 0.6875rem;
    font-weight: 600;
}
.mf-attach-size {
    flex-shrink: 0;
    min-width: 4.25rem;
    color: var(--tx-muted);
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.mf-attach-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--tx-muted);
}
.mf-attach-remove svg {
    width: 1rem;
    height: 1rem;
}
.mf-attach-remove:hover,
.mf-attach-remove:focus-visible {
    background: var(--sf-hover);
    color: var(--st-danger);
    outline: none;
}
.mf-attach-item.is-removed .mf-attach-name,
.mf-attach-item.is-removed .mf-attach-size {
    color: var(--tx-faint);
    text-decoration: line-through;
}
.mf-attach-item.is-removed .mf-attach-type {
    opacity: 0.45;
}
.mf-attach-item.is-removed .mf-attach-state {
    background: color-mix(in srgb, var(--st-danger-fill) 12%, var(--sf-card));
    color: var(--st-danger);
}
.mf-attach-item.is-removed .mf-attach-remove:hover {
    color: var(--hospital-blue);
}
.mf-attach-error {
    margin-top: 0.375rem;
    color: var(--st-danger);
    font-size: 0.8125rem;
}
.mf-attach-error:empty {
    display: none;
}
@media (max-width: 575.98px) {
    .mf-attach-limits {
        display: none;
    }
}

/* 월 이동 제목 — 한 자리 · 두 자리 달이 바뀌어도 좌우 화살표가 제자리에 있게 폭을 고정한다. */
.month-nav-title {
    min-width: 6.5rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
/* 날 이동(예약 현황) — "12월 31일 (목)" 까지 들어가게 */
.month-nav-title.is-day {
    min-width: 8.5rem;
}


/* --------------------------------------------------------------------------
 * 한 줄 파일 고르기 칸(components/file-pick · file-drop.js) — 좁은 곳용. 입력칸과 같은 높이 · 테두리.
 * [📎 파일 선택] 이름 · 크기 [✕]. 고르면 이름이 짙어지고, 끌어 놓는 동안 파란 테두리.
 * -------------------------------------------------------------------------- */
.mf-file-pick {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-border-radius, 0.375rem);
    background: var(--sf-card);
    transition: border-color 0.12s ease;
}
.mf-file-pick:hover,
.mf-file-pick:focus-within,
.mf-file-pick.is-over {
    border-color: var(--hospital-blue);
}
.mf-file-pick.is-over {
    background: color-mix(in srgb, var(--hospital-blue) 8%, var(--sf-card));
}
.mf-file-pick.is-invalid {
    border-color: var(--st-danger-fill);
}
.mf-file-pick-box {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    margin: 0;
    padding: 0.3125rem 0.375rem;
    cursor: pointer;
}
.mf-file-pick-button {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.3125rem;
    background: color-mix(in srgb, var(--hospital-blue) 12%, var(--sf-card));
    color: var(--hospital-blue);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}
.mf-file-pick-button svg {
    width: 0.875rem;
    height: 0.875rem;
}
.mf-file-pick-name {
    min-width: 0;
    overflow: hidden;
    color: var(--tx-muted);
    font-size: 0.875rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mf-file-pick.has-file .mf-file-pick-name {
    color: var(--tx-strong);
    font-weight: 500;
}
.mf-file-pick-size {
    flex-shrink: 0;
    color: var(--tx-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
}
.mf-file-pick-clear {
    display: inline-flex;
    flex-shrink: 0;
    margin-right: 0.375rem;
    padding: 0.25rem;
    border: 0;
    border-radius: 0.3125rem;
    background: transparent;
    color: var(--tx-muted);
}
.mf-file-pick-clear:hover {
    background: var(--sf-hover);
    color: var(--st-danger);
}
.mf-file-pick-clear svg {
    width: 0.875rem;
    height: 0.875rem;
}
.mf-attach-input:focus-visible + .mf-file-pick-box .mf-file-pick-button {
    outline: 2px solid var(--hospital-blue);
    outline-offset: 2px;
}
/* 사진 미리보기(x-file-pick preview) — 칸 아래, 비율 그대로 */
.mf-file-pick-preview {
    display: inline-flex;
    margin-top: 0.5rem;
    padding: 0.25rem;
    border: 1px solid var(--ln);
    border-radius: 0.5rem;
    background: var(--sf-inset);
}
.mf-file-pick-preview[hidden] {
    display: none;
}
.mf-file-pick-preview img {
    display: block;
    max-width: 100%;
    max-height: 10rem;
    border-radius: 0.3125rem;
    object-fit: contain;
}

/* 한 개만 받는 칸에서 새 파일로 바꿀 저장된 줄 */
.mf-attach-item.is-replaced {
    display: none;
}
/* 큰 미리보기(x-file-drop preview — 증명서 직인) — 목록 아래, 투명 배경이 보이게 바둑판 바탕 */
.mf-attach-preview {
    display: inline-flex;
    margin-top: 0.625rem;
    padding: 0.5rem;
    border: 1px solid var(--ln);
    border-radius: 0.625rem;
    background: repeating-conic-gradient(var(--sf-inset) 0 25%, var(--sf-card) 0 50%) 0 0 / 16px 16px;
}
.mf-attach-preview[hidden] {
    display: none;
}
.mf-attach-preview img {
    display: block;
    max-width: 100%;
    max-height: 10rem;
    object-fit: contain;
}
