:root {
    --easy-color: #43cea2;
    --phone-color: #ff7e5f;
    --certificate-color: #654ea3;
}

/*.board-list th {*/
/*    border-top: 0;*/
/*    flex-wrap: wrap;*/
/*    word-break: keep-all;*/
/*}*/

/*.board-list tr {*/
/*    cursor: default !important;*/
/*}*/

/*.board-list tr:last-child td {*/
/*    border-bottom: none;*/
/*}*/

.auth-modal-popup .auth-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 100%;
    background: white;
    text-align: center;
    padding: 25px 15px;
    position: relative;
}

.auth-modal-popup .auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.auth-modal-popup .auth-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}

.auth-modal-popup .easy-auth .auth-icon {
    background: linear-gradient(135deg, var(--easy-color) 0%, #185a9d 100%);
}

.auth-modal-popup .phone-auth .auth-icon {
    background: linear-gradient(135deg, var(--phone-color) 0%, #feb47b 100%);
}

.auth-modal-popup .certificate-auth .auth-icon {
    background: linear-gradient(135deg, var(--certificate-color) 0%, #da98b4 100%);
}

.auth-modal-popup .auth-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    font-size: 18px;
}

.auth-modal-popup .auth-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.auth-modal-popup .modal-header {
    border-bottom: none;
    padding-bottom: 0;
    position: relative;
}

.auth-modal-popup .modal-title {
    font-weight: 700;
    color: #333;
    text-align: center;
    width: 100%;
    padding: 0 40px;
}

.auth-modal-popup .modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.auth-modal-popup .modal-body {
    padding: 25px;
    min-height: 300px;
}

.auth-modal-popup .modal-footer {
    border-top: none;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 30px;
}

.auth-modal-popup .btn-close {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 10;
}

.auth-modal-popup .btn-cancel {
    background-color: #f0f0f0;
    color: #666;
    border: none;
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 50px;
}

.auth-modal-popup .btn-cancel:hover {
    background-color: #e0e0e0;
}

.auth-modal-popup .section-title h1 {
    font-weight: 700;
    margin-bottom: 15px;
}

.auth-modal-popup .section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.auth-modal-popup .sub-title {
    font-weight: 700;
    color: #333;
    margin: 0;
    font-size: 20px;
}


/* 반응형 조정 */
@media (max-width: 768px) {
    .auth-modal-popup .auth-card {
        padding: 20px 10px;
    }

    .auth-modal-popup .modal-body {
        padding: 15px;
    }
}

/*#noneMemberAuthBox {*/
/*    display: flex;*/
/*    flex-wrap: wrap;*/
/*    flex-direction: row !important;*/
/*    align-items: center;*/
/*    justify-content: center;*/
/*    !*padding-right:20px;*!*/
/*    !*padding-left:20px;*!*/
/*}*/

/*#noneMemberAuthBox div,*/
/*#noneMemberAuthBox button {*/
/*    white-space: nowrap;*/
/*}*/

/* =====================
   signup.html 전용 반응형 정리 (≤992px)
   - 폼 라벨/입력 2라인 스택
   - 고정폭/최소폭 해제 및 컨트롤 100% 확장
   - 인풋 그룹/커스텀 셀렉트 보정
   - 비회원 안내(#noneMemberAuthBox) 줄바꿈 자연스럽게
   - 측정 대상자 목록(#personInfo .board-list) 모바일 그리드화
   ===================== */
@media (max-width: 992px) {
    /* sub-title 우측 안내('* 필수입력')가 다음 줄로 내려가도 우측 정렬 유지 */
    #signupForm .sub-title {
        display: flex;
        flex-wrap: wrap;
    }
    #signupForm .sub-title > .d-flex.align-content-center.align-items-end {
        margin-left: auto;
        width: 100%;
        display: flex;
        justify-content: flex-end;
        text-align: right;
        white-space: nowrap;
    }

    /* 라벨/값 2라인 배치: 각 row 내 col-*을 전체 폭으로 */
    #signupForm .card,
    #signupForm .table-card,
    #signupForm .card-body,
    #signupForm .board-list {
        border:0 !important;
        box-shadow: none !important;
        margin-bottom: 0 !important;
    }
    #signupForm .table-card .form-row > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* 라벨/값 셀 높이, 패딩 보정 */
    #signupForm .table-card .form-label-cell,
    #signupForm .table-card .form-value-cell {
        height: auto !important;
    }
    #signupForm .table-card .form-label-cell {
        padding: 1rem 0.2rem 0 0 !important;
        border-bottom: none !important;
        background-color: #fff !important;
        word-break: keep-all;
    }
    #signupForm .table-card .form-value-cell {
        padding: 0.35rem 1rem 0 1.25rem !important;
        border-bottom: none !important;
    }

    /* 입력 컨트롤 폭 확장 및 인라인 고정폭 무력화 */
    #signupForm .table-card .form-value-cell .form-control,
    #signupForm .table-card .form-value-cell .form-select,
    #signupForm .table-card .form-value-cell .custom-select-dropdown,
    #signupForm .table-card .form-value-cell .input-group,
    #signupForm .table-card .form-value-cell input[style*="width"],
    #signupForm .table-card .form-value-cell select[style*="width"] {
        width: 100% !important;
        min-width: 0 !important;
    }
    #signupForm .table-card .form-value-cell .input-group {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
    }
    #signupForm .table-card .form-value-cell .input-group > .form-control {
        flex: 1 1 auto;
    }

    /* 모바일에서 고정 높이로 인해 다음 섹션과 겹치는 현상 방지 */
    /* 인라인 style의 height, h-100 클래스로 고정된 높이를 모두 해제하여 내용에 맞게 확장 */
    #signupForm .table-card .form-row,
    #signupForm .table-card .form-row[style*="height"],
    #signupForm .table-card .form-label-cell.h-100,
    #signupForm .table-card .form-value-cell.h-100,
    #signupForm .table-card .form-label-cell[style*="height"],
    #signupForm .table-card .form-value-cell[style*="height"],
    #signupForm .table-card .form-row[data-organ-type] {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    /* 값 셀에 d-inline-block이 지정된 경우, 콘텐츠 높이를 온전히 반영하도록 블록화 */
    #signupForm .table-card .form-value-cell.d-inline-block {
        display: block !important;
        width: 100% !important;
    }

    /* 전화/생년월일 등 커스텀 셀렉트 폭 보정 */
    #signupForm .custom-select-dropdown,
    #signupForm .input-group .custom-select-dropdown,
    #signupForm .input-group .dropdown-toggle {
        width: 100% !important;
    }

    /* 비회원 안내 문장-버튼-문장 자연스러운 줄바꿈 */
    #signupForm #noneMemberAuthBox {
        display: block !important;
        text-align: center;
        word-break: keep-all;
    }

    #signupForm .table-card .form-label-cell.p-first-row {
    /*.table-card .form-row .p-first-row {*/
        padding-top: 0 !important;
    }
    /*#signupForm #noneMemberAuthBox .identityVerifyBtn {*/
    /*    display: inline-block;*/
    /*    vertical-align: middle;*/
    /*    margin: 0 0.5rem;*/
    /*    white-space: nowrap;*/
    /*}*/

    /* 측정 대상자 목록: 모바일 그리드 레이아웃 */
    #personInfo .board-list thead {
        display: none; /* 라벨은 셀 ::before로 표시 */
    }
    #personInfo .board-list tbody tr {
        display: grid;
        grid-template-columns: 30% 25% 25% 20%;
        grid-template-areas:
            "a a b b"      /* 성명 | 생년월일 */
            "c c d d"      /* 면허종별 | 면허번호 */
            "e e f f"      /* 부서명 | PET-CT */
            "g g g g"      /* 피폭결과 보고기관 */
            "h h h h";     /* 기능(버튼) */
        grid-auto-rows: auto;
        row-gap: 6px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        padding: 10px;
        margin-bottom: 12px;
    }
    #personInfo .board-list tbody tr.personEmptyRow {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-template-areas: "full full full full";
        padding: 10px;
    }
    #personInfo .board-list tbody tr.personEmptyRow td {
        grid-column: 1 / -1;
        grid-area: full;
        text-align: center !important;
    }
    #personInfo .board-list tbody td {
        border: none !important;
        padding: 0;
        text-align: left !important;
        vertical-align: middle !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box;
        word-break: break-word;
        overflow-wrap: anywhere;
    }
    /* 영역 매핑 */
    #personInfo .board-list tbody td:nth-child(1) { grid-area: a; }
    #personInfo .board-list tbody td:nth-child(2) { grid-area: b; }
    #personInfo .board-list tbody td:nth-child(3) { grid-area: c; }
    #personInfo .board-list tbody td:nth-child(4) { grid-area: d; }
    #personInfo .board-list tbody td:nth-child(5) { grid-area: e; }
    #personInfo .board-list tbody td:nth-child(6) { grid-area: f; }
    #personInfo .board-list tbody td:nth-child(7) { grid-area: g; }
    #personInfo .board-list tbody td:nth-child(8) { grid-area: h; }

    /* 라벨(::before) 정의 */
    #personInfo .board-list tbody td:nth-child(1):not(:empty):not(.no-data)::before { content: "성명: "; color: #777; }
    #personInfo .board-list tbody td:nth-child(2):not(:empty)::before { content: "생년월일: "; color: #777; }
    #personInfo .board-list tbody td:nth-child(3):not(:empty)::before { content: "면허종별: "; color: #777; }
    #personInfo .board-list tbody td:nth-child(4):not(:empty)::before { content: "면허번호: "; color: #777; }
    #personInfo .board-list tbody td:nth-child(5):not(:empty)::before { content: "부서명: "; color: #777; }
    #personInfo .board-list tbody td:nth-child(6):not(:empty)::before { content: "PET-CT: "; color: #777; }
    #personInfo .board-list tbody td:nth-child(7):not(:empty)::before { content: "보고기관: "; color: #777; }
    /* 기능 셀은 라벨을 숨겨 버튼 정렬 간섭 제거 */
    #personInfo .board-list tbody td:nth-child(8):not(:empty)::before {
        content: "";
        display: none;
    }



    /*#signupForm td[data-name="reportOrgan"] br::after {*/
    /*    content: ", ";*/
    /*}*/

    /*#personInfo .board-list tbody td:nth-child(7):not(:empty) br {*/
    /*    !* 줄바꿈 대신 콤마+공백 표시 *!*/
    /*    display: inline;*/
    /*    content: ", ";*/
    /*}*/

    #personInfo .board-list tbody td:nth-child(7):not(:empty) br {
        /* br로 인한 강제 줄바꿈 제거 (요소 박스는 생성하지 않음) */
        /*content: ", ";*/
        display: none;
    }

    /* 마지막 구분자 뒤에는 콤마를 붙이지 않음 */
    /*#signupForm td[data-name="reportOrgan"] br:last-of-type::after {*/
    /*    content: "";*/
    /*}*/









    /* 기능(버튼) 셀: 가운데 정렬 및 줄바꿈 방지 */
    #personInfo .board-list tbody td:nth-child(8) {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: nowrap;
        text-align: center !important;
    }
    #personInfo .board-list tbody td:nth-child(8) .btn {
        margin-left: 0 !important; /* 부트스트랩 ms-2로 인한 치우침 보정 */
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    /* 매우 작은 화면에서 그리드 내부 여백 미세 조정 */
    #personInfo .board-list tbody tr {
        padding: 10px 8px;
    }

    .custom-select-dropdown input[type="text"] {
        text-align: center !important;
        padding-left: 5px !important;
        padding-right: 16px !important;
    }

    .custom-select-dropdown .readonly-select {
        background-position: right 0 center !important;
    }
}