:root {
    --order-pink: #2f2f2f;
    --order-pink-dark: #111111;
    --order-pink-soft: #f4f4f4;
    --order-border: #e5e8eb;
    --order-text: #191f28;
    --order-muted: #8b95a1;
    --order-red: #f04452;
    --order-blue: #3182f6;
    --order-purple: #7a7a7a;
}

/* 글꼴은 공통 스킨(Pretendard) 사용 */

.order-board-wrap {
    width: 100%;
    overflow-x: auto;
}

.worker-history-count {
    margin: 10px 0 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #555;
}

.worker-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.worker-history-item {
    padding: 12px 14px;
    border: 1px solid #e5e8eb;
    border-radius: 10px;
    background: #fff;
}

.worker-history-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.worker-history-date {
    font-weight: 800;
    color: #333;
}

.worker-history-role {
    font-size: 0.74rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.worker-history-role.leader {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #7c2d12;
}

.worker-history-role.member {
    background: #f1f5f9;
    border: 1px solid #dbe3ec;
    color: #475569;
}

.worker-history-name {
    font-weight: 700;
    color: #444;
}

.worker-history-site {
    font-size: 0.95rem;
    color: #333;
    word-break: keep-all;
}

.worker-history-site i {
    color: #999;
}

.worker-history-sub {
    margin-top: 4px;
    font-size: 0.86rem;
    color: #888;
    word-break: keep-all;
}

.worker-history-empty {
    padding: 20px;
    text-align: center;
    color: #999;
}

#calendar {
    width: 100%;
    margin: 0 auto;
    background: #fff;
}

/* =========================
   FullCalendar (시안: 얇은 회색 칸 / 왼쪽 위 날짜 / 오른쪽 위 건수)
========================= */

.order-board-wrap .fc {
    --fc-border-color: var(--order-border);
    --fc-page-bg-color: #fff;
    --fc-neutral-bg-color: #f9fafb;
    --fc-today-bg-color: #f5f9ff;
    padding: 0;
    border-radius: 0;
    background: #fff;
}

.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 16px !important;
    padding: 0;
    border-bottom: 0;
    background: #fff;
}

.fc .fc-toolbar-chunk:first-child {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fc .fc-toolbar-title {
    font-size: 22px !important;
    font-weight: 700;
    color: var(--order-text);
    letter-spacing: -0.03em;
}

.fc .fc-button,
.fc .fc-button-primary {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    border: 1px solid var(--order-border) !important;
    background: #fff !important;
    color: var(--t-grey700, #4e5968) !important;
    box-shadow: none !important;
}

.fc .fc-button:hover {
    background: #f9fafb !important;
    color: var(--order-text) !important;
}

.fc .fc-button .fc-icon {
    font-size: 0.95rem !important;
}

.fc .fc-scrollgrid {
    border-radius: 0;
}

.fc .fc-col-header-cell {
    background: #fff;
}

.fc .fc-col-header-cell-cushion {
    padding: 12px 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--t-grey700, #4e5968);
    text-decoration: none !important;
}

.fc .fc-day-sun .fc-col-header-cell-cushion { color: var(--order-red); }
.fc .fc-day-sat .fc-col-header-cell-cushion { color: var(--order-blue); }

.fc .fc-daygrid-day-frame {
    min-height: 140px;
    padding: 0;
}

/* 날짜(왼쪽) + 오더 건수(오른쪽) */
.fc .fc-daygrid-day-top {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10px 2px;
    min-height: 30px;
}

/* 공휴일명: 날짜 숫자 바로 옆, 건수는 계속 오른쪽 끝 */
.order-day-holiday {
    order: 1;
    margin: 0 auto 0 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--order-red);
    line-height: 1.2;
    word-break: keep-all;
}

/* 휴대폰: 칸이 좁아 공휴일명은 날짜 아래 줄로 (건수와 겹치지 않게) */
@media (max-width: 767.98px) {
    .fc .fc-daygrid-day-top { flex-wrap: wrap; }
    .order-day-holiday { order: 3; flex: 0 0 100%; margin: 3px 0 0; font-size: 10px; }
}

.order-count-badge {
    order: 2;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--order-blue);
    line-height: 1;
}

.fc .fc-daygrid-day-number {
    order: 1;
    padding: 0 !important;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--t-grey800, #333d4b);
    text-decoration: none !important;
    line-height: 1;
}

.fc-day-sun .fc-daygrid-day-number {
    color: var(--order-red) !important;
}

.fc-day-sat .fc-daygrid-day-number {
    color: var(--order-blue) !important;
}

.fc .fc-day-other {
    background: #f9fafb;
}

.fc .fc-day-other .fc-daygrid-day-number {
    color: var(--t-grey500, #8b95a1) !important;
    opacity: 1;
}

.fc .fc-day-other .fc-daygrid-day-top {
    opacity: 1;
}

.fc .fc-day-today {
    background: #f5f9ff !important;
}

.fc .fc-daygrid-day-events {
    margin: 0 !important;
    min-height: 0 !important;
}

.fc .fc-daygrid-day-bottom {
    display: none !important;
}

.fc .fc-event {
    display: none !important;
}

.order-cell-box {
    position: relative;
    padding: 4px 10px 10px;
}

.order-holiday-name {
    margin: 0 0 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--order-red);
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* 오더 한 줄: 말줄임(...) 없이 칸 안에서 줄바꿈 */
.order-item-preview {
    display: block;
    margin-bottom: 4px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--t-grey800, #333d4b);
    line-height: 1.4;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    cursor: pointer;
}

/* 발송완료(✓) 줄은 두 번째 줄부터 체크 폭만큼 들여쓰기 */
.order-item-preview:has(.order-item-sent-mark) {
    padding-left: 14px;
    text-indent: -14px;
}

.order-item-preview:hover {
    color: var(--order-blue);
}

.order-item-preview.worker {
    font-weight: 500;
    color: #777;
}

.order-item-preview.order-item-more {
    color: var(--t-grey500, #8b95a1);
    font-weight: 500;
}

.order-day-empty-space {
    height: 10px;
}

/* =========================
   Modal 공통
========================= */

.order-day-modal .modal-dialog,
.order-memo-modal .modal-dialog {
    max-width: 760px;
}

.order-day-modal .modal-content,
.order-memo-modal .modal-content {
    border-radius: 22px;
    border: 1px solid var(--order-border);
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.order-day-modal .modal-header,
.order-memo-modal .modal-header {
    border-bottom: 2px solid var(--order-pink);
    background: #fff;
    padding: 12px 14px;
}

.order-day-modal .modal-body,
.order-memo-modal .modal-body {
    padding: 0;
    background: #fff;
}

/* =========================
   일자 모달 헤더
========================= */

.order-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.order-day-header-left,
.order-day-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-circle-btn {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 2px solid var(--order-pink);
    background: #fff;
    color: var(--order-pink-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
}

.order-circle-btn:hover {
    background: var(--order-pink-soft);
}

.order-day-title {
    flex: 1 1 auto;
    text-align: center;
    color: var(--order-pink-dark);
    font-weight: 800;
    line-height: 1.3;
    font-size: 1.1rem;
}

.order-day-title small {
    display: block;
    margin-top: 3px;
    font-size: 0.9em;
    color: #d59aa0;
    font-weight: 700;
}

/* =========================
   일자 모달 리스트
========================= */

.order-day-list {
    max-height: 68vh;
    overflow-y: auto;
    background: #fff;
}

.order-day-item {
    position: relative;
    display: block;
    padding: 14px 108px 12px 18px;
    border-bottom: 1px solid #ececec;
    cursor: pointer;
    background: #fff;
}

.order-day-item:hover {
    background: #fff9f9;
}

.order-day-item-main {
    min-width: 0;
}

.order-day-item-title {
    font-size: 1.12rem;
    font-weight: 800;
    color: #333;
    line-height: 1.35;
    margin-bottom: 8px;
    word-break: keep-all;
}

.order-day-item-sub {
    font-size: 0.96rem;
    color: #4e5968;   /* 배정 직원: 진한 회색 (제목 #333 굵게와 구분) */
    font-weight: 500;
    line-height: 1.35;
    word-break: keep-all;
}

/* 발송 여부 배지 */
.order-sent-badge {
    display: inline-block;
    margin-right: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    vertical-align: middle;
    white-space: nowrap;
}

.order-sent-badge.sent {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7e0c3;
}

.order-sent-badge.unsent {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e0e2e6;
}

/* 캘린더 셀: 발송완료 표시 */
/* 발송완료 체크: 파란색 + 살짝 굵게 */
.order-item-sent-mark {
    display: inline-block;
    width: 14px;
    text-indent: 0;
    color: var(--order-blue, #3182f6);
    font-size: 0.85rem;
    font-weight: 700;
    -webkit-text-stroke: 0.4px currentColor;
    vertical-align: -1px;
}

/* 개인 재발송 목록 */
.memo-resend-info {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
    word-break: keep-all;
}

.memo-resend-all-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #555;
    margin-bottom: 8px;
    cursor: pointer;
}

.memo-resend-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.memo-resend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.memo-resend-item.is-disabled {
    background: #f7f7f8;
    color: #aaa;
    cursor: not-allowed;
}

.memo-resend-role {
    font-size: 0.74rem;
    font-weight: 800;
    color: #7c2d12;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 2px 8px;
    white-space: nowrap;
}

.memo-resend-name {
    font-weight: 700;
    color: #333;
}

.memo-resend-phone {
    margin-left: auto;
    font-size: 0.86rem;
    color: #888;
    white-space: nowrap;
}

.memo-resend-empty {
    padding: 14px;
    text-align: center;
    color: #999;
    font-size: 0.92rem;
}

.order-day-item-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-day-item-sms-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #ffffff;
    color: #111111;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.order-day-item-sms-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

/* =========================
   일자 모달 메뉴
========================= */

.order-day-item-menu-wrap {
    position: relative;
    z-index: 50;
}

.order-day-item-menu-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--order-border);
    border-radius: 10px;
    background: #fff;
    color: var(--order-pink-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.order-day-item-menu-btn:hover {
    background: var(--order-pink-soft);
}

.order-item-menu-pop {
    display: none;
    position: absolute;
    top: 50%;
    right: 44px;
    transform: translateY(-50%);
    min-width: 116px;
    padding: 6px;
    border: 1px solid var(--order-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
}

.order-item-menu-pop.show {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 스크롤 컨테이너(.order-day-list)에 잘리지 않도록 화면 기준으로 띄움 (JS에서 top/left 계산) */
.order-item-menu-pop.is-fixed {
    position: fixed;
    top: auto;
    right: auto;
    transform: none;
    z-index: 2000;
}

.order-item-menu-action {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: #f6f6f6;
    color: #333;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
    word-break: keep-all;
}

.order-item-menu-action:hover {
    background: #ececec;
}

.order-item-menu-action.danger {
    color: #d94a4a;
}

/* =========================
   클릭한 오더 바로 아래 상세
========================= */

.order-inline-summary {
    margin: 0;
    padding: 10px 14px 12px;
    border-bottom: 1px solid #ececec;
    background: #fbfbfc;
    animation: orderInlineSummarySlideDown 0.18s ease;
}

.order-inline-summary > div {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.order-inline-summary > div + div {
    margin-top: 4px;
}

.order-inline-summary b {
    flex: 0 0 44px;
    color: #6b7280;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.55;
}

.order-inline-summary span,
.order-inline-summary,
.order-inline-summary div {
    font-size: 13.5px;
    line-height: 1.55;
    color: #222;
    word-break: break-word;
}

@keyframes orderInlineSummarySlideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   메모 모달
========================= */

.memo-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.memo-top-left,
.memo-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.memo-top-center {
    flex: 1 1 auto;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--order-pink-dark);
}

.memo-form-wrap {
    padding: 8px 20px 24px 20px;
}

.memo-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 14px;
}

.memo-grid-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.memo-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.memo-section {
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f5;
}

.memo-section:first-child {
    padding-top: 4px;
}

.memo-section:last-child {
    border-bottom: 0;
    padding-bottom: 4px;
}

.memo-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.memo-field:last-child {
    margin-bottom: 0;
}

.memo-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

.memo-field-row:last-child {
    margin-bottom: 0;
}

.memo-field-row .memo-field {
    margin-bottom: 0;
}

.memo-field-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: -0.2px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 18px;
}

.memo-field-help {
    justify-content: center;
}

.memo-help-text {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.55;
}

.memo-link-btn {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
}

.memo-link-btn:hover {
    color: #111;
    background: #f1f3f5;
}

.memo-action-btn {
    appearance: none;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #1f2328;
    height: 44px;
    min-width: 64px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease;
    white-space: nowrap;
}

.memo-action-btn:hover:not(:disabled) {
    border-color: #c7c9cc;
    background: #f8f9fa;
}

.memo-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.memo-date-list {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.memo-date-list:empty {
    display: none;
}

.memo-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 12px;
    font-weight: 600;
    color: #111;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, opacity 0.12s ease;
}

.memo-date-chip:hover {
    border-color: #c7c9cc;
    background: #f8f9fa;
}

.memo-date-chip.excluded {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    text-decoration: line-through;
    opacity: 0.7;
}

.memo-date-chip .memo-date-chip-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #16a34a;
}

.memo-date-chip.excluded .memo-date-chip-dot {
    background: #d1d5db;
}

/* 날짜별 진입시간 */
.memo-date-time-help {
    font-size: 12px;
    color: #8a8f98;
    margin-bottom: 8px;
    line-height: 1.4;
}

.memo-date-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.memo-date-chip-label {
    white-space: nowrap;
}

.memo-date-chip-time {
    height: 28px;
    padding: 0 6px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    color: #1f2328;
    cursor: pointer;
}

.memo-date-chip-time:focus {
    outline: none;
    border-color: #9ca3af;
}

.memo-date-chip.excluded .memo-date-chip-time {
    background: #f3f4f6;
    color: #b9bec5;
}

.memo-input,
.memo-select {
    width: 100%;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    padding: 0 12px;
    font-size: 0.95rem;
    color: #1f2328;
    background: #fff;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.memo-input::placeholder {
    color: #b0b4ba;
}

.memo-input:focus,
.memo-select:focus {
    border-color: #1f2328;
    box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.08);
}

.memo-input[type="date"],
.memo-input[type="time"] {
    padding-right: 8px;
}

.memo-textarea {
    width: 100%;
    min-height: 220px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    resize: vertical;
    font-size: 0.95rem;
    color: #1f2328;
    background: #fff;
    line-height: 1.6;
    padding: 12px 14px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    font-family: inherit;
}

.memo-textarea:focus {
    border-color: #1f2328;
    box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.08);
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    padding: 0 6px 0 12px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #1f2328;
    box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.08);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    padding-left: 0;
    color: #1f2328;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #b0b4ba;
}

.select2-container--default .select2-selection__arrow {
    height: 42px;
    right: 6px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background: #fff !important;
    color: #000 !important;
}

.select2-results__option {
    white-space: normal;
    word-break: keep-all;
}

#memoVendor + .select2-container .select2-selection__rendered {
    line-height: 42px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 28px;
}

#memoSite + .select2-container .select2-selection--single {
    height: auto !important;
    min-height: 44px;
    padding-top: 4px;
    padding-bottom: 4px;
}

#memoSite + .select2-container .select2-selection__rendered {
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: unset !important;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    padding-right: 28px;
}

.memo-worker-picked {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 12px 0;
}

.memo-worker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.memo-worker-row-label {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
    min-width: 44px;
}

.memo-worker-row-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.memo-worker-row-empty {
    color: #aaa;
    font-size: 0.85rem;
    padding: 4px 0;
}

.memo-leader-change-btn {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #555;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
}

.memo-leader-change-btn:hover {
    background: #f4f4f4;
}

.memo-leader-unassigned-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
    margin-left: 6px;
    white-space: nowrap;
}

.memo-leader-unassigned-label input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.memo-worker-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f4f4f4;
    border: 1px solid #d8d8d8;
    font-size: 0.9rem;
    color: #333;
    line-height: 1;
}

.memo-worker-chip-leader {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #7c2d12;
    font-weight: 600;
}

.memo-worker-chip-remove {
    border: 0;
    background: transparent;
    color: #888;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.memo-worker-chip-leader .memo-worker-chip-remove {
    color: #c2410c;
}

.memo-worker-chip-remove:hover {
    color: #d94a4a;
}

/* 중복 등록 시도 시 이미 등록된 인원 강조 */
.memo-worker-chip-dup {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
    font-weight: 700;
    animation: memoWorkerDupBlink 0.45s ease-in-out 0s 3;
}

@keyframes memoWorkerDupBlink {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    50%  { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.memo-site-manager-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.memo-site-manager-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.memo-site-manager-label {
    font-size: 12px;
    color: #8a8a8a;
    margin-bottom: 4px;
}

.memo-site-manager-value {
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

.memo-grid-site-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.memo-grid-site-select {
    flex: 1 1 auto;
    min-width: 0;
}

.memo-grid-site-row #memoSiteEditBtn {
    flex: 0 0 auto;
}

/* 첨부 이미지 업로더 (여러 장) */
.memo-attachment-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1.5px dashed #d4d8de;
    border-radius: 12px;
    background: #fafbfc;
    transition: border-color 0.15s, background 0.15s;
}

.memo-attachment-grid.dragover {
    border-color: #2563eb;
    background: #eff4ff;
}

.memo-attachment-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.memo-attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 이미지 타일: 클릭 시 새 탭으로 원본 열기 */
.memo-attachment-image-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* PDF 등 파일 타일 */
.memo-attachment-file {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    text-decoration: none;
    background: #fdf2f2;
    color: #b42318;
    text-align: center;
}

.memo-attachment-file-icon {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border: 1.5px solid currentColor;
    border-radius: 4px;
    padding: 1px 5px;
}

.memo-attachment-file-name {
    font-size: 0.68rem;
    color: #555;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.memo-attachment-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
}

.memo-attachment-thumb-remove:hover {
    background: rgba(217, 74, 74, 0.95);
}

.memo-attachment-add {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1.5px solid #e0e3e8;
    border-radius: 10px;
    background: #fff;
    color: #8a8f98;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.memo-attachment-add:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f5f8ff;
}

.memo-attachment-add-plus {
    font-size: 26px;
    line-height: 1;
    font-weight: 300;
}

.memo-attachment-add-text {
    font-size: 0.72rem;
}

.memo-attachment-status {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #888;
}

.memo-grid-leader-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.memo-grid-leader-select {
    flex: 1 1 auto;
    min-width: 0;
}

.memo-grid-worker-row {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 10px;
    align-items: stretch;
}

.memo-grid-worker-select {
    min-width: 0;
}

.memo-grid-worker-note {
    min-width: 0;
}

.memo-grid-worker-note .memo-input {
    width: 100%;
}

#memoWorkerAddBtn {
    width: auto;
    min-width: 64px;
    padding: 0 16px;
    white-space: nowrap;
    line-height: 1;
}

/* =========================
   Responsive
========================= */

@media (max-width: 576px) {
    .fc .fc-toolbar.fc-header-toolbar {
        padding: 0;
    }

    .fc .fc-toolbar-title {
        font-size: 1.15rem !important;
    }

    .fc .fc-button {
        width: 34px;
        height: 34px;
        font-size: 0.9rem !important;
    }

    .fc .fc-daygrid-day-frame {
        min-height: 106px;
    }

    .fc .fc-daygrid-day-top {
        padding: 6px 4px 2px;
    }

    .order-cell-box {
        padding: 2px 4px 6px;
    }

    .order-holiday-name {
        font-size: 0.68rem;
    }

    .order-item-preview {
        font-size: 0.68rem;
    }

    .order-day-modal .modal-dialog,
    .order-memo-modal .modal-dialog {
        max-width: calc(100% - 16px);
        margin: 10px auto;
    }

    .order-circle-btn {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }

    .order-day-item {
        padding: 14px 92px 12px 16px;
    }

    .order-day-item-title {
        font-size: 1rem;
    }

    .order-day-item-actions {
        top: 12px;
        right: 12px;
        gap: 6px;
    }

    .order-day-item-sms-btn,
    .order-day-item-menu-btn {
        width: 34px;
        height: 34px;
    }

    .order-inline-summary {
        padding: 10px 12px 12px;
    }

    .order-inline-summary b {
        flex-basis: 40px;
    }

    .memo-textarea {
        min-height: 240px;
    }

    .memo-grid-2 {
        grid-template-columns: 1fr;
    }

    .memo-site-manager-box {
        flex-direction: column;
    }

    .memo-field-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .memo-grid-worker-row {
        grid-template-columns: 1fr 100px auto;
        gap: 8px;
    }

    .memo-form-wrap {
        padding: 8px 14px 20px 14px;
    }
}

/* =========================
   모바일 월간 달력: 칸이 좁아 이름이 한두 글자씩 세로로 늘어지던 문제
   → 칸 안엔 건수만 크게, 날짜를 누르면 일자 팝업에서 목록 확인
   (PC 화면은 그대로)
========================= */
.order-cell-count-m { display: none; }

@media (max-width: 767.98px) {
    .fc .fc-daygrid-day-frame { min-height: 72px !important; }
    .fc .fc-daygrid-day-top { padding: 5px 4px 0 !important; min-height: 0; justify-content: center; }
    .fc .fc-daygrid-day-number { font-size: 12px; }

    /* 이름 목록·윗줄 건수는 숨기고 */
    .order-cell-box .order-item-preview,
    .order-cell-box .order-day-empty-space,
    .fc .fc-daygrid-day-top .order-count-badge { display: none !important; }

    .order-cell-box { padding: 4px 3px 6px !important; text-align: center; }

    /* 건수 뱃지 */
    .order-cell-count-m {
        display: inline-flex; align-items: baseline; justify-content: center; gap: 1px;
        min-width: 34px; padding: 4px 6px; border-radius: 8px;
        background: var(--t-blue-light, #e8f3ff); color: var(--t-blue-dark, #1b64da);
        line-height: 1; cursor: pointer; flex-wrap: wrap;
    }
    .order-cell-count-m .cnt { font-size: 15px; font-weight: 800; }
    .order-cell-count-m .unit { font-size: 10px; font-weight: 600; }
    .order-cell-count-m .sent {
        flex: 0 0 100%; margin-top: 3px; font-size: 10px; font-weight: 600; color: var(--t-green, #03a678);
    }
    .order-cell-count-m .sent i { font-size: 10px; }
    /* 전부 발송완료면 초록 */
    .order-cell-count-m.is-all-sent { background: var(--t-green-light, #e5f8f1); color: var(--t-green, #03a678); }
    .order-cell-count-m .sent-all { font-size: 11px; margin-left: 1px; }

    .fc .fc-day-other .order-cell-count-m { opacity: .55; }
}

/* =========================
   일자 팝업(오더표 상세) — 토스 테마 톤으로 정리
   - 제목은 한 줄(10월 10일 (토)), 연도·공휴일은 아래 작은 글씨
   - 발송 배지는 제목 위 줄로 분리 → 제목이 배지 옆에서 어색하게 줄바꿈되지 않게
========================= */
.order-day-modal .modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}
.order-day-modal .modal-header {
    border-bottom: 1px solid var(--t-grey200, #e5e8eb);
    padding: 12px 14px;
}
.order-day-modal .order-day-header { gap: 8px; }
.order-day-modal .order-day-header-left,
.order-day-modal .order-day-header-right { gap: 6px; flex: 0 0 auto; }

.order-day-modal .order-day-title {
    min-width: 0;
    color: var(--t-grey900, #191f28);
    line-height: 1.2;
}
.order-day-modal .order-day-title-main {
    display: block;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.order-day-modal .order-day-title-main .wk { font-weight: 600; color: var(--t-grey600, #6b7684); }
.order-day-modal .order-day-title-main.is-sun .wk { color: var(--t-red, #f04452); }
.order-day-modal .order-day-title-main.is-sat .wk { color: var(--t-blue, #3182f6); }
.order-day-modal .order-day-title small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 500;
    color: var(--t-grey500, #8b95a1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 목록 */
.order-day-modal .order-day-item {
    padding: 14px 100px 14px 18px;
    border-bottom: 1px solid var(--t-grey100, #f2f4f6);
}
.order-day-modal .order-day-item:last-child { border-bottom: 0; }
.order-day-modal .order-day-item:hover { background: var(--t-grey50, #f9fafb); }

.order-day-modal .order-day-item-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--t-grey900, #191f28);
    line-height: 1.4;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.order-day-modal .order-day-item-sub {
    font-size: 13px;
    color: var(--t-grey700, #4e5968);
    font-weight: 500;
}

/* 발송 배지: 제목 위 한 줄 */
.order-day-modal .order-day-item-title .order-sent-badge {
    display: table;
    margin: 0 0 6px;
    padding: 3px 8px;
    border: 0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.3;
}
.order-day-modal .order-sent-badge.sent { background: var(--t-green-light, #e5f8f1); color: var(--t-green, #03a678); }
.order-day-modal .order-sent-badge.unsent { background: var(--t-grey100, #f2f4f6); color: var(--t-grey600, #6b7684); }

/* 오른쪽 버튼 (문자 / 메뉴) */
.order-day-modal .order-day-item-actions { top: 14px; right: 14px; gap: 6px; }
.order-day-modal .order-day-item-sms-btn,
.order-day-modal .order-day-item-menu-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: var(--t-grey100, #f2f4f6);
    color: var(--t-grey700, #4e5968);
    box-shadow: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.order-day-modal .order-day-item-sms-btn:hover,
.order-day-modal .order-day-item-menu-btn:hover { background: var(--t-grey200, #e5e8eb); color: var(--t-grey900, #191f28); }

@media (max-width: 576px) {
    .order-day-modal .modal-header { padding: 10px 10px; }
    .order-day-modal .order-day-header { gap: 6px; }
    .order-day-modal .order-day-header-left,
    .order-day-modal .order-day-header-right { gap: 4px; }
    .order-day-modal .order-circle-btn { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
    .order-day-modal .order-day-title-main { font-size: 1rem; }
    .order-day-modal .order-day-title small { font-size: 11px; }

    .order-day-modal .order-day-item { padding: 13px 92px 13px 16px; }
    .order-day-modal .order-day-item-title { font-size: 15px; }
    .order-day-modal .order-day-item-actions { top: 13px; right: 12px; }
    .order-day-modal .order-day-item-sms-btn,
    .order-day-modal .order-day-item-menu-btn { width: 34px; height: 34px; }
}

/* =========================
   오더 입력: 우측 팀장·팀원 배정 현황
========================= */
@media (min-width: 992px) {
    .order-memo-modal .modal-dialog {
        max-width: 1080px;
    }
}

.memo-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    align-items: start;
}

.memo-roster {
    position: sticky;
    top: 0;
    border-left: 1px solid var(--order-border);
    background: #fafbfc;
    padding: 14px 16px 20px;
    min-height: 100%;
    font-size: 0.88rem;
}

.memo-roster-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #2f2f2f;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.memo-roster-title small {
    font-weight: 500;
    color: #8b95a1;
}

.memo-roster-card {
    background: #fff;
    border: 1px solid var(--order-border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.memo-roster-card.is-current {
    border-color: #2f2f2f;
}

.memo-roster-card-head {
    font-weight: 700;
    margin-bottom: 6px;
    color: #333;
    word-break: break-all;
}

.memo-roster-row {
    display: flex;
    gap: 6px;
    padding: 2px 0;
}

.memo-roster-role {
    flex: 0 0 34px;
    color: #8b95a1;
}

.memo-roster-role.is-leader {
    color: #1e63c6;
    font-weight: 700;
}

.memo-roster-names {
    flex: 1;
    min-width: 0;
}

.memo-roster-names ol {
    margin: 0;
    padding-left: 18px;
}

.memo-roster-empty {
    color: #b0b8c1;
}

.memo-roster-section {
    margin-top: 14px;
    font-weight: 700;
    color: #6b7684;
    font-size: 0.82rem;
    margin-bottom: 6px;
}

@media (max-width: 991.98px) {
    .memo-layout {
        grid-template-columns: 1fr;
    }

    .memo-roster {
        position: static;
        border-left: 0;
        border-top: 1px solid var(--order-border);
    }
}

/* =========================
   오더 입력(현장정보) 콤팩트 모드: 칸 높이·여백 축소 → 한 화면에 보이게
   (#orderMemoModal 안에서만 적용)
========================= */
#orderMemoModal .modal-header { padding: 8px 14px; }
#orderMemoModal .memo-top-center { font-size: 1.15rem; }
#orderMemoModal .memo-form-wrap { padding: 4px 18px 14px 18px; }

#orderMemoModal .memo-section { padding: 9px 0; }
#orderMemoModal .memo-section:first-child { padding-top: 2px; }
#orderMemoModal .memo-field { gap: 3px; margin-bottom: 7px; }
#orderMemoModal .memo-field:last-child { margin-bottom: 0; }
#orderMemoModal .memo-field-row { gap: 10px; margin-bottom: 7px; }
#orderMemoModal .memo-field-row:last-child { margin-bottom: 0; }
#orderMemoModal .memo-field-label { font-size: 11.5px; min-height: 16px; }
#orderMemoModal .memo-help-text { font-size: 11.5px; line-height: 1.4; }

/* 입력칸·셀렉트·버튼 44px → 36px */
#orderMemoModal .memo-input,
#orderMemoModal .memo-select { height: 36px; border-radius: 8px; font-size: 0.9rem; padding: 0 10px; }
#orderMemoModal .memo-action-btn { height: 36px; border-radius: 8px; }
#orderMemoModal .select2-container--default .select2-selection--single { height: 36px; border-radius: 8px; }
#orderMemoModal .select2-container--default .select2-selection--single .select2-selection__rendered,
#orderMemoModal #memoVendor + .select2-container .select2-selection__rendered { line-height: 34px !important; font-size: 0.9rem; }
#orderMemoModal .select2-container--default .select2-selection__arrow { height: 34px; }
#orderMemoModal #memoSite + .select2-container .select2-selection--single { min-height: 36px; padding-top: 2px; padding-bottom: 2px; }
#orderMemoModal #memoSite + .select2-container .select2-selection__rendered { line-height: 1.3 !important; }

/* 기간 날짜칩 */
#orderMemoModal .memo-date-list { margin-top: 8px; }
#orderMemoModal .memo-date-chip { padding: 4px 10px; }
#orderMemoModal .memo-date-chip-time { height: 24px; }

/* 담당자/연락처: 한 줄로 */
#orderMemoModal .memo-site-manager-box { margin-top: 6px; margin-bottom: 0; gap: 8px; }
#orderMemoModal .memo-site-manager-item { flex: 0 0 auto; flex-direction: row; align-items: baseline; gap: 6px; padding: 6px 10px; border-radius: 8px; }
#orderMemoModal .memo-site-manager-label { margin-bottom: 0; white-space: nowrap; }
#orderMemoModal .memo-site-manager-value { font-size: 13px; }

/* 선택된 팀장·팀원 칩 */
#orderMemoModal .memo-worker-picked { gap: 4px; margin: 4px 0 0 0; }
#orderMemoModal .memo-worker-chip { padding: 4px 9px; font-size: 0.85rem; }

/* 내용·첨부 */
#orderMemoModal .memo-textarea { min-height: 120px; padding: 8px 10px; line-height: 1.5; font-size: 0.9rem; }
#orderMemoModal .memo-attachment-grid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; padding: 8px; margin-top: 4px; }
#orderMemoModal .memo-attachment-add-plus { font-size: 20px; }

/* 1줄: [업체] [담당자 · 연락처]  /  2줄: [현장 주소 ................][수정] */
#orderMemoModal .memo-section-site .memo-grid-site-select { min-width: 0; overflow: hidden; }
@media (min-width: 768px) {
    #orderMemoModal .memo-section-site {
        display: grid;
        grid-template-columns: 240px minmax(0, 1fr);
        grid-template-areas: "vendor manager" "site site";
        column-gap: 10px;
    }
    #orderMemoModal .memo-section-site > .memo-field:nth-child(1) { grid-area: vendor; margin-bottom: 7px; }
    #orderMemoModal .memo-section-site > .memo-field:nth-child(2) { grid-area: site; margin-bottom: 0; max-width: 620px; }
    #orderMemoModal .memo-section-site > .memo-site-manager-box { grid-area: manager; align-self: end; justify-self: start; margin: 0 0 7px 0; }
    #orderMemoModal .memo-section-site .memo-site-manager-item { height: 36px; align-items: center; }
}

/* 우측 현황도 같이 촘촘하게 */
#orderMemoModal .memo-roster { padding: 10px 12px 14px; font-size: 0.84rem; }
#orderMemoModal .memo-roster-card { padding: 7px 10px; margin-bottom: 7px; border-radius: 10px; }
#orderMemoModal .memo-roster-card-head { margin-bottom: 3px; }
#orderMemoModal .memo-roster-row { padding: 1px 0; }
#orderMemoModal .memo-roster-section { margin-top: 10px; }

/* =========================
   팀장 | 팀원 한 줄 + 담당자·연락처 붙이기 + 현장 주소 한 줄
========================= */
@media (min-width: 992px) {
    .order-memo-modal .modal-dialog { max-width: 980px; }
}

@media (min-width: 768px) {
    /* [팀장 셀렉트][미지정] | [팀원 셀렉트][내용][추가] */
    #orderMemoModal .memo-section-team {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
        column-gap: 12px;
        align-items: end;
    }
    #orderMemoModal .memo-section-team > .memo-field { margin-bottom: 0; }
    #orderMemoModal .memo-section-team > .memo-worker-picked { grid-column: 1 / -1; margin-top: 6px; }
    #orderMemoModal .memo-grid-leader-row { gap: 6px; }
    #orderMemoModal .memo-leader-unassigned-label { margin-left: 0; }
    #orderMemoModal .memo-grid-worker-row { grid-template-columns: minmax(0, 1fr) 110px auto; gap: 6px; }
    #orderMemoModal #memoWorkerAddBtn { min-width: 52px; padding: 0 12px; }

    /* 팀장 | 팀원 칩도 한 줄에 */
    #orderMemoModal .memo-worker-picked { flex-direction: row; flex-wrap: wrap; column-gap: 20px; }
}

/* 담당자 · 연락처를 바짝 붙여서 (칸 나누지 않고 한 덩어리) */
#orderMemoModal .memo-site-manager-box { gap: 0; }
#orderMemoModal .memo-site-manager-box .memo-site-manager-item:first-child { border-radius: 8px 0 0 8px; border-right: 0; padding-right: 4px; }
#orderMemoModal .memo-site-manager-box .memo-site-manager-item:last-child { border-radius: 0 8px 8px 0; border-left: 0; padding-left: 4px; }
#orderMemoModal .memo-site-manager-box .memo-site-manager-item:last-child::before { content: "·"; color: #b0b4ba; margin-right: 4px; }

/* 현장(주소) 선택값: 두 줄 → 한 줄 말줄임 (전체 주소는 마우스 올리면 툴팁) */
#orderMemoModal #memoSite + .select2-container .select2-selection--single { height: 36px !important; min-height: 36px; padding-top: 0; padding-bottom: 0; }
#orderMemoModal #memoSite + .select2-container .select2-selection__rendered {
    display: block !important;
    line-height: 34px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    -webkit-line-clamp: unset;
}

/* =========================
   우측 인력 현황: 미가동 인력(위) / 오늘 투입 인력(아래)
========================= */
#orderMemoModal .memo-roster-section {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    font-size: 0.86rem;
    color: #333;
    margin: 12px 0 6px;
}
#orderMemoModal .memo-roster-section b { color: #1e63c6; }
#orderMemoModal .memo-roster-section.is-idle { margin-top: 4px; }
#orderMemoModal .memo-roster-section.is-idle b { color: #d9480f; }
#orderMemoModal .memo-roster-section small { font-weight: 400; color: #9ca3af; font-size: 0.74rem; }
#orderMemoModal .memo-roster-sub { font-size: 0.78rem; color: #9ca3af; margin: 8px 0 4px; }

#orderMemoModal .memo-roster-idle-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
#orderMemoModal .memo-roster-idle {
    appearance: none;
    border: 1px solid #ffc9a8;
    background: #fff4ec;
    color: #b3420b;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 0.8rem;
    line-height: 1.3;
    cursor: pointer;
}
#orderMemoModal .memo-roster-idle:hover { background: #ffe4d1; border-color: #ff9f66; }
#orderMemoModal .memo-roster-idle.is-off {
    border-color: #e5e7eb;
    background: #f3f4f6;
    color: #9ca3af;
    cursor: default;
}

#orderMemoModal .memo-roster-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 0.8rem; }
#orderMemoModal .memo-roster-table td { border-bottom: 1px solid #eef0f2; padding: 4px 4px; vertical-align: top; }
#orderMemoModal .memo-roster-table tr.is-current td { background: #f1f6ff; }
#orderMemoModal .memo-roster-t-name { white-space: nowrap; font-weight: 600; }
#orderMemoModal .memo-roster-t-role { white-space: nowrap; color: #8b95a1; width: 34px; }
#orderMemoModal .memo-roster-t-role.is-leader { color: #1e63c6; font-weight: 700; }
#orderMemoModal .memo-roster-t-order { color: #6b7684; word-break: break-all; }

/* =========================
   오더 입력 팝업 로딩: 스켈레톤 + 상단 진행 바
   (팝업을 먼저 띄우고, 데이터가 오면 걷힘)
========================= */
#orderMemoModal .modal-content { position: relative; }

.memo-loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20;
    background: #fff;
    overflow: hidden;
    border-radius: inherit;
}
.memo-loading.is-on { display: block; }

.memo-loading-bar { height: 3px; background: #eef0f2; }
.memo-loading-bar-fill {
    height: 100%;
    width: 0;
    background: #1e63c6;
    transition: width 0.35s ease;
}

.memo-loading-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 2px solid var(--order-pink);
}
.memo-loading-text { font-size: 0.95rem; font-weight: 700; color: #6b7280; }

.memo-sk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.memo-sk-form { padding: 12px 18px; display: flex; flex-direction: column; gap: 12px; }
.memo-sk-roster {
    border-left: 1px solid var(--order-border);
    background: #fafbfc;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.memo-sk-row { display: flex; gap: 10px; align-items: flex-end; }
.memo-sk-field { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.sk {
    display: block;
    border-radius: 8px;
    background: linear-gradient(90deg, #eef0f3 25%, #f7f8fa 50%, #eef0f3 75%);
    background-size: 200% 100%;
    animation: memo-sk-shimmer 1.2s ease-in-out infinite;
}
.sk-label { width: 56px; height: 11px; border-radius: 4px; }
.sk-input { height: 36px; }
.sk-textarea { height: 110px; }
.sk-chip { width: 64px; height: 24px; border-radius: 999px; }
.sk-line { height: 22px; border-radius: 6px; }
.sk-circle { width: 34px; height: 34px; border-radius: 50%; }

@keyframes memo-sk-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (max-width: 991.98px) {
    .memo-sk-layout { grid-template-columns: 1fr; }
    .memo-sk-roster { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sk { animation: none; }
    .memo-loading-bar-fill { transition: none; }
}

/* =========================
   오더 입력 팝업: 왼쪽(현장정보) / 오른쪽(인력 현황) 스크롤 분리 (PC)
   - 팝업 몸통은 고정, 각 칸이 자기 안에서만 스크롤
========================= */
@media (min-width: 992px) {
    #orderMemoModal .modal-body {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    #orderMemoModal .memo-layout {
        flex: 1 1 auto;
        min-height: 0;
        grid-template-rows: minmax(0, 1fr);
    }
    #orderMemoModal .memo-layout > .memo-form-wrap,
    #orderMemoModal .memo-layout > .memo-roster {
        min-height: 0;
        max-height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    #orderMemoModal .memo-roster {
        position: static;
        align-self: stretch;
    }
}
