.modal{display:none;position:fixed;z-index:2000;left:0;top:0;width:100%;height:100%;background:rgba(0,0,0,.5);}
.modal.show{display:flex;align-items:center;justify-content:center;}
.modal-content{background:#fff;border-radius:22px;width:90%;max-height:90vh;overflow-y:auto;box-shadow:0 10px 40px rgba(0,0,0,.15);}
.modal-head{background:#fff;color:#1f2937;padding:22px 28px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e5e7eb;border-radius:22px 22px 0 0;}
.modal-head h3{margin:0;display:flex;align-items:center;gap:7px;font-size:2rem;}
.modal-close{font-size:3.2rem;cursor:pointer;color:#6b7280;line-height:1;}.modal-close:hover{color:#374151;}
.modal-tbl{width:100%;border-collapse:collapse;}
.modal-tbl th,.modal-tbl td{padding:10px 14px;font-size:1.4rem;border-bottom:1px solid #E5DDD2;vertical-align:middle;}
.modal-tbl th{font-weight:600;color:#4D433B;background:#F5EFE7;text-align:left;white-space:nowrap;}
.modal-tbl th em{color:#A56657;}
.modal-tbl td input,.modal-tbl td select,.modal-tbl td textarea{width:100%;height:36px;padding:0 10px;font-size:1.3rem;border:1px solid #D0C5B6;border-radius:3px;background:#fff;}
.modal-tbl td textarea{height:auto;padding:5px 7px;resize:vertical;}
.modal-tbl td select{cursor:pointer;appearance:none !important;}
.modal-list-tbl{width:100%;border-collapse:collapse;font-size:1.4rem;}
.modal-list-tbl th{padding:6px 8px;background:#E8DFD3;color:#4D433B;font-weight:600;text-align:center;border-bottom:1px solid #D0C5B6;}
.modal-list-tbl td{padding:6px 8px;text-align:center;border-bottom:1px solid #E5DDD2;}
.modal-list-tbl tbody tr:hover td{background:#F5F0E8;}
.modal-btns{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid #E5DDD2;position:sticky;bottom:0;background:#fff;z-index:5;box-shadow:0 -2px 6px rgba(0,0,0,.05);}
.modal-btn-cancel{height:38px;padding:0 20px;font-size:1.4rem;font-weight:600;background:#fff;color:var(--text-primary);border:1px solid #D0C5B6;border-radius:var(--radius-md,4px);cursor:pointer;}
.modal-btn-cancel:hover{background:#F5EFE7;}
.modal-btn-save{height:38px;padding:0 22px;font-size:1.4rem;font-weight:700;background:var(--brand-accent,#8A9A86);color:#fff;border:none;border-radius:var(--radius-md,4px);cursor:pointer;}
.modal-btn-save:hover{opacity:.88;}
.modal-btn-delete{height:28px;padding:0 10px;font-size:1.1rem;font-weight:600;background:#A56657;color:#fff;border:none;border-radius:3px;cursor:pointer;}
.modal-btn-delete:hover{opacity:.85;}
.modal-btn-add{height:34px;padding:0 14px;font-size:1.2rem;font-weight:600;background:#388f9e;color:#fff;border:none;border-radius:var(--radius-md,4px);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;}
.modal-btn-add:hover{opacity:.85;}
/* 승계자 카드 */
.suc-card{background:#F9F7F3;border:1px solid #E5DDD2;border-radius:var(--radius-md,4px);padding:10px 12px;margin-bottom:8px;position:relative;}
.suc-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;font-size:1.2rem;font-weight:700;color:#4D433B;}
.suc-card-del{color:#A56657;cursor:pointer;font-size:1.1rem;border:none;background:none;}
.suc-card-row{display:flex;gap:8px;margin-bottom:4px;}
.suc-card-row label{font-size:1.1rem;font-weight:600;color:#6B5F53;width:70px;flex-shrink:0;padding-top:4px;}
.suc-card-row input{flex:1;height:28px;padding:0 7px;font-size:1.15rem;border:1px solid #D0C5B6;border-radius:3px;}
.schedule-modal-content{overflow:hidden;}
.schedule-modal .sch-write-form{display:flex;min-height:520px;background:linear-gradient(180deg,#F8F4EE 0%,#FFFDF9 100%);}
.schedule-modal .schedule-modal-calendar-wrap{width:360px;padding:24px 22px;border-right:1px solid #E7DDD0;background:linear-gradient(180deg,#F2EADF 0%,#FBF8F3 100%);}
.schedule-modal .data-wrap{flex:1;padding:26px 28px 24px;}
.schedule-modal .schedule-form-head strong{display:block;font-size:1.9rem;font-weight:800;color:#332C26;}
.schedule-modal .schedule-form-head p{margin-top:8px;font-size:1.2rem;line-height:1.5;color:#6A5D51;}
.schedule-modal .schedule-quick-actions{display:flex;gap:8px;margin:18px 0 16px;}
.schedule-modal .schedule-quick-btn{height:34px;padding:0 14px;border:1px solid #D9CCBB;border-radius:999px;background:#fff;color:#6A5D51;font-size:1.15rem;font-weight:700;cursor:pointer;transition:all .2s ease;}
.schedule-modal .schedule-quick-btn.is-active{background:#7C6650;border-color:#7C6650;color:#fff;}
.schedule-modal .schedule-form-table{width:100%;border-collapse:collapse;border-top:1px solid #D9CCBB;border-bottom:1px solid #E7DDD0;}
.schedule-modal .schedule-form-table th,.schedule-modal .schedule-form-table td{padding:14px 12px;border-bottom:1px solid #EFE7DC;vertical-align:top;}
.schedule-modal .schedule-form-table th{width:120px;background:#FBF8F3;color:#4D433B;font-size:1.25rem;font-weight:700;text-align:left;}
.schedule-modal .schedule-form-table td{background:#fff;}
.schedule-modal .schedule-form-table td input,.schedule-modal .schedule-form-table td textarea{width:100%;border:1px solid #D7CAB8;border-radius:8px;background:#FFFEFC;color:#332C26;font-size:1.2rem;}
.schedule-modal .schedule-form-table td input{height:42px;padding:0 12px;}
.schedule-modal .schedule-form-table td textarea{min-height:180px;padding:12px;line-height:1.6;resize:vertical;}
.schedule-modal .schedule-form-table td span{display:inline-flex;align-items:center;justify-content:center;width:30px;font-size:1.3rem;color:#7A6A5A;}
.schedule-modal .schedule-form-table td .schedule-date-field{display:flex;align-items:center;gap:10px;}
.schedule-modal .schedule-meta{margin-top:14px;padding:12px 14px;border-radius:10px;background:#F5EFE7;color:#5E5247;font-size:1.18rem;line-height:1.5;}
.schedule-modal .schedule-form-btns{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:18px;}
.schedule-modal .btn-save{height:38px;padding:0 20px;border:none;border-radius:8px;background:#7C6650;color:#fff;font-size:1.2rem;font-weight:800;cursor:pointer;}
.schedule-modal .btn-save:hover{background:#64513F;}
.schedule-modal .schedule-modal-calendar .month{margin-bottom:16px;display:flex;align-items:center;justify-content:center;gap:10px;}
.schedule-modal .schedule-modal-calendar .month button{width:30px;height:30px;border: 1px solid #E0D5C8;border-radius:var(--radius-md);background:#fff;color:#6D5D4D;cursor:pointer;}
.schedule-modal .schedule-modal-calendar .month button i{pointer-events:none;}
.schedule-modal .schedule-modal-calendar .month .today-date{display: flex;min-width:145px;justify-content: center;align-items: center;font-size:1.6rem;font-weight:800;color:#332C26;cursor:pointer;}
.schedule-modal .schedule-modal-calendar .weekdays,.schedule-modal .schedule-modal-calendar .dates{display:flex;flex-wrap:wrap;}
.schedule-modal .schedule-modal-calendar .weekdays{margin-bottom:12px;}
.schedule-modal .schedule-modal-calendar .weekdays > div{width:14.28%;text-align:center;font-size:1.15rem;font-weight:700;color:#7F7061;}
.schedule-modal .schedule-modal-calendar .weekdays .sun{color:#BE5E4A;}
.schedule-modal .schedule-modal-calendar .weekdays .sat{color:#6C7EA1;}
.schedule-modal .schedule-modal-calendar .date{width:14.28%;margin-bottom:8px;}
.schedule-modal .schedule-modal-calendar .date-btn{position:relative;width:100%;height:42px;border:none;background:transparent;cursor:pointer;}
.schedule-modal .schedule-modal-calendar .day-number{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;font-size:1.2rem;color:#5B5147;transition:all .2s ease;}
.schedule-modal .schedule-modal-calendar .day-number.other{opacity:.3;}
.schedule-modal .schedule-modal-calendar .day-number.is-today{border:1px solid #B79D82;}
.schedule-modal .schedule-modal-calendar .day-number.is-selected{background:#7C6650;color:#fff;font-weight:800;}
.schedule-modal .schedule-modal-calendar .day-number.has-event:not(.is-selected){background:#EADDCF;color:#6A5441;font-weight:800;}
.schedule-modal .schedule-modal-calendar .event-dot{position:absolute;right:7px;top:4px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#A56657;color:#fff;font-size:1rem;font-style:normal;line-height:16px;text-align:center;}
@media (max-width: 900px){
    .schedule-modal .sch-write-form{display:block;min-height:0;}
    .schedule-modal .schedule-modal-calendar-wrap{width:100%;border-right:none;border-bottom:1px solid #E7DDD0;}
    .schedule-modal .data-wrap{padding:20px 18px 18px;}
}

.import-modal-content {
    max-width: 820px !important;
}
.import-modal-body {
    padding: 16px 18px 18px;
}
.import-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.import-search-row input {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d1d5db;
}
.import-search-btn {
    height: 36px;
    padding: 0 14px;
}
.import-list-wrap {
    max-height: 360px;
    overflow-y: auto;
    border-top: 1px solid #e5e7eb;
}
.import-list-table {
    width: 100%;
    border-collapse: collapse;
}
.import-list-table th,
.import-list-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1.3rem;
    text-align: center;
}
.import-list-table tbody tr {
    cursor: pointer;
}
.import-list-table tbody tr:hover {
    background: #f8fafc;
}
.import-empty-row {
    padding: 24px 10px;
    color: #6b7280;
}
.import-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.import-badge.temp {
    background: #2563eb;
}
.import-badge.move {
    background: #16a34a;
}

.mfee-modal-content {
    max-width: 980px !important;
    max-height: 90vh;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.mfee-modal-content .modal-head {
    background: #fff;
    color: #1f2937;
    padding: 22px 28px;
    border-bottom: 1px solid #e5e7eb;
}
.mfee-modal-content .modal-head h3 {
    font-size: 2rem;
    gap: 0;
}
.mfee-modal-content .modal-head i {
    display: none;
}
.mfee-modal-content .modal-close {
    color: #6b7280;
    font-size: 3.2rem;
    line-height: 1;
}
.mfee-modal-body {
    padding: 28px 30px 30px;
    overflow-y: auto;
    flex: 1;
}
.mfee-list-wrap {
    border-top: 2px solid #666;
}
.mfee-list-table {
    width: 100%;
    border-collapse: collapse;
}
.mfee-list-table th,
.mfee-list-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    font-size: 1.35rem;
}
.mfee-list-table thead th {
    background: #fafafa;
    font-weight: 700;
}
.mfee-list-table tbody tr.is-selected {
    background: #f6fbf6;
}
.mfee-list-table .ta-r {
    text-align: right;
}
.mfee-list-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    opacity: 1 !important;
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
    cursor: pointer;
    accent-color: #2d9e5f;
}
.mfee-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0 0;
}
.mfee-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mfee-action-btn {
    min-width: 126px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid #7a9469;
    background: #7a9469;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
}
.mfee-action-btn.secondary {
    border-color: #d1d5db;
    background: #fff;
    color: #475569;
}
.mfee-action-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.mfee-section {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #e5e7eb;
}
.mfee-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 0;
}
.mfee-section-title {
    margin: 0 0 4px;
    color: #111827;
    font-size: 1.8rem;
    font-weight: 800;
}
.mfee-section-desc {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 1.3rem;
}
.mfee-form-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.mfee-form-table th,
.mfee-form-table td {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    font-size: 1.35rem;
}
.mfee-form-table th {
    background: #fafafa;
    font-weight: 700;
    text-align: center;
}
.mfee-form-table td input,
.mfee-form-table td select,
.mfee-form-table td textarea {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    font-size: 1.35rem;
}
.mfee-form-table td textarea {
    min-height: 110px;
    padding: 12px;
    resize: vertical;
}
.mfee-radio-group {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}
.mfee-radio-group label,
.mfee-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
}
.mfee-radio-group input,
.mfee-check-label input {
    width: 18px !important;
    min-height: 18px !important;
    height: 18px;
}
.mfee-submit-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.mfee-submit-btn {
    min-width: 130px;
    height: 40px;
    border: none;
    background: #2f8fa1;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
}
@media (max-width: 900px) {
    .mfee-modal-body {
        padding: 18px 16px 20px;
    }
    .mfee-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .mfee-toolbar-group {
        width: 100%;
        justify-content: stretch;
    }
    .mfee-action-btn {
        flex: 1;
        min-width: 0;
    }
    .mfee-form-table,
    .mfee-form-table tbody,
    .mfee-form-table tr,
    .mfee-form-table th,
    .mfee-form-table td {
        display: block;
        width: 100%;
    }
    .mfee-form-table th {
        text-align: left;
        border-bottom: none;
    }
    .mfee-form-table td {
        border-top: none;
    }
}
