#ReqCaptchaArea {
    box-sizing: border-box;
    margin-top: 24px;
    padding: 22px 24px;
    border: 1px solid #dfc9b2;
    border-radius: 12px;
    background: #fffaf4;
    color: #493c30;
    text-align: left;
}

#ReqCaptchaArea .req-captcha-heading {
    display: flex;
    align-items: center;
    gap: 10px;
}

#ReqCaptchaTitle {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

#ReqCaptchaArea .req-captcha-badge {
    padding: 2px 8px;
    border-radius: 4px;
    background: #f0dfcb;
    color: #72502d;
    font-size: 12px;
    line-height: 1.5;
}

#ReqCaptchaArea .req-captcha-hint {
    margin: 6px 0 18px;
    font-size: 14px;
    line-height: 1.7;
    color: #746456;
}

#ReqCaptchaArea .req-captcha-content {
    display: grid;
    grid-template-columns: 234px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

#ReqCaptchaArea .req-captcha-preview {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
}

#ReqCaptchaImage {
    box-sizing: content-box;
    display: block;
    width: 210px;
    height: 70px;
    padding: 6px 10px;
    border: 1px solid #e4d7c9;
    border-radius: 6px;
    background: #fff;
}

#ReqCaptchaRefresh {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #80562f;
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
}

#ReqCaptchaArea .req-captcha-entry {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 8px;
}

#ReqCaptchaArea .req-captcha-entry label {
    position: static;
    display: block;
    color: #493c30;
    font-size: 14px;
    line-height: 1.5;
}

#ReqCaptchaCode {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 10px 14px;
    border: 1px solid #bca48c;
    border-radius: 6px;
    background: #fff;
    color: #382d24;
    font: inherit;
    font-size: 20px;
    letter-spacing: 4px;
}

#ReqCaptchaCode::placeholder {
    color: #9a8a7b;
    font-size: 14px;
    letter-spacing: 1px;
}

#ReqCaptchaCode:focus,
#ReqCaptchaRefresh:focus-visible {
    outline: 2px solid #b98450;
    outline-offset: 3px;
}

#ReqCaptchaArea .req-captcha-help {
    color: #847464;
    font-size: 12px;
    line-height: 1.5;
}

#ReqCaptchaImageError {
    max-width: 234px;
    color: #a02c22;
    font-size: 13px;
    line-height: 1.5;
}

#ReqFormMessage:not(:empty) {
    margin: 16px 0;
    padding: 10px 14px;
    border-left: 3px solid #b44336;
    border-radius: 4px;
    background: #fff2ef;
    color: #922a20;
    font-size: 14px;
    line-height: 1.7;
}

@media (max-width: 600px) {
    #ReqCaptchaArea {
        padding: 18px 16px;
    }

    #ReqCaptchaArea .req-captcha-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
}

/* 內容獨立捲動，操作列保留於需求單視窗底部。 */
#ReqFormPanel {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

#ReqFormPanel > .inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding: 32px 0;
}

#ReqFormActions {
    flex: 0 0 auto;
    padding: 14px 50px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #dfc9b2;
    background: #fffdf9;
    box-shadow: 0 -4px 16px rgb(73 60 48 / 8%);
    z-index: 3;
}

#ReqFormActions .toolbar {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    border: 0;
}

#ReqFormActions .toolbar .btn-default {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 48px;
}

#ReqFormActions #ReqFormMessage:not(:empty) {
    margin: 0 0 12px;
    padding: 8px 12px;
}

#ReqSubmitButton[aria-disabled="true"] {
    opacity: .55;
    cursor: wait;
}

#ReqFormPanel [aria-invalid="true"] {
    outline: 2px solid #b44336;
    outline-offset: 3px;
    scroll-margin: 32px;
}

@media (max-width: 600px) {
    #ReqFormActions {
        padding-right: 25px;
        padding-left: 25px;
    }
}
